add-to-rules
Skill0 starsChanged 4 months agoMITView on GitHub
Validate and route a rule to the correct .claude/rules/ file before adding it
In this repository21 other files it gives its agents.
- add-to-claudeSkill
- audit-claudeSkill
- audit-rulesSkill
- autopilotSkill
- better-planSkill
- design-autoSkill
- designSkill
- execute-autoSkill
- executeSkill
- facts-extSkill
- factsSkill
- questionsSkill
- research-autoSkill
- researchSkill
- review-autoSkill
- structure-autoSkill
- structureSkill
- wiki-captureSkill
- wiki-ingestSkill
- wiki-lintSkill
- wiki-querySkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 6
Before adding anything to a rule file in .claude/rules/, apply this process:
- Distinctive: line 16
If the claim is not verifiable by reading source code, it does not belong in a rule file.
- Distinctive: line 20
Check whether another home is more appropriate:
- Very specific: line 32
Read all existing rule files and their paths: frontmatter.
- Very specific: line 44
If no existing file fits, create a new one with appropriate paths: frontmatter.
- Distinctive: line 54
Add as a single concise line, following the style of existing entries in the target file.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Before adding anything to a rule file in .claude/rules/, apply this process:
1. Is it concrete and verifiable?
A rule must be checkable against code. Grep, read a file, or inspect a build config to confirm it.
- "Store tokens as SHA-256 hashes" — concrete, grep-verifiable. GOOD.
- "Keep code clean" — vague, unverifiable. REJECT.
- "Use descriptive variable names" — obvious from training. REJECT.
If the claim is not verifiable by reading source code, it does not belong in a rule file.
2. Does it belong in a rule file?
Check whether another home is more appropriate:
| Signal | Right home |
| Compile-breaking if wrong, affects all modules | CLAUDE.md — "Will Not Compile Without Knowing" |
| Subtle correctness issue, affects all modules | CLAUDE.md — "Will Not Catch in Review" |
| Behavioral preference for how I work | Memory (feedback type) |
| Repeatable multi-step process | .claude/skills/ |
| Scoped convention or pattern | .claude/rules/ — continue below |
3. Pick the right file
Read all existing rule files and their paths: frontmatter. Match the new rule to the narrowest scope that fits:
| Scope | File |
| AI correction (I get this wrong from training) | corrections.md (no path scope) |
| Indicator / sizing math conventions | indicators.md |
| External adapter / integration conventions | adapters.md |
| Test / research harness conventions | harness.md |
| Production / safety / promotion conventions | prod-safety.md |
(These files are illustrative — the project structure is emergent. None exist yet; create one the first time a real, verifiable convention appears in that area, scoped with paths: frontmatter.)
If no existing file fits, create a new one with appropriate paths: frontmatter. Prefer extending an existing file over creating a new one.
4. Check for duplicates
Grep the candidate rule file AND CLAUDE.md AND corrections.md for the same concept. If already covered:
- Exact duplicate — do not add.
- Partial overlap — update the existing line instead of adding a new one.
5. Add the rule
Add as a single concise line, following the style of existing entries in the target file. Lead with the constraint, not the explanation.
Good: - Store tokens as SHA-256 hashes, never plaintext.
Bad: - For security reasons, we have decided that all tokens should be stored as SHA-256 hashes rather than in plaintext format.
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.

