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.
npx skills add fcsouza/agent-skills --skill encode-correctionsgit clone --depth 1 https://github.com/fcsouza/agent-skillsWrote 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.
[](https://agentmods.dev/skills/fcsouza/agent-skills/encode-corrections)<a href="https://agentmods.dev/skills/fcsouza/agent-skills/encode-corrections"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/encode-corrections/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/fcsouza/agent-skills/encode-corrections"><img src="https://agentmods.dev/badge/skills/fcsouza/agent-skills/encode-corrections.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00224 | $0.02758 |
| Opus 5.5 | $0.00090 | $0.01103 |
| Sonnet 5.5 | $0.00045 | $0.00552 |
| Haiku 4.5 | $0.00022 | $0.00276 |
Grade A, and why
encode-corrections 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Encode corrections
Turn each correction into a check that fails when the mistake comes back. A line of prose in CLAUDE.md fails silently: the next agent may not read it, may not weigh it, or may find a reason to skip it. A type error, a lint error or a failing test stops the change.
Adapted from pstack v0.15.46 by Lauren Tan, https://github.com/cursor/plugins/tree/main/pstack (the correct and no-comments skills, the comment-reviewer agent, five principle skills and the TypeScript guide) under the MIT licence, with ideas from her 2026 AI Engineer talk on keeping agent-written code clean. Modified: two modes, a level for harness hooks, an approval rule, TypeScript and Biome recipes checked against current docs, and a tested ratchet script. Licence details: NOTICE.md.
Why this works
- The codebase is the largest input an agent reads. It copies what it finds there. One workaround becomes the pattern the next agent follows.
- A rule in prose holds only while someone reads it and agrees. A check holds every time it runs.
- Some APIs need nuance to use well, and agents use them badly. Ban them outside one wrapper instead of teaching the nuance.
- Comments cannot be enforced. They go stale, and they give an agent a place to justify a workaround instead of fixing the cause.
- Each mistake encoded is one less thing a reviewer has to look for.
Rules
- Highest level that works. Go through the levels below in order. Stop at the first level that makes the mistake fail.
- Prove the check. Reintroduce the real past mistake in a scratch change, watch the new check fail, then drop the scratch change. A check you have not seen fail is a guess.
- Same command locally and in CI. Wire the check into the script developers already run and into CI under that same script. A check that runs only in CI teaches the agent nothing until push.
- Exceptions sit on the offending line, with a reason. Use the tool's one-line suppression, naming the rule and the reason, and link the issue when the repo tracks one. No file-wide or range suppressions, and no rule switched off for a whole folder to get past one hit.
- The error message names the fix. It says what to use instead and where it lives: the function, the file, the type. "Do not use X" alone sends the agent looking for a way around.
- Stop new occurrences first. If the pattern is already common, add a ratchet that fails only when a change adds more, then clean up the old ones in their own change.
- No prose when structure exists. If a type, lint, test or hook now enforces the rule, do not also add the rule to CLAUDE.md. The table row (below) is the only prose.
- Ask before you reshape. Architecture changes, public API changes and anything that touches many files: propose and wait. Use AskUserQuestion. A hook changes harness settings the team shares, so propose it and wait too. Adding a lint, type or test for the correction at hand needs no approval.
- Fix the cause, not the spot. Encoding the check does not finish the job. Fix the instance that triggered the correction at its root, and find every other instance of the same fault.
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 11d ago First seen · 131 lines · 224 tokens per session scan A 66104f7f68fa
encode-corrections is a skill published in the GitHub repository fcsouza/agent-skills (29 stars, last pushed today), licensed MIT. It adds 224 tokens to every session and 2,758 once invoked, about $0.0009 per session on Opus 5.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-11-23.
encode-corrections compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| encode-correctionsfcsouza/agent-skills | Skill | 29 | today | MIT | A | 224 | Claude Code |
| systematic-debuggingopen-metadata/OpenMetadata | Skill | 16k | today | Apache-2.0 | A | 37 | Claude Code |
| log-error-digestzebbern/claude-code-guide | Skill | 4.7k | today | MIT | A | 71 | Claude Code, Codex |
| observability-audit-sessionsIBM/mcp-context-forge | Skill | 4.9k | today | Apache-2.0 | A | 64 | Claude Code, Codex |
| cwv-optimizeradobe/skills | Skill | 343 | today | Apache-2.0 | A | 112 | Claude Code |
| performance-verificationvalkor-ai/loom | Skill | 1.6k | 2d ago | Apache-2.0 | A | 45 | Claude Code, Codex |
| ci-fixersipyourdrink-ltd/bernstein | Skill | 1.2k | yesterday | Apache-2.0 | A | 15 | Claude Code, Codex |