Prose self check

From rjmurillo/ai-agents · View interactive version

Prose self check is an AI agent skill from the GitHub repository rjmurillo/ai-agents. Pre-emit AI-vernacular self-check an agent runs on its OWN prose before writing a session-log narrative, ADR context section, retrospective, or PR description. Four layers ordered by reader-trust, not ease of detection. Use when you say `prose self-check`, `audit my writing for AI tells`, `does this

How to use this skill

Skill file

Prose Self-Check

Run this on prose you are about to emit. It catches AI-vernacular tells before

the artifact lands. It audits your OWN output, not human-authored text. It does

not touch code style (that is style-enforcement).

The layers are ordered by reader-trust, not by ease of detection. The cheap

keyword signal (Layer 1) and the real reader-cited signal (Layers 2-4) point in

different directions. Weight structural and semantic findings above lexical.

Empirical ranking from a public 89k-post study (John Carter, "I pulled ~90,000

Reddit posts about what makes writing sound like AI (Part 2)," r/ClaudeCode,

2026-06-22): em-dash 7.1% of reader cites, flat rhythm 4.0%, "not X, it's Y"

2.8%. Top keyword matches (however, moreover, nuanced) are ~0% reader-cited.

Triggers

When To Use

Run before emitting any prose artifact: session-log narrative, ADR context

section, retrospective, PR body, issue body, design doc, agent-authored comment.

Skip for: code (use style-enforcement), pure data/config files, human-authored

text you were asked to preserve, and one-line acknowledgements with no prose.

Process

Layers 1 to 3 are pattern matches over text, so scripts run them. Layer 4 is

the one no scanner can do, and it is where your attention belongs.

Start by running both helpers over the artifact:

( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/prose_lint.py FILE; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )
( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/burstiness.py FILE; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )

prose_lint.py covers Layers 1 and 2 and exits 1 on any high-severity

finding. Fix what it reports, re-run until it exits 0, then do Layer 4 by

hand. Do not scan for these tells by eye; you will miss some and spend

attention you need for Layer 4.

Layer 1: Lexical (weakest signal)

prose_lint.py runs this layer. It reports two tiers, and the tiering is the

point:

(U+2013), model-identity phrases (as an AI language model), and the

strongest tells in the banned list. Remove every one.

readers rarely cite. The script reports them so Layer 4 can adjudicate:

a flagged word inside a paragraph that makes a real claim stays; one

inside filler goes with the filler. A blanket scrub here produces the

"robot pretending not to be a robot" over-correction and reads worse. The

exact low-signal set is the LOW_SIGNAL_WORDS constant in the script.

The canonical word list is NOT duplicated in this skill or in the script. It

lives in one place, the "Banned Vocabulary" section of .claude/rules/voice.md,

and prose_lint.py parses it from there at runtime. A forked list drifts.

The dash ban is also a hard repo rule (.claude/rules/universal.md MUST NOT

5). The script verifies it at the character level, so no eyeballing is needed.

Layer 2: Structural

Sentence- and paragraph-shape tells. These are the #1 reader-cited

sentence-level signals and survive any keyword pass. prose_lint.py detects

the three that have a fixed shape:

X, it's Y / X isn't about Y, it's about Z`. The single most-cited sentence

tell. Rewrite to state the claim directly.

new, uninvited scope (Want me to also, I could also, `Let me know if

you'd like`). Delete it. (Mirrors the STOP-TOKEN rule in CLAUDE.md.)

Look, / Let's dive in / It's worth noting that / `In today's

landscape`. Delete the opener; lead with the point.

Two shapes stay yours because judging them needs the meaning, not the string:

carries the meaning ("fast, reliable, and scalable"). Cut to the

load-bearing term. Whether the third term is padding or content is a

reading, not a match.

("Speed: it is fast.") when the bold adds nothing. Drop the label or

fold into prose. The same shape is correct when the label is a real index

into a set, which is why the script does not flag it.

Layer 3: Distributional (proxy only)

Two reader-cited tells invisible to keyword passes. Use the proxies below; a

classifier (Pangram, GPTZero) is OUT of scope because it cannot run in-agent.

uniform sentence length. Human prose varies. Compute the spread of sentence

lengths in the artifact; if they are all within a narrow band, break some up

and run others together. Use the helper:

( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/burstiness.py FILE; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )

It prints sentence count, mean length, standard deviation, and a flat-rhythm

warning when variance is low. The warning is a prompt to vary rhythm, not a

hard gate.

with near-zero of these is usually saying nothing (feeds Layer 4). The same

helper reports a concreteness count.

Layer 4: Semantic (emptiness gate)

The top-5 tell no scanner sees: fluent text that says nothing. For each

paragraph, name the one disagreeable claim it makes, the thing a reasonable

reader could push back on. If you cannot name it, the paragraph is filler.

Either give it a real claim with evidence or cut it.

This is where low-signal Layer 1 words get adjudicated: a comprehensive

inside a paragraph that survives the emptiness gate stays; one inside filler

goes with the filler. The tiers are intersected with the voice rule, so a

low-signal word the rule does not ban (however, thus today) stays dormant

and never reaches you.

Output

After running all four layers, the artifact should:

lexical tells, no contrast framing, no manufactured trailing offer, and no

signposting opener.

Report what you changed, layer by layer, so the next reader can audit the pass.

Anti-Patterns

exactly; hand-scanning is slower, misses matches, and spends the attention

Layer 4 needs.

clean exit says nothing about whether the prose says anything.

overcompensating. Cut a low-signal word only when Layer 4 also fails.

lives in .claude/rules/voice.md; the script parses it from there.

Scripts

prose_lint.py

Layers 1 and 2. Reports dashes, banned vocabulary (parsed from the voice

rule), contrast framing, trailing offers, signposting openers, and

model-identity phrases. Fenced code blocks and inline code spans are skipped.

Usage:

( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/prose_lint.py FILE [FILE ...]; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )
( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/prose_lint.py - < draft.md; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )
( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/prose_lint.py FILE --json; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )
( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/prose_lint.py FILE --rules PATH; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )

Each finding prints as FILE:LINE:COLUMN: SEVERITY: KIND: MATCH (note).

- reads stdin, which is how you check a draft that is not a file yet.

Every run ends with what it examined, not only what it found: `0 findings in

N prose line(s) of M in K file(s)`. A fence that never closes hides the rest

of the document from the scanner, so it is reported as its own high-severity

unterminated_fence finding rather than letting a barely-read file exit 0.

Add --docs-style for documentation pages. It also reports heading-case

(a heading not in sentence case), link-text (text such as "this link" or a

bare URL), vague-opener (a section that opens "This is ..."), example-email

(an address outside example.com, example.org, and example.net), and

token-shaped (a string shaped like a GitHub, Anthropic, or AWS credential).

All five are info severity and never change the exit code. The last two also

read fenced code, because examples live there.

Layer 2 matches across the whole document, so a tell that straddles a hard

wrap is still caught. A blank line ends the match: the shapes are sentences,

not paragraphs.

The voice rule is discovered in this order: --rules, then

$CLAUDE_PLUGIN_ROOT/rules/voice.md, then

$COPILOT_PLUGIN_ROOT/instructions/voice.instructions.md, then

.claude/rules/voice.md or .github/instructions/voice.instructions.md

under the current directory, then rules/voice.md or

instructions/voice.instructions.md under the plugin install root (the

directory holding .claude-plugin/plugin.json). When no copy is reachable the script warns on stderr and runs the dash

and structural checks only, so a vendored install degrades instead of failing.

Exit codes (ADR-035):

burstiness.py

Layer 3 helper. Computes sentence-length variance (burstiness) and a

concreteness count (numbers, file paths, multi-word capitalized entities) for a

prose artifact. It is a proxy, not a gate.

Usage:

( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/burstiness.py FILE; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )
( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/burstiness.py FILE --json; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )

It prints sentence count, word count, mean and standard deviation of sentence

length, coefficient of variation, concreteness count, and a flat-rhythm warning

when variance is low and there are at least four sentences.

Exit codes (ADR-035):

Verification

( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/prose_lint.py FILE; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )
echo "exit=$?"   # 0 = Layers 1-2 clean, 1 = findings, 2 = bad input
( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/prose-self-check/scripts/burstiness.py FILE; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )
echo "exit=$?"   # 0 = analyzed, 2 = bad input

The gate is your own four-layer pass, not the script. The script supports

Layer 3; Layers 1, 2, and 4 are judgment applied against voice.md and the

patterns above.

Evidence

like AI (Part 2)," r/ClaudeCode, 2026-06-22 (unslop-ai-text scanner +

600-post hand-audit). Establishes the cited-vs-keyword divergence.

Related Skills

| Skill | Relationship |

|-------|--------------|

| style-enforcement | Code style; this skill is prose only |

| prompt-engineer | Authors prompts; does not audit emitted prose |

| doc-accuracy | Doc factual accuracy; orthogonal to vernacular |

References

Vocabulary" section).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.