knowledge-placement
Skill8 starsChanged 12 days agoMITView on GitHub
Use before editing AGENTS.md or CLAUDE.md, before creating or editing a skill, or when asked to "remember this for the project", "add a rule", "thêm rule", "viết skill".
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 11 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Put each fact at the first tier that fits, not the most convenient one.
- Distinctive: line 26
Add a one-line pointer to AGENTS.md only if an always-loaded rule must name the skill.
- Distinctive: line 40
When changing a contract, edit the owner's existing wording, then grep for references and fix them.
- Distinctive: line 44
Keep behind only what must survive with no skill loaded: the trigger to load the skill and any safety-critical fact.
- Distinctive: line 59
Never add "unless it matters" clauses.
- Distinctive: line 62
Test before shipping, red then green, with the same 3-5 scenarios on both sides and one fresh subagent per side.
- Distinctive: line 64
Use them, update that file in the same change as the skill, and create it the first time you run red/green for a skill that has none.
- Very specific: line 67
When editing an existing skill, first snapshot it (cp -r skills/<name> <scratchpad>/<name>-old) and run red against the snapshot, so red …
- Distinctive: line 68
If it already behaves, there is nothing to write.
- Distinctive: line 71
Every edit that changes an instruction gets at least the green run.
- Distinctive: line 73
Keep 2-3 near-miss phrases with the scenarios: requests that share keywords with the description but need something else.
- Very specific: line 75
If the runs keep writing the same helper script, bundle it in the skill's scripts/ and point the steps at it.
- Distinctive: line 83
Prefer rewriting or pruning existing lines over appending new ones.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
knowledge-placement
AGENTS.md is paid for by every session, every time. A skill is paid for only by sessions that load it. Put each fact at the first tier that fits, not the most convenient one.
Decision tree (stop at the first yes)
- Is it mechanically checkable on every tool call (a banned character, a banned command, a protected branch)?
-> A Claude Code hook: its script in this repo's
hooks/folder, registered inhooks/hooks.json(the plugin's registration, never~/.claude/settings.json), with cases added tohooks/test.sh. The prose keeps one line naming the hook, so an agent knows why a call was blocked; prose alone gets skipped under pressure. A hook is a guard, so it needs the mounted-and-fails test from AGENTS.md. - Is it a rule about code in one project that a diff can be checked against (a migration needs a backfill, no raw SQL in handlers)?
-> A project check in that project's
.agents/checks/, perverify-loopsection 4, which runs it before every PR/MR. - Does an agent need it on almost every session to operate?
->
AGENTS.md, inline, a line or two. - Is it needed only in a nameable situation (a deploy, a migration, a release, a specific workflow)? -> A skill whose description states that trigger. Add a one-line pointer to AGENTS.md only if an always-loaded rule must name the skill.
- Is it product, setup, or user reference? -> README or user-facing docs.
- Is it architecture a maintainer needs (ownership, boundaries, extension points, rationale)? -> Architecture docs.
- Is it exact mechanics (flags, commands, paths)?
-> The script's header comment and its
--help, not prose elsewhere. - Is it task evidence (chronology, failed hypotheses, temp paths, delivery proof)? -> The PR description, Jira ticket, or a handoff note; distill any durable fact into its real owner first.
One-owner rule
- State every contract (format, state machine, procedure) in full exactly once.
- Everywhere else, use a one-line cross-reference, never a restatement; copies drift.
- When changing a contract, edit the owner's existing wording, then grep for references and fix them.
Moving content out of AGENTS.md
- Keep behind only what must survive with no skill loaded: the trigger to load the skill and any safety-critical fact.
- Move everything else out completely; no partial "just in case" copies.
Writing or editing a skill
- A skill nothing loads is dead weight; keep one workflow per skill.
- The description says only when to load the skill, never what it does or how: start with "Use when" or "Use before", list the situations, symptoms, and phrases the user types (in every language they use), in the third person, under about 500 characters. A description that summarizes the workflow gets followed instead of the body.
- The body opens with one or two lines on why the skill exists, then the steps.
Refer to other skills by name (
root-cause), never by@path, which force-loads the file. - Pick the form from the failure you observed:
- A rule skipped under pressure: a plain prohibition plus the excuses it closes.
- Output in the wrong shape: a recipe saying what the output is, part by part, in order.
- A required part left out: a required slot in the template the agent fills in.
- Behavior that depends on a condition: a conditional on something observable. Never add "unless it matters" clauses; state a real exception as its own conditional.
- What a script or schema can check gets the script or schema, not prose.
- Exact flags and long references go in a
references/file or a script's--help; call bundled scripts through their interpreter (bash scripts/x.sh), since packagers can drop executable bits. - Test before shipping, red then green, with the same 3-5 scenarios on both sides and one fresh subagent per side; never a swarm for a skill test.
In this plugin repo, the scenarios, near misses, and reader-test questions live in
evals/<skill>.md(format and run prompts:evals/README.md); elsewhere, keep them in anevals.mdbeside the skill'sSKILL.md. Use them, update that file in the same change as the skill, and create it the first time you run red/green for a skill that has none. The run results go in the PR/MR body, never in the repo.- Red: give a fresh subagent realistic scenarios that tempt the failure, without the skill, and record what it does.
When editing an existing skill, first snapshot it (
cp -r skills/<name> <scratchpad>/<name>-old) and run red against the snapshot, so red compares old against new. If it already behaves, there is nothing to write. - Green: run the same scenarios with the skill in one fresh subagent whose prompt also asks it to hunt contradictions, unfollowable steps, and gaps, and to answer the reader-test questions when they apply. Fix and rerun at most 3 green iterations, then report the remaining gaps instead of looping. Every edit that changes an instruction gets at least the green run. An edit that changes no instruction (a typo, a link fix, a trim whose diff shows no rule changed) needs no run.
- Red: give a fresh subagent realistic scenarios that tempt the failure, without the skill, and record what it does.
When editing an existing skill, first snapshot it (
- Keep 2-3 near-miss phrases with the scenarios: requests that share keywords with the description but need something else; the skill must not load for them.
- Judge from the subagent's transcript or reasoning, not only its final answer; a right answer reached by skipping a step is a failure.
- If the runs keep writing the same helper script, bundle it in the skill's
scripts/and point the steps at it. - A green on a weak check is worse than none: when a scenario was trivially satisfied, or the old version passes it too, say so and replace it in
evals/<skill>.md. - For a document agents read (AGENTS.md, a
project-initblock, a skill body), add a reader test: 3-5 questions a future agent would need answered from the document alone, folded into the green subagent's prompt, or given to one fresh subagent when there is no green run; fix the document until every answer is correct, within the same 3-iteration cap.
Style for tracked Markdown
- One full sentence per line.
- Plain dash "-", never an em dash.
- Prefer rewriting or pruning existing lines over appending new ones.
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- windgeek/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository27 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- releaseSkill
- ask-or-decideSkill
- axiSkill
- betterstack-logsSkill
- bug-triageSkill
- chrome-devtools-axiSkill
- e2e-verifySkill
- environmentsSkill
- feature-buildSkill
- feature-statusSkill
- fe-guardrailsSkill
- flow-traceSkill
- fresh-reviewSkill
- gnhfSkill
- harness-mapSkill
- jira-bug-hunterSkill
- logging-standardSkill
- project-initSkill
- root-causeSkill
- security-passSkill
- server-touchSkill
- stowSkill
- verify-loopSkill
- visionSkill
- worktree-flowSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

