agentleFS
vale-clivale-cli/agent-tools/skills/rule/SKILL.md

rule

Skill10 starsChanged 11 days agoMITView on GitHub

Write a Vale rule for a project's own style and prove it with vale test. Use when the user says "add a rule for", "flag this phrase", "enforce our style guide", "write a vale rule", or wants a house convention checked automatically.

4 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. raphaelsalaja/skills★ 72same name
    2. officialunofficial/skills★ 7same name
    3. Jhonnyr97/JevGuard★ 2same name
    4. sanmidable/skills★ 2same 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 repository12 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    1. Check that no rule already does it: Search the synced styles before writing a duplicate:

    line 34
  2. Very specific:

    If an installed rule covers it at the wrong level, changing the level in .vale.ini is the whole job.

    line 41
  3. Distinctive:

    Write the message for the writer who will read it in a pull request: what to do, and why.

    line 78
  4. Very specific:

    4. Enable the style: if it is new, by adding it to BasedOnStyles in the sections that should have it, and make sure git tracks it: git …

    line 81
  5. Very specific:

    Read the hits. Each false positive becomes an absent case first and a fix to the rule second.

    line 102
  6. Very specific:

    Do not start at error: Start at warning or suggestion, and let the team raise it once the backlog is gone.

    line 120

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “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

Write a rule and prove it

When to use this

The project has a convention no installed style checks: a banned phrase, a preferred term, a heading format. The output is one rule file, its test cases, and a passing vale test.

This is for one convention stated in conversation. Other cases have their own skill:

  • A product name that spell check flags is not a rule. Use vocab.
  • Heading case, contractions, a preferred term, or a regional spelling already has a tested template. Use tune.
  • A whole written style guide goes through from-guide, which sorts every statement before writing anything.

Prerequisites

  1. vale ls-config resolves and lists the project's styles directory.
  2. vale --version is v3.24.0 or later, which is where vale test arrived. On an older version, say so and verify by linting a sample file instead.
  3. You have the convention in the user's words, with one sentence that breaks it and one that must not. Ask for both if they are missing — the second is the one people forget, and it is the one that finds false positives.

Workflow

1. Check that no rule already does it. Search the synced styles before writing a duplicate:

grep -ril "<phrase>" styles/

If an installed rule covers it at the wrong level, changing the level in .vale.ini is the whole job.

2. Pick the check type. Most house rules are one of three:

the conventionextends
"never write X"existence
"write Y, not X"substitution
"this heading or term is cased like so"capitalization

The rest — occurrence, repetition, consistency, conditional, metric, readability, spelling, sequence, script — are at https://docs.vale.sh/checks/existence.md and its siblings. Read the page for the type you choose before writing its keys from memory.

3. Write the rule in the project's own style folder, with its cases beside it. Never under a synced package: vale sync overwrites those.

# styles/House/Simply.yml
extends: existence
message: "Remove '%s': it tells the reader the step is easy, and it may not be."
level: warning
ignorecase: true
tokens:
  - simply
  - just
tests:
  - name: flags the word
    input: Simply run the installer.
    contains: "'Simply'"
  - name: leaves code alone
    input: Run `just build` first.
    absent: House.Simply

Write the message for the writer who will read it in a pull request: what to do, and why.

4. Enable the style if it is new, by adding it to BasedOnStyles in the sections that should have it, and make sure git tracks it: git check-ignore -v styles/House/Simply.yml should print nothing. If it prints a rule, add !styles/House/ under styles/* in .gitignore.

5. Run the cases.

vale test --coverage styles/House

A rule that matches nothing loads, runs, and reports success; --coverage fails when a rule produced no alert in any case. Name the directory: without it, every rule in the synced package counts as untested.

6. Run it on the real corpus, alone.

vale --filter='.Name == "House.Simply"' --output=line <path>

Read the hits. Each false positive becomes an absent case first and a fix to the rule second. Report the count before settling the level: a new rule at error with four hundred hits breaks a blocking CI job the day it merges.

7. Report.

Vale rule
=========
Rule:       styles/House/Simply.yml (existence, warning)
Cases:      4 passed
On docs/:   37 alerts in 12 files, 0 false positives in the 20 read
Enabled in: [*.md]

Do not

  • Do not ship a rule without a case that fires and a case that must not.
  • Do not start at error. Start at warning or suggestion, and let the team raise it once the backlog is gone.
  • Do not edit a synced style to change its rule. Switch that rule off in .vale.ini and write the replacement in the project's own style.
  • Do not reach for sequence or script first. A token list covers most conventions and is the form the next person can read.

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.