| name | operation-tracker |
| description | Maintain awareness of operation counts across the conversation to prevent cumulative context exhaustion. Use when you notice multiple operations accumulating or when working on iterative tasks across turns. |
| allowed-tools | ["Task","AskUserQuestion"] |
Maintain awareness of operation patterns across the conversation to prevent cumulative context exhaustion.
The per-turn threshold is a trap—it's the CONVERSATION-LEVEL accumulation that kills sessions. This skill helps Claude track operations and recognize when to delegate.
<quick_start>
<mental_tracking>
Before each operation, mentally note:
- Reads since last Task: How many files have I read directly since my last Task delegation?
- Edits since last Task: How many edits have I made since my last Task delegation?
- Same-file turns: Am I iterating on the same file across multiple turns?
- Continue loops: Is the user saying "continue" or similar repeatedly?
If any count exceeds threshold → delegate remaining work.
</mental_tracking>
| Metric | Threshold | Action |
|--------|-----------|--------|
| Reads since last Task | ≥2 | Task(Explore) for remaining reads |
| Edits since last Task | ≥3 | Task(general-purpose) for remaining edits |
| Consecutive same-file turns | ≥3 | Suggest delegation to user |
| "Continue" cycles | ≥3 | Delegate remaining refinements |
| Context usage | >50% | All remaining work to subagents |
<iteration_patterns>
User keeps saying "continue", "keep going", "more", etc.
Each turn adds context without triggering delegation consideration.
- User message is short (1-3 words)
- Last response included edits/implementation
- Pattern repeating for 3+ turns
After 3 continue cycles:
"I've been iterating directly for [N] turns. To preserve context for the rest of our session, I'll delegate remaining refinements to a subagent."
Then delegate via Task(general-purpose).
Each turn has 1-2 edits (under per-turn threshold), but conversation accumulates many.
- Count edits since last Task delegation
- Each turn passes individual check
- Cumulative count exceeds threshold
<tracking_method>
Mental checklist at start of each turn:
- "Since my last Task delegation, I've done [N] edits"
- If N ≥ 3: "I should delegate remaining edits"
</tracking_method>
Sequential file reads to understand a feature/bug, loading each file into context.
- Reading file A to understand something
- Then reading file B because A referenced it
- Then reading file C because B imported it
- Each read seemed necessary individually
This is EXPLORATION. Should have been Task(Explore) from the start.
After 2 reads: delegate remaining exploration.
Making repeated changes to the same file across multiple turns.
- Turn 1: Edit file X
- Turn 2: User feedback, edit file X again
- Turn 3: More feedback, edit file X again
- Each edit is small, but cumulative context grows
After 3 turns on same file:
"We've been iterating on [file] for several turns. Would you like me to delegate remaining refinements to preserve main context?"
<regression_detection>
Notice when you start a task with proper delegation but gradually revert to direct execution.
1. Task starts: "I'll use Task(Explore) to find..." ✓
2. Explore returns results
3. Next step: "Let me just quickly read..." ✗
4. Then: "I'll make this small edit..." ✗
5. Then: "One more fix..." ✗
6. Result: Main context exhausted
Ask yourself:
- Did I start this task with Task delegation?
- Am I now doing direct tool calls?
- Is this "cleanup" or "verification" or "quick fix"?
If yes to all three: you're regressing.
Return to delegation mode:
"I started with delegation but have been doing direct operations. Let me delegate the remaining work."
Task(general-purpose): "Complete the remaining [work description]"
</regression_detection>
<context_checkpoints>
After any exploration phase (Grep, Glob, multiple Reads):
- Check: Did I load significant content into context?
- If yes: Delegate action phase to preserve context
When a Task returns results:
- Check: Do I need to do follow-up work?
- If yes: Is it debug/fix work? → New Task
- Don't slip into direct execution for "just cleaning up"
When user provides feedback/correction:
- Check: How many iterations have we done on this file/feature?
- If ≥3: Suggest delegation
Periodically during long sessions:
- Check: How much context have I used?
- If approaching 50%: Shift to all-subagent mode
- Use /context command to verify
<communication_templates>
<anti_patterns>
Wrong: Checking thresholds only within current turn
Right: Track cumulative operations since last Task delegation
**Wrong**: Doing 10 operations without mentioning delegation consideration
**Right**: Acknowledge when approaching thresholds, delegate proactively
**Wrong**: Starting fresh count each turn
**Right**: Maintain mental count across the conversation
**Wrong**: Infinitely complying with "continue" requests via direct execution
**Right**: After 3 cycles, delegate remaining work
**Wrong**: Not noticing shift from delegation to direct execution
**Right**: Periodically check if you've regressed from initial delegation
<success_criteria>
The tracking is working when:
- You can mentally state operation counts at any point
- Delegation happens BEFORE thresholds are exceeded
- Iteration loops are recognized and addressed
- Regression from delegation is caught and corrected
- Long sessions maintain consistent context usage
- User is informed when delegation decisions are made
</success_criteria>
`delegate-first` provides the DECISION framework.
`operation-tracker` provides the AWARENESS mechanism.
delegate-first answers: "Should this be delegated?"
operation-tracker answers: "Have I accumulated too much?"
Use together: delegate-first for new operations, operation-tracker for ongoing awareness.
</with_delegate_first>