honor-code skill
Prevents repeated agent mistakes by implementing architectural, type-based, or linting safeguards based on historical error patterns.
- GitHub stars
- 113
- Files
- 1
- Last commit
- Nov 1, 2026
- License
- MIT
- Allowed tools
- —
What does the honor-code skill do?
honor-code prevents repeated agent mistakes by implementing architectural, type-based, or linting safeguards based on historical error patterns.
Summary generated from the skill's SKILL.md.
About the honor-code skill
Developers who want to stop AI agents from repeating the same coding errors can use this skill to turn historical mistakes into permanent structural safeguards. Instead of relying on repetitive manual corrections, the tool analyzes recent commits, reverts, review comments, and agent instruction files like AGENTS.md or CLAUDE.md to identify recurring mistake classes. Once a pattern is identified, it implements a fix at the highest possible level of the development stack.
The process prioritizes architectural changes to eliminate errors, followed by type system enforcement, custom linting rules, or CI checks. It also addresses brittle tests that fail to catch regressions. To ensure effectiveness, the skill proves each new safeguard by demonstrating that it correctly flags a real past mistake. The final output includes a structured table within agent instruction files that maps specific rules to their technical enforcement mechanism, such as a specific type or lint path.
What an agent can do with it
- 1Convert manual corrections into codeTransform repeated operator corrections into permanent architectural or type-based constraints.
- 2Validate new safeguards against historyVerify that a new lint or type check actually works by replaying a previous error.
- 3Maintain an enforcement registryCreate a central table in agent instructions that links rules to their technical implementation.
Written from the skill's SKILL.md. Every use case is checked against a quote from it.
How to install the honor-code skill
Each command copies the skill folder into the client's skills directory. Restart the client or start a new session to load it.Install the honor-code skill in Plugin
/plugin marketplace add tmcfarlane/team-avatar /plugin install team-avatar@team-avatar
Install the honor-code skill in Claude Code
~/.claude/skills/honor-code/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/honor-code ~/.claude/skills/honor-codeInstall the honor-code skill in Claude Code (project)
.claude/skills/honor-code/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/honor-code .claude/skills/honor-codeInstall the honor-code skill in Codex
~/.agents/skills/honor-code/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/honor-code ~/.agents/skills/honor-codeInstall the honor-code skill in Gemini CLI
~/.gemini/skills/honor-code/SKILL.md
$ npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/honor-code ~/.gemini/skills/honor-codeInstall the honor-code skill in Claude.ai
npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/honor-code honor-code && zip -r honor-code.zip honor-code # claude.ai → Customize → Skills → + → Create skill → Upload a skill → honor-code.zip
SKILL.md
View on GitHubZuko's honor code
Zuko's uncle never let him forget a mistake, and he never let him dwell on one either. Each failure became a line in the code Zuko lived by, so the same mistake could not catch him twice. A repo can live by a code too. When the operator keeps correcting agents for the same thing, the fix is not another reminder. It is a change that makes the mistake impossible.
Assume every contributor is an agent that sees only the files it opened, copies the nearest example, and takes the shortest path that compiles. Shape the repo so a change that looks right from one file is right for the whole repo.
Find the mistake classes
Read recent commits, reverts, review comments, agent instruction files (AGENTS.md, CLAUDE.md, and the like), and comments that explain workarounds. Group the mistakes into classes. A class counts once it has happened twice. Cite the evidence for each occurrence.
Fix each class at the highest level that works
- Eliminate it with architecture. Give each piece of state one owner and each task one supported way. Hide internals so the wrong import fails. Replace hand-synced lists with one source of truth. Delete old ways and dead code an agent would copy.
- Enforce it with types, so the bad state cannot be written (Type System Discipline, Earth in
four-elements). If bad code still compiles, add a lint or a CI check whose error names the file, type, or function to use instead. If the pattern is already common, fail only when a change adds more of it. - Test the behavior. Fix or delete any test that still passes when the behavior it checks breaks, or that fails when only the internals change (Test Behavior, Not Implementation, Earth in
four-elements). - Write docs or agent rules last, and only for judgment calls. Nothing fails when an agent skips them.
Fix and prove
Fix the most frequent classes now, one commit each. Prove each new check fails on a real past mistake by reapplying that mistake and showing the check's error. Run the same command locally and in CI. An exception goes on the offending line with a reason, an expiry date, and a human's approval.
Keep the code
Keep a table in the agent instruction file that pairs each rule with what enforces it.
| Rule | Enforced by |
|---|---|
| <the mistake, stated as a rule> | <the type, lint, check, or test, with its path> |
When the operator corrects you, fix the mistake and add the rule. If the rule was already there and nothing enforces it, that is a repeat, so fix it at the highest level in the same change (Encode Lessons in Structure, Fire in four-elements). Drop a rule once its mistake cannot happen.
Reply
Each class with its evidence, the level you picked, and why a higher level did not work.
Files in this skill
1honor-code skill questions
How do I install the honor-code skill in Claude Code?
Run npx degit tmcfarlane/team-avatar/plugins/team-avatar/skills/honor-code ~/.claude/skills/honor-code. Claude Code loads skills from ~/.claude/skills (all projects) or .claude/skills (one project) and uses a skill when its description matches the task.
Which clients can use the honor-code skill?
Any client that reads the Agent Skills format: Claude Code, Codex, Gemini CLI and claude.ai (upload as a ZIP). Scripts in the skill run only where the client allows code execution.
How does the honor code fix mistakes?
It fixes mistakes at the highest possible level, starting with architecture, then moving to types, lints, tests, and finally documentation.
How do you identify a mistake class?
A mistake class is identified by grouping recent commits, reverts, review comments, and agent instruction files, and it is officially counted once it has occurred twice.
How can you prove a new check actually works?
You prove a check works by reapplying a real past mistake and demonstrating that the new check triggers an error.