agentleFS
KoroqeKoroqe/claude-code-sdlc/skills/context-refresh/SKILL.md

context-refresh

Skill52 starsChanged 2 months agoMITView on GitHub

Rebuild session context from the scratchpad after compaction or when resuming work — restores current feature, branch, wave and slice progress, and reports context health.

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read .claude/scratchpad.md and extract:

    line 19
  2. Distinctive:

    Check if scratchpad matches current state:

    line 27
  3. Distinctive:

    If scratchpad is stale:

    line 34
  4. Distinctive:

    Add new constraints or decisions

    line 36
  5. Distinctive:

    If scratchpad exceeds 100 lines:

    line 40
  6. Very specific:

    Keep only the current wave and next wave in ## Plan

    line 42
  7. Very specific:

    Keep only the last 3 entries in ## Completed

    line 43
  8. Distinctive:

    Stale: Update scratchpad with current state

    line 53
  9. Very specific:

    Overwhelming: Consider starting a fresh session with claude -c

    line 54
  10. Distinctive:

    After completing a major milestone

    line 71
  11. Distinctive:

    When feeling lost in details

    line 72
  12. Distinctive:

    Before planning a new feature

    line 73
  13. Distinctive:

    When conversation is getting long

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Command: Context Refresh

Rebuild context from scratchpad to maintain clarity during long sessions.

Arguments

$mode (also available as $ARGUMENTS) optionally requests a specific mode. Literal-token flag rule: a documented flag is active ONLY if its literal token appears in $ARGUMENTS. Never infer that a flag was passed because the documentation describes it.

Process

1. Read Scratchpad

Read .claude/scratchpad.md and extract:

  • Feature name and branch (## Feature:, ## Branch:)
  • Current status (## Status: — idle/bootstrapping/implementing wave W slice N/M/implementing slice N/M/quality-gates/complete/blocked)
  • Plan progress by wave (if ### Wave N subheadings exist): which waves are complete, which wave is current, per-slice status within the current wave. If no wave subheadings, extract flat slice progress as before
  • Any blockers (## Blockers)
  • Recent work from ## Completed section

2. Verify Accuracy

Check if scratchpad matches current state:

  • Are goals still accurate?
  • Have new decisions been made?
  • Are next steps still relevant?
  • Has the git branch changed?

3. Update if Needed

If scratchpad is stale:

  • Update current goal
  • Add new constraints or decisions
  • Log recent commits and changes
  • Revise next steps based on progress

If scratchpad exceeds 100 lines:

  • Move completed waves (all slices DONE) from ## Plan to ## Archive as a unit — keep the ### Wave N block together. If no wave subheadings, move completed slices individually
  • Keep only the current wave and next wave in ## Plan
  • Keep only the last 3 entries in ## Completed
  • This prevents the scratchpad itself from consuming excessive context

4. Summarize Context

Provide concise summary of where we are.

5. Recommend Action

Based on context health:

  • Clean: Continue with current work
  • Noisy: Suggest which details can be archived
  • Stale: Update scratchpad with current state
  • Overwhelming: Consider starting a fresh session with claude -c

Output Format

Context Summary:
- Goal: [current goal]
- Branch: [current git branch]
- Progress: [what's done — e.g., "Wave 1 complete (3/3), Wave 2 in progress (1/2)" or flat "5/8 slices done"]
- Next: [top 3 items]

Status: [Clean/Noisy/Stale/Overwhelming]
Recommendation: [specific action]

When to Use

  • Starting a new work session
  • After completing a major milestone
  • When feeling lost in details
  • Before planning a new feature
  • When conversation is getting long

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.