agentleFS
AnthonyPoschenAnthonyPoschen/agent-skills/skills/context-management/SKILL.md

context-management

Skill2 starsChanged 17 days agoMITView on GitHub

Use when a task involves large logs, long files, broad search results, screenshots, repeated reads, or fan-out planning. Keep the working context focused through targeted extraction, compact handoffs, scoped phases, and bounded delegation.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use verification.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • OpenAISkill

    verification

    Full-story verification — infers what the user is building, then verifies the complete flow end-to-end: browser → API → data → response. Triggers on dev server start and 'why isn't this working' signals.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 0 are common, 12 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before opening a large file, log, diff, document, image set, or search result, state the question it must answer.

    line 17
  2. Distinctive:

    Prefer a targeted search, range, filter, or screenshot page over reading the whole source.

    line 21
  3. Distinctive:

    Do not reread material already understood.

    line 23
  4. Distinctive:

    Read more only when the current evidence cannot support the decision.

    line 25
  5. Distinctive:

    When a task has several phases, preserve only what the next phase needs:

    line 30
  6. Distinctive:

    Ask for source locations and uncertainty, not a retelling of every file read.

    line 47
  7. Distinctive:

    Keep small, tightly coupled reads in the main thread.

    line 49
  8. Distinctive:

    Leave out the how and any hand-ordered list of steps.

    line 62
  9. Distinctive:

    Before an unattended run, also:

    line 65
  10. Distinctive:

    Write done as checks the delegate can run itself.

    line 67
  11. Distinctive:

    Ask for a decision log to audit later.

    line 69
  12. Distinctive:

    Keep rules used on nearly every invocation in the active skill.

    line 74
  13. Very specific:

    When agents judge the same kind of result more than once, script the check instead.

    line 87

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “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

Context Management

Protect the working context for the decisions that remain. Do not spend it on raw material that will not affect the next action.

Read With A Question

Before opening a large file, log, diff, document, image set, or search result, state the question it must answer. Then read only the relevant section, fields, or examples.

  • Prefer a targeted search, range, filter, or screenshot page over reading the whole source.
  • Do not reread material already understood. Keep a short note with the fact, evidence location, uncertainty, and next action.
  • Read more only when the current evidence cannot support the decision. Do not collect background merely because it is available.

Keep A Compact Working Record

When a task has several phases, preserve only what the next phase needs:

  • the goal and constraints;
  • decisions made and why;
  • direct evidence and its location;
  • open questions, risks, and the next action.

Summarise verbose tool output in those terms. Do not paste a long transcript into later work unless its exact wording is necessary.

Delegate Only When It Helps

Delegate a large investigation when it has a clear question, can be explored independently, and the main task can proceed from a concise evidence-backed summary.

  • Give the delegate a bounded scope and the facts it must return.
  • Ask for source locations and uncertainty, not a retelling of every file read.
  • Inspect important evidence yourself before making a consequential decision.
  • Keep small, tightly coupled reads in the main thread. Do not create agents merely to avoid reading a few relevant files.

Write The Handoff

State the intent and the check for done. The delegate chooses the steps.

  • State the goal and a done check that can pass or fail. "Make it better" is not a check.
  • Name the proof it must show: real command output or a before-and-after number.
  • Say what is already known, such as a symptom, repro, log, or link, and the real constraints, such as "repro first" or "zero behavior change".
  • Leave out the how and any hand-ordered list of steps. A fixed order drops or reorders steps and blocks a better route.

Before an unattended run, also:

  • Write done as checks the delegate can run itself.
  • Answer in advance the questions it would stop to ask.
  • Ask for a decision log to audit later.
  • Give it a way out: what to do or report if it cannot finish.

Load Instructions Progressively

Keep rules used on nearly every invocation in the active skill. Keep variants, language details, and rare procedures in directly linked references. Load one reference when the task needs it; do not load a catalog speculatively.

Reassess Before Context Becomes A Problem

Pause before a broad new phase, a long fan-out, or a large raw payload. Restate the current decision and choose the smallest next read or delegated task that can resolve it. If the context is already crowded, make a compact handoff record before continuing.

Repeated Checks

When agents judge the same kind of result more than once, script the check instead. See scripted-verification.

Sources

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.