encode-corrections

encode-corrections is a skill for Claude Code from fcsouza/agent-skills. It costs 224 tokens per session (2,758 once invoked), scanned A, original, MIT.

A method for turning corrections into checks that fail when the same mistake returns. It prefers code-level safeguards such as architecture changes, types, lint rules, or continuous-integration checks over instructions written only in prose.

In plain words
What is it for?
Use it after a user corrects an agent, especially when the same error has happened before, to add a lasting safeguard.
Why use it?
A written rule can be overlooked, while an automated check stops the change and identifies the required fix. This helps prevent repeated mistakes from spreading through a codebase.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions subagents; names the AskUserQuestion tool.

Part of the fstack plugin — 4 skills shipped together

Good fit Use it after a user corrects an agent, especially when the same error has happened before, to add a lasting safeguard.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fcsouza/agent-skills/encode-corrections
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.

Any agent
npx skills add fcsouza/agent-skills --skill encode-corrections
Clone the repo
git clone --depth 1 https://github.com/fcsouza/agent-skills

Made for: Claude Code.

Or install fstack, the plugin that ships this one along with the rest of its 4 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 encode-corrections

README.md
[![agentmods](https://agentmods.dev/badge/skills/fcsouza/agent-skills/encode-corrections/github.svg)](https://agentmods.dev/skills/fcsouza/agent-skills/encode-corrections)
Your own site
<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.

agentmods 80×15 button for encode-corrections

Your own site · 80×15
<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>
Per session 224 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,758 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.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

Measured 11d ago against content hash 66104f7f68fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/ratchet.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/encode-corrections/SKILL.md · 131 lines

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

  1. Highest level that works. Go through the levels below in order. Stop at the first level that makes the mistake fail.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.

Read the full file on GitHub · 131 lines

Files

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.

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. 11d ago First seen · 131 lines · 224 tokens per session scan A 66104f7f68fa

Subscribe to this mod's changes

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.

Related

encode-corrections compared with skills from other repositories

encode-corrections next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
encode-correctionsfcsouza/agent-skillsSkill29todayMITA224Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9ktodayApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill343todayApache-2.0A112Claude Code
performance-verificationvalkor-ai/loomSkill1.6k2d agoApache-2.0A45Claude Code, Codex
ci-fixersipyourdrink-ltd/bernsteinSkill1.2kyesterdayApache-2.0A15Claude Code, Codex