Skip to content
Skill

Lesson that recurs after being written becomes a check

Turns a repeatedly broken written rule into an automatic check the agent can't skip

Lesson that recurs after being written becomes a check is an open-source agent skill for developer tools. It is available on Claude Code.

Scripts
None
Platforms
Claude Code
GitHub stars
5
Last commit
License
MIT
Listing updated

Similar skills

About Lesson that recurs after being written becomes a check

This skill guides the agent when a lesson already recorded in a note, memory or house rule keeps being broken. Instead of adding more wording, it steers toward a mechanical check such as a tool-call hook, a pre-commit or CI step, or a script the workflow must run. It also helps decide which rules belong in a document and which belong in a program.

The guidance covers writing refusal messages that state the rule, its reason and the single allowed way through. It recommends failing open only when the check itself is missing, while refusing when the check cannot read its inputs, plus a named override that needs the owner's approval and is logged. It also advises keeping rule numbers in one place and noting what the check cannot see.

Verification is described as re-running the exact failing command to confirm refusal, running the allowed path to confirm it passes, and removing inputs on purpose to confirm the check refuses. The skill is plain Markdown with no scripts or bundled files, so it is written for the agent to apply to whatever project it is working in.

When your agent uses it

The same mistake keeps happening even though a note, memory or house rule already says not to. Use when you find a lesson written down that was broken again, or when deciding whether a new rule belongs in a document or in an automatic check.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (3 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the agent-traffic-control plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add wan-huiyan/agent-traffic-control
/plugin install agent-traffic-control@wan-huiyan-agent-traffic-control

Or copy only this skill to ~/.claude/skills/lesson-that-recurs-after-being-written-becomes-a-check:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/lesson-that-recurs-after-being-written-becomes-a-check &&
cp -R "$tmp/plugins/agent-traffic-control/skills/lesson-that-recurs-after-being-written-becomes-a-check" ~/.claude/skills/lesson-that-recurs-after-being-written-becomes-a-check &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/lesson-that-recurs-after-being-written-becomes-a-check inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/lesson-that-recurs-after-being-written-becomes-a-check to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/lesson-that-recurs-after-being-written-becomes-a-check &&
cp -R "$tmp/plugins/agent-traffic-control/skills/lesson-that-recurs-after-being-written-becomes-a-check" ~/.agents/skills/lesson-that-recurs-after-being-written-becomes-a-check &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/lesson-that-recurs-after-being-written-becomes-a-check inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/lesson-that-recurs-after-being-written-becomes-a-check to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/lesson-that-recurs-after-being-written-becomes-a-check &&
cp -R "$tmp/plugins/agent-traffic-control/skills/lesson-that-recurs-after-being-written-becomes-a-check" ~/.cursor/skills/lesson-that-recurs-after-being-written-becomes-a-check &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/lesson-that-recurs-after-being-written-becomes-a-check inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/wan-huiyan/agent-traffic-control.git --path plugins/agent-traffic-control/skills/lesson-that-recurs-after-being-written-becomes-a-check

Or copy the folder to ~/.gemini/skills/lesson-that-recurs-after-being-written-becomes-a-check yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/lesson-that-recurs-after-being-written-becomes-a-check:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/lesson-that-recurs-after-being-written-becomes-a-check &&
cp -R "$tmp/plugins/agent-traffic-control/skills/lesson-that-recurs-after-being-written-becomes-a-check" ~/.copilot/skills/lesson-that-recurs-after-being-written-becomes-a-check &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/lesson-that-recurs-after-being-written-becomes-a-check inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/wan-huiyan/agent-traffic-control.git

Then copy agent-traffic-control/plugins/agent-traffic-control/skills/lesson-that-recurs-after-being-written-becomes-a-check into your agent's skills folder as lesson-that-recurs-after-being-written-becomes-a-check. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Turning rules into checks
Guides replacing a repeatedly broken written rule with a hook, CI step or script.
Refusal message design
Explains how a refusal should name the rule, its reason and the allowed route.
Fail-open versus fail-closed
Distinguishes a missing check from one that cannot decide, and sets behavior for each.
Logged owner overrides
Describes a named override that requires the owner's approval and records each use.
Verifying a new check
Lists tests: the blocked command is refused, the allowed path passes, and missing inputs cause refusal.
Document versus check decisions
Helps decide whether a rule is mechanical enough for a program or needs human judgement.

Good for

  • Stop an agent from repeating a mistake already noted in project memory
  • Decide whether a new coding rule belongs in documentation or a pre-commit hook
  • Add a hook that blocks a risky shell command after it was run wrongly before
  • Design a refusal message that explains a rule and the correct alternative
  • Test that a newly added guard refuses the original mistake

Lesson that recurs after being written becomes a check FAQ

When does Lesson that recurs after being written becomes a check trigger?

It is meant for cases where a written lesson was broken again, or when deciding whether a new rule belongs in a document or an automatic check. Its description says the user invokes it when those situations arise.

Does Lesson that recurs after being written becomes a check need any scripts or tools?

No scripts are included and no allowed tools are set. It is a single SKILL.md file that gives guidance only.

What kinds of rules does Lesson that recurs after being written becomes a check suggest turning into checks?

Rules that a program can decide from a command line, a file's presence or a record on disk, especially where a wrong step is costly or hard to undo. Judgement calls stay in documents.

How should a check verify itself?

The skill suggests re-running the exact command that broke the rule, running the allowed path, and removing the check's inputs to confirm it refuses rather than passes.

How do I install Lesson that recurs after being written becomes a check in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/lesson-that-recurs-after-being-written-becomes-a-check to use it in all your projects, or to .claude/skills/lesson-that-recurs-after-being-written-becomes-a-check in one project. Or install the agent-traffic-control plugin, which includes it: /plugin marketplace add wan-huiyan/agent-traffic-control, then /plugin install agent-traffic-control@wan-huiyan-agent-traffic-control.

Does Lesson that recurs after being written becomes a check run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Lesson that recurs after being written becomes a check?

Claude Code. It reads skills in the SKILL.md format; the install steps on this page show where to put the folder.

What are the best alternatives to Lesson that recurs after being written becomes a check?

The closest alternatives to Lesson that recurs after being written becomes a check are Principle encode lessons in structure, Correct, Agent refusal with evidence beats literal compliance, Writing rules and Principle build the lever.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from wan-huiyan/agent-traffic-control