agent-teams
Coordinate multiple Claude Code sessions as a team — lead + teammates with shared task lists, mailbox messaging, and file-lock claiming. Patterns for team…
Smart context compaction with state preservation. Saves critical files, task progress, and working state before compaction, restores after. Use before manual compact or when auto-compact triggers.
$ npx -y skills add rohitg00/pro-workflow --skill compact-guard --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/compact-guardContext preview
The summary Claude sees to decide when to auto-load this skill.
Smart context compaction with state preservation. Saves critical files, task progress, and working state before compaction, restores after. Use before manual compact or when auto-compact triggers.
name: compact-guard description: Smart context compaction with state preservation. Saves critical files, task progress, and working state before compaction, restores after. Use before manual compact or when auto-compact triggers. user-invocable: true
Protect important context through compaction cycles. Based on Claude Code internals: compaction restores max 5 files with 5K tokens each, within a 50K total budget.
Use before `/compact` or when auto-compact warning appears.
Before compacting, save these to memory or a scratch file:
1. **Current task** — What are you working on? One sentence. 2. **Files in progress** — Which files are being edited? (max 5 — compaction only restores 5) 3. **Decisions made** — Any architectural choices made this session 4. **Blockers** — What's preventing progress? 5. **Next steps** — What to do immediately after compact
Before full compaction, try microcompact:
After compaction, immediately:
1. Re-read the top-priority file (the one you're actively editing) 2. Check task list for current progress 3. Review any scratch notes saved pre-compact 4. Resume from next steps
| Strategy | Token Savings | When | |----------|--------------|------| | Delegate grep/search to subagent | 30-60% per search | Always for broad searches | | Read only needed lines (`offset`/`limit`) | 50-90% per read | Large files | | Compact at task boundaries | Preserves coherence | Between logical steps | | Use `/resume` for fresh start | 100% | Unrelated new task |
After running compact-guard:
COMPACT GUARD Files to preserve: [list top 5] Task state: [one sentence] Decisions: [key choices] Next step: [immediate action after compact] Ready to compact. Run /compact now.
Claude Code learns from your corrections: self-correcting memory that compounds over 50+ sessions. Context engineering, parallel worktrees, agent teams, and 17 battle-tested skills.
Repo: rohitg00/pro-workflow
Coordinate multiple Claude Code sessions as a team — lead + teammates with shared task lists, mailbox messaging, and file-lock claiming. Patterns for team…
Auto-configure quality gates, hooks, and settings for a new project. Detects project type and sets up appropriate tooling. Use when onboarding a new codebase.
Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees. Use for migrations, refactors, codemods, and any change…
Capture a user-reported defect as a durable GitHub issue written in the project's own domain language. Explores the codebase in parallel for context but never…
Master the four operations of context engineering — Write, Select, Compress, Isolate. Manage token budgets, compaction strategies, and context partitioning to…
Optimize token usage and context management. Use when sessions feel slow, context is degraded, or you're running out of budget.