mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-14 13:53:29 +08:00
feat: add orchestration workflows and harness skills
This commit is contained in:
@@ -96,6 +96,34 @@ Understanding what persists helps you compact with confidence:
|
||||
5. **Write before compacting** — Save important context to files or memory before compacting
|
||||
6. **Use `/compact` with a summary** — Add a custom message: `/compact Focus on implementing auth middleware next`
|
||||
|
||||
## Token Optimization Patterns
|
||||
|
||||
### Trigger-Table Lazy Loading
|
||||
Instead of loading full skill content at session start, use a trigger table that maps keywords to skill paths. Skills load only when triggered, reducing baseline context by 50%+:
|
||||
|
||||
| Trigger | Skill | Load When |
|
||||
|---------|-------|-----------|
|
||||
| "test", "tdd", "coverage" | tdd-workflow | User mentions testing |
|
||||
| "security", "auth", "xss" | security-review | Security-related work |
|
||||
| "deploy", "ci/cd" | deployment-patterns | Deployment context |
|
||||
|
||||
### Context Composition Awareness
|
||||
Monitor what's consuming your context window:
|
||||
- **CLAUDE.md files** — Always loaded, keep lean
|
||||
- **Loaded skills** — Each skill adds 1-5K tokens
|
||||
- **Conversation history** — Grows with each exchange
|
||||
- **Tool results** — File reads, search results add bulk
|
||||
|
||||
### Duplicate Instruction Detection
|
||||
Common sources of duplicate context:
|
||||
- Same rules in both `~/.claude/rules/` and project `.claude/rules/`
|
||||
- Skills that repeat CLAUDE.md instructions
|
||||
- Multiple skills covering overlapping domains
|
||||
|
||||
### Context Optimization Tools
|
||||
- `token-optimizer` MCP — Automated 95%+ token reduction via content deduplication
|
||||
- `context-mode` — Context virtualization (315KB to 5.4KB demonstrated)
|
||||
|
||||
## Related
|
||||
|
||||
- [The Longform Guide](https://x.com/affaanmustafa/status/2014040193557471352) — Token optimization section
|
||||
|
||||
Reference in New Issue
Block a user