agentleFS
VladTheProgrammerVladTheProgrammer/claude-asimov/.claude/skills/add-to-rules/SKILL.md

add-to-rules

Skill0 starsChanged 4 months agoMITView on GitHub

Validate and route a rule to the correct .claude/rules/ file before adding it

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
  1. Very specific:

    Before adding anything to a rule file in .claude/rules/, apply this process:

    line 6
  2. Distinctive:

    If the claim is not verifiable by reading source code, it does not belong in a rule file.

    line 16
  3. Distinctive:

    Check whether another home is more appropriate:

    line 20
  4. Very specific:

    Read all existing rule files and their paths: frontmatter.

    line 32
  5. Very specific:

    If no existing file fits, create a new one with appropriate paths: frontmatter.

    line 44
  6. Distinctive:

    Add as a single concise line, following the style of existing entries in the target file.

    line 54

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

SignalRight home
Compile-breaking if wrong, affects all modulesCLAUDE.md — "Will Not Compile Without Knowing"
Subtle correctness issue, affects all modulesCLAUDE.md — "Will Not Catch in Review"
Behavioral preference for how I workMemory (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:

ScopeFile
AI correction (I get this wrong from training)corrections.md (no path scope)
Indicator / sizing math conventionsindicators.md
External adapter / integration conventionsadapters.md
Test / research harness conventionsharness.md
Production / safety / promotion conventionsprod-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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.