agentleFS
cyfung1031cyfung1031/skills/context-compressor/SKILL.md

context-compressor

Skill2 starsChanged 5 months agoMITView on GitHub

Compress context while preserving task-critical state, exact artifacts, validation, language/tone constraints, and handoff continuity. Use for low-token, brief, compression, continuation, or long-thread state-loss risk.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    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:

    When another skill applies, run that skill's required workflow and compress only narration, repeated setup, logs, and nonessential …

    line 23
  2. Distinctive:

    Use the smallest sufficient form: micro update, concise answer, dense-source note, or full handoff.

    line 27
  3. Distinctive:

    Prefer exact identifiers: paths, symbols, branches, issue numbers, dates, commands, tests, source names, line ranges.

    line 29
  4. Distinctive:

    Ask at most one clarifying question only when blocked.

    line 30
  5. Distinctive:

    Never translate, normalize, paraphrase, reorder, or repair protected literals unless asked: code, commands, logs, errors, regexes, schemas, …

    line 32
  6. Distinctive:

    Do not claim exact token savings, remaining context window, truncation risk, coverage, validation, or completion without visible telemetry …

    line 33
  7. Distinctive:

    After compaction, continuation, or resume, treat summaries as working notes.

    line 66
  8. Distinctive:

    Before sending, verify: latest request answered.

    line 68

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

Context Compressor

Core invariant: preserve what changes future work; compress everything else.

Activate / stop

Use when the user requests low-token, terse, brief, compressed, continuation, handoff, or task-critical-state preservation; when a system/tool signal indicates compaction, truncation, limited context, or token pressure; or when state-loss risk is visible: long thread, large pasted content, repeated tool output, multiple changed files, accepted decisions, non-obvious findings, or unresolved validation.

Do not use for ordinary article summaries, one-off shortening, or code review unless the user also wants compact mode or continuation state. Explicit compact mode persists until the user asks for normal/detail or the task ends. Proactive use is temporary for the current phase or handoff.

Priority ladder

  1. Safety, privacy, permissions, policy.
  2. Required tool/artifact workflow, validation, citations, fixed formats, and exact user constraints.
  3. Latest user request for detail, code, examples, language, tone, or format.
  4. Compression.

When another skill applies, run that skill's required workflow and compress only narration, repeated setup, logs, and nonessential explanation.

Operating rules

  • Answer the latest request first; put requested code, decision, artifact, or summary before background.
  • Use the smallest sufficient form: micro update, concise answer, dense-source note, or full handoff.
  • In long work, mention only new action, finding, verification, blocker, changed next step, or material risk.
  • Prefer exact identifiers: paths, symbols, branches, issue numbers, dates, commands, tests, source names, line ranges.
  • Ask at most one clarifying question only when blocked; otherwise state a safe behavior-affecting assumption and proceed.
  • Preserve requested language, tone, register, domain terms, grammar quirks, and localization constraints when material.
  • Never translate, normalize, paraphrase, reorder, or repair protected literals unless asked: code, commands, logs, errors, regexes, schemas, API signatures, config keys, URLs, paths, prompts, placeholders, names, quotes, multilingual text, and fixed-format fields.
  • Do not claim exact token savings, remaining context window, truncation risk, coverage, validation, or completion without visible telemetry or evidence.

Preserve / compress

Preserve: active goal, latest correction, superseding instructions, safety/permission/tool/citation/format constraints, plan state, blockers, decisions, behavior-changing assumptions, files changed, commands run, test/validation status, remaining work, owner/next action, source anchors, and minimal code/content structure needed to continue.

Compress/drop: rejected or superseded alternatives, filler, motivational language, redundant caveats, repeated process explanations, raw logs after extracting failures/status, large pasted content after extracting facts/decisions/risks, and large code blocks after retaining interfaces and action-critical snippets.

Output formats

Micro update: Now: ... / Found: ... / Next: ... Use only populated fields.

Dense source:

Path/Source: ...
Symbols/Topic: ...
Behavior/State: ...
Evidence: ...        (tests, commands, citations, anchors, or "not verified")
Issues/Risks: ...
Needed exact: ...    (small action-critical snippets only)

Full handoff:

Goal: ...
State: ...
Decisions: ...
Assumptions: ...
Changed: ...
Verified: ...
Next: ...
Risks: ...

Resume / quality gate

After compaction, continuation, or resume, treat summaries as working notes. Re-check load-bearing facts before acting: latest user request, file existence/content, current branch, changed files, failing tests, external state, citations, tool outputs, and superseded instructions.

Before sending, verify: latest request answered; required exact tokens preserved; language/tone constraints kept; no unsupported telemetry claims; no required workflow was skipped for brevity.

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.