agentleFS
tbhbtbhb/vale-ai-tells/.claude/skills/fix-prose/SKILL.md

fix-prose

Skill118 starsChanged 37 days agoMITView on GitHub

Clear the vale and cspell findings on a document whose content is already settled. A forked writer does the rounds and an independent reviewer reads the result. The finding text never enters this session's context. Takes the file plus the lint command that judges it. Use it when a draft is written but its prose gates are still red, or when a lint task has come back with findings more than once.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    Use it once the document says what it should say.

    line 23
  2. Very specific:

    Read the verdict before anything else.

    line 29
  3. Very specific:

    Prefer a task that runs every checker at once.

    line 45
  4. Distinctive:

    Never edit the target yourself.

    line 67

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

Reword a settled draft until its prose lint passes

Run two forked skills against each other until the document holds up. Findings, retries, and rejected wordings stay in their context rather than this one. That's the whole reason the skill exists. A twenty-line commit message can cost four rounds of vale output, and this session needs none of it in its context.

Use it once the document says what it should say. The writer changes wording rather than claims, so a draft still arguing with itself needs its author instead.

Preflight

!bash ${CLAUDE_SKILL_DIR}/scripts/preflight.sh $ARGUMENTS

Read the verdict before anything else. BLOCKED there means no agent can help. The file is missing, no rule set covers the path, or the document is already clean. Say which and hand back.

The preflight prints counts and verdicts rather than findings, on purpose. This body loads into your context rather than a fork, so a finding printed here enters the context the skill exists to keep clear.

Arguments

$ARGUMENTS contains the file first, then the command that judges it.

COMMIT_AGENTMSG mise run lint-commit-msg
PR_AGENTDESC.md mise run lint-pr-description
docs/design.md mise run lint-draft docs/design.md

The command comes from the caller because nobody else knows which gate applies. The commit-msg scope judges a commit draft, and its own task judges a description. Anything else takes mise run lint-draft, which runs vale and cspell and rumdl together over one file.

Prefer a task that runs every checker at once. mise run lint-prose runs vale alone, so a document clearing it can still fail spelling and structure, and a verdict from that task is narrower than it sounds.

Where the arguments don't specify a file, ask which one. That first word is the path the guard protects. A run starting without it leaves the draft unprotected.

Step 1: fix

Invoke write-prose-fix. It runs forked, and its own context block hands it the findings and the document, so it starts working rather than looking.

Skill(write-prose-fix, args: "<target> <lint command>")

Pass nothing else in the arguments. The step that builds the writer's context substitutes them into a shell command line as raw text. There a semicolon runs, a parenthesis fails to parse, and an asterisk expands against the working directory. Findings text contains all three.

Where you have findings to hand over, write them to a file first and leave the arguments alone:

printf '%s\n' "<the reviewer's findings, verbatim>" > "$(git rev-parse --absolute-git-dir)/fix-prose.notes"

The writer's context prints that file and works from it. Remove it once the loop ends. The next run then starts clean.

Never edit the target yourself. A guard hook refuses it, because editing it here means reading the findings here.

It returns PROSE: CLEAN, PROSE: PARTIAL with a short unresolved list, or PROSE: BLOCKED.

Step 2: check for silenced checkers

bash .claude/skills/fix-prose/scripts/check-suppressions.sh --verify

It compares the working tree against a baseline the guard recorded at invocation. Silence means the writer edited nothing but the target. Any output identifies a file it shouldn't have changed.

This runs here rather than inside the fork because an agent certifying its own work certifies nothing. The writer runs unguarded in there, so it can edit a style file or add an inline cspell:ignore, and both produce a clean lint run over a document nobody fixed. A finding means reverting that edit and taking the original lint finding back as unresolved.

Step 3: review, and loop

Invoke review-prose-fix. It runs forked as an independent agent that didn't see the findings or the edits, and it reads the before and after against each other.

Skill(review-prose-fix, args: "<repository root> <target>")

The review exists because a clean lint run is a weak result on its own, and no gate scores a claim that moved, a name traded for a vaguer phrase, or a metaphor that arrived while somebody was clearing a rule. A document can pass every checker and come back saying something its author never wrote.

Act on its verdict:

  • VERDICT: PASS ends it. Report what changed and hand back.
  • VERDICT: CHANGES REQUIRED returns to step 1, with the findings verbatim after the --.

Bound it at three rounds. Stop after that and report which findings keep returning, because a fourth pass at the same objection rarely helps.

What to report

The unresolved list and nothing else. Each entry needs a decision that changes what the document claims, which is yours or the operator's rather than another lint round.

A rule matching correct text arrives on that list by design. The writer never turns a rule off or adds an exception, and never rewrites a sentence into nonsense to clear one. Overrule one by editing the target yourself. The guard prints its own release command for exactly that.

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.