agentleFS
ku5icku5ic/claude-kit/skills/meta-conventions/SKILL.md

meta-conventions

Skill2 starsChanged 15 days agoMITView on GitHub

Write down the conventions a repo follows, as path-scoped rules with a citation for each

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 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.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask via AskUserQuestion, in one call:

    line 21
  2. Very specific:

    Write one file per area with at least one convention: <root>/.claude/rules/conventions/<area>.md, per skills/kit-rules/reference/output.md …

    line 27
  3. Distinctive:

    Every bullet ends with its citations.

    line 43
  4. Very specific:

    Never overwrite an existing file under .claude/rules/conventions/ without showing the diff and asking.

    line 51
  5. Distinctive:

    Commit nothing. The user reviews the rules first.

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

/meta-conventions

Find the conventions this repo actually follows and write them down once, as path-scoped rules with a citation behind every claim, so later sessions read them instead of rediscovering them.

Loading this skill isn't enough. Before the step a row names, read its file.

BeforeRead
Writing a rule file, step 6reference/rules-files.md

Procedure

  1. Scope. The arguments are: $ARGUMENTS. Resolve the project root with kit project-root. Use the <repo-context> block for the stack.
  2. Ask via AskUserQuestion, in one call:
    • Which areas to cover (multi-select): state, data fetching, styling, testing, errors, naming, file layout. Areas named in the arguments are pre-answered; skip this question when they cover everything.
    • Whether to write the rules under <root>/.claude/rules/conventions/ (one file per area) or only report them. These files are meant to be committed, so writing needs a yes.
  3. Investigate each chosen area with the investigate skill: "What convention does this repo follow for <area>? Cite every instance as file:line." For independent areas, fan out as the skill allows.
  4. Review comments, when the repo is on a code host (skills/kit-rules/reference/tooling.md section 4): the review comments of the last 90 days, by the code-host-patterns skill's "Review comments across the repo" call. Group the ones that make the same point. A point made in at least two comments on at least two PRs, about a chosen area, is a candidate convention: confirm it in the code like any other, and cite the comments next to its code instances. For each, name the cheapest enforcement in the report (a lint rule, an ast-grep rule, or this rule file's line), per skills/kit-rules/reference/change.md section 7.
  5. Keep a convention only when it has at least two cited file:line instances that you've read yourself, and no cited counter-examples that outnumber them. A single instance is an example, not a convention. An area left with nothing is recorded as no convention found in the report. It gets no rule file, since an empty rule costs context and says nothing.
  6. Write one file per area with at least one convention: <root>/.claude/rules/conventions/<area>.md, per skills/kit-rules/reference/output.md section 3:

    ---
    paths:
      - "<glob covering where this convention applies>"
    ---
    
    # Conventions: <area>
    
    Written by /meta-conventions on <YYYY-MM-DD>. `/audit-doc-drift` re-checks the citations.
    
    - <Convention, stated as an instruction>. Seen at `<path>:<line>`, `<path>:<line>`[; asked for in review: <comment link>, <comment link>].
    • paths is the narrowest set of globs where the convention holds, such as "src/**/*.{ts,tsx}" for a component convention. Leave paths out only for a convention that truly applies to every file (naming, sometimes). When each loads: reference/rules-files.md.
    • Every bullet ends with its citations. A bullet without one gets cut.
    • Record what the code does, not what it should do. A convention you'd argue against still goes in as found; raise the disagreement in the report.
  7. Report: the files written, each with its convention count; the areas marked no convention found; any conventions with notable counter-examples, which are the candidates for a cleanup; and each review-comment convention with its cheapest enforcement.

Rules

  • A convention is only as good as its citations. Read each cited line before writing it down.
  • Never overwrite an existing file under .claude/rules/conventions/ without showing the diff and asking.
  • Commit nothing. The user reviews the rules first.

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.