agentleFS
aicodekingaicodeking/deepseek-stack/skills/ds-context-reset/SKILL.md

ds-context-reset

Skill80 starsChanged 15 days agoMITView on GitHub

Keep a PROGRESS.md for long tasks and move to a fresh session or subagent that reads only that file when the context gets long or stale. Use when a task spans many steps or sessions, when the model starts repeating itself, forgets earlier facts, or re-tries old fixes, or when the context window is past about half full. Invoke as /ds-context-reset.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Update PROGRESS.md after every verified step.

    line 18
  2. Distinctive:

    When a signal appears, finish or revert the current step so the tree is in a known state.

    line 20
  3. Distinctive:

    Start a fresh session or subagent.

    line 22
  4. Distinctive:

    Keep it under about 150 lines.

    line 33
  5. Distinctive:

    Never put secrets or tokens in it.

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

ds-context-reset

Store the state of the work in a file, not in the chat, so a fresh context can continue without drift.

Steps

  1. At the start of a long task, create PROGRESS.md at the repo root with these sections:
    • Goal: one or two sentences, plus the acceptance check for the whole task.
    • Done: the verified steps, each with the command and result that proved it.
    • Next: the ordered steps that remain. The first item is the exact next action.
    • Open questions: unknowns and decisions that wait for the user.
    • Key facts: paths, commands, versions, gotchas, and approaches that failed (with the reason).
  2. Update PROGRESS.md after every verified step. Do not update it for unverified ones. Commit the code and PROGRESS.md together with a descriptive message.
  3. Watch for reset signals: you repeat an earlier answer, you forget a fact that is in Key facts, you retry a fix that failed, the same file gets reread many times, or the context is more than about half full.
  4. When a signal appears, finish or revert the current step so the tree is in a known state.
  5. Rewrite PROGRESS.md as a complete handoff. A reader who has only this file and the repo must be able to continue. Remove chatter and keep the facts.
  6. Start a fresh session or subagent. Give it one instruction: "Read PROGRESS.md and git log -5, run the acceptance check for the last Done item, then do the first item in Next."
  7. In the new context, confirm that the baseline check passes before you make new edits. If it fails, fix that first.

Stop when

  • The goal's acceptance check passes and PROGRESS.md shows every item as Done.
  • You have done 3 resets on one Next item without progress. Stop and ask the user, with the file as your report.

Rules

  • PROGRESS.md holds facts and evidence, not plans that nobody has checked.
  • Keep it under about 150 lines. Move old Done items into a short summary line.
  • Never put secrets or tokens in it.
  • The fresh context reads the file, not the old transcript.
  • Pair with ds-plan-loop for the Next list and with ds-unstick for the failed-approach notes.

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.