agentleFS
ai-analyst-labai-analyst-lab/ai-analyst/.claude/skills/improve-context/SKILL.md

improve-context

Skill304 starsChanged 2 months agoMITView on GitHub

Diagnose a context-related analytical failure, propose the smallest relevant change, compare the same evaluation cases before and after, and produce an accept, revise, or revert receipt. Use when the user asks to improve context, fix a definition or example, test whether context helped, or invokes /improve-context.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the evaluation system as the referee.

    line 8
  2. Distinctive:

    Read the failing evaluation record and its analysis trace.

    line 12
  3. Very specific:

    Run /context-trace on the exact question.

    line 22
  4. Distinctive:

    Do not change trusted context until the user approves the proposal.

    line 41
  5. Distinctive:

    Run the working and regression cases before the edit.

    line 45
  6. Distinctive:

    Do not silently replace it with a legacy policy fixture.

    line 47
  7. Distinctive:

    Run the same working and regression cases.

    line 56
  8. Very specific:

    Use helpers.knowledge.context_change with the baseline and candidate manifests.

    line 67

≈ “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

Improve context

Use the evaluation system as the referee. Do not promote a context change because the new answer looks more plausible.

1. Diagnose

Read the failing evaluation record and its analysis trace. Classify the context failure:

  • missing information;
  • wrong information;
  • stale information;
  • conflicting information;
  • correct information was not supplied;
  • supplied information was ignored or misapplied;
  • the problem belongs in a skill, helper, workflow, or evaluator rather than context.

Run /context-trace on the exact question. Preserve its JSON fingerprint.

2. Propose

For edits to guides, reviewed queries or semantic definitions, use /maintain-context to inspect the appropriate template, validate dependencies and preserve human review.

Create working/context-change-proposal.yaml with:

  • observed failure and evidence;
  • smallest proposed change;
  • representation and delivery;
  • source and owner;
  • status proposed;
  • cases expected to improve;
  • possible regressions;
  • required reviewers;
  • acceptance criteria.

Do not change trusted context until the user approves the proposal.

3. Preserve the baseline

Run the working and regression cases before the edit. Keep the manifest paths and run IDs. Freeze the suite, data snapshot, model, evaluator, and trial count. Record the proposal's target case IDs and use the installed suite agreed for this experiment. Do not silently replace it with a legacy policy fixture. Lock outputs before grading; keep evaluation references outside candidate context. Do not launch model runs if the user has paused them.

4. Apply one change

Make only the approved context change. Show the diff. Do not change the evaluator or expected results in the same comparison.

5. Rerun and inspect

Run the same working and regression cases. Inspect:

  • aggregate score;
  • target cases;
  • regressions;
  • cases still failing;
  • context manifest;
  • context citations and SQL-use evidence.

6. Write the receipt

Use helpers.knowledge.context_change with the baseline and candidate manifests. Pass every named target with --target-case, and verify that the actual changed system paths are a subset of the approved changed paths. The receipt must recommend:

  • accept when target cases improve, no passing case regresses, and the comparison is controlled;
  • revert when a passing case regresses without an understood exception;
  • revise when the runs are not comparable or the change does not improve the target behavior.

The user chooses whether to promote the proposal. The system may draft the change and evidence, but it does not ratify business truth.

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.