compact-docs-writer

compact-docs-writer is a skill for Claude Code, Codex from eai-org/agent-toolkit. It costs 46 tokens per session (1,087 once invoked), scanned A, original, MIT.

A guide for drafting or rewriting version-controlled documents so they preserve every rule while using as few words as possible.

In plain words
What is it for?
Use it to compact repository documents, measure the word change, and present edits for approval.
Why use it?
It reduces the text agents repeatedly read and checks that shortening did not remove important instructions.

Skill for Claude CodeCodex

Part of the agent-toolkit plugin — 22 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/eai-org/agent-toolkit/compact-docs-writer
Any agent
npx skills add eai-org/agent-toolkit --skill compact-docs-writer
Clone the repo
git clone --depth 1 https://github.com/eai-org/agent-toolkit

Made for: Claude Code, Codex.

Or install agent-toolkit, the plugin that ships this one along with the rest of its 22 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for compact-docs-writer

README.md
[![agentmods](https://agentmods.dev/badge/skills/eai-org/agent-toolkit/compact-docs-writer.svg)](https://agentmods.dev/skills/eai-org/agent-toolkit/compact-docs-writer)
Your own site
<a href="https://agentmods.dev/skills/eai-org/agent-toolkit/compact-docs-writer"><img src="https://agentmods.dev/badge/skills/eai-org/agent-toolkit/compact-docs-writer.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,087 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00046 $0.01087
Opus 5 $0.00023 $0.00544
Sonnet 5 $0.00009 $0.00217
Haiku 4.5 $0.00005 $0.00109

Measured 3d ago against content hash 476cf98e475f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

compact-docs-writer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/compact-docs-writer/SKILL.md · 78 lines

How it starts

The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Compact docs writer

Rewrite a doc — or draft a new one — for token economy: carry all its rules and intent in the least text possible, because the doc loads into agent context and is paid for on every read. Then prove nothing was lost: present the change with a word delta measured from the files, and apply only on approval.

Core principle

Write each piece of information with the least text that still preserves every rule, constraint, edge case, and intent. Two directions, equally binding:

  • Cut duplication, filler, and anything restatable more briefly.
  • Never drop text whose removal loses information or instruction, just to be shorter.

Recurring reflex: "Can this exact rule be said in fewer words?" — if yes, do it.

The no-op test licenses one more deletion. Ask of each sentence, in isolation: "does it change the agent's behaviour versus its default?" If not, it's a no-op — the agent already acts this way, so removing it loses nothing: delete the whole sentence rather than trimming words from it.

Compaction counts words and information density, not whitespace. Blank lines between distinct chunks cost effectively nothing and aid the human reader, so keep them where they help; never collapse a long passage into one dense block to look shorter. The same economy runs both ways: a human-readability gain that is free or near-free in tokens — a blank line, a line break, a semicolon-chained enumeration rendered as a bullet list — is always applied, never skipped to look compact.

Structure follows the same economy: co-locate a concept — its rule, exceptions, and caveats under one heading, never scattered — so a reader who jumps to one part gets the others with it.

Leading words

When one concept keeps getting restated, collapse it into a single leading word the model already carries from pretraining, and reuse that word wherever the concept applies: it anchors the same behaviour in one token and reads sharper than any paraphrase. The collapse still obeys the core principle — the word must carry every constraint it replaces, and whatever it doesn't carry stays spelled out: "fast, low-overhead feedback" collapses into a tight loop, but a "deterministic" requirement isn't inside tight, so it survives as its own word. Hunt for these collapses in every pass.

Read the full file on GitHub · 78 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 78 lines · 46 tokens per session scan A 476cf98e475f

Subscribe to this mod's changes

compact-docs-writer is a skill published in the GitHub repository eai-org/agent-toolkit (43 stars, last pushed 13d ago), licensed MIT. It adds 46 tokens to every session and 1,087 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

gsd-audit-milestone

Audit milestone completion against original intent before archiving.

open-gsd/gsd-core · 17 tokens

conductor-implement

Executes the tasks defined in the specified track's plan. Use this to start or continue working on a feature, bug fix, or chore.

gemini-cli-extensions/conductor · 34 tokens

dependency-upgrade

Plan, batch, and verify dependency upgrades safely. Triages outdated packages into risk tiers, upgrades in order (dev/minor/patch first, runtime majors last), verifies each batch, and produces an auditable commit sequence. Use when asked to "upgrade deps", "bump packages", "update nodemodules", "fix vulnerabilities"…

open-gsd/gsd-pi · 90 tokens

forensics

Post-mortem a failed GSD auto-mode run. Traces symptom to root cause via .gsd/ activity, journal, metrics, and lock artifacts, producing a filing-ready bug report with file:line refs and a fix suggestion. Use when asked to "forensics", "post-mortem", "why did auto-mode fail", "trace the stuck loop", "debug the crash"…

open-gsd/gsd-pi · 112 tokens

review

Review code changes for security, performance, bugs, and quality. Reviews staged changes, unstaged changes, specific commits, or PR-ready diffs.

open-gsd/gsd-pi · 32 tokens

workflow-start

Primary entry point for the spec-superflow state-machine workflow. Invoke when the user is inside an active spec-superflow change directory (look for .spec-superflow.yaml, changes/ /, proposal.md, specs/, design.md, tasks.md, or execution-contract.md) and asks to start, continue, resume, implement, plan, or figure out…

MageByte-Zero/spec-superflow · 125 tokens