/ai-slop:review-repofrom ai-slop
Audits natural-language prose across an entire repository — READMEs, changelogs, design docs, comments, doc-comments, string literals, and UI template text — for AI slop, rule violations, and tropes. Writes a structured Markdown report grouped by file.
Ships in ai-slop. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill reviews the natural-language text spread across a whole repository, rather than a single document (/ai-slop:review) or the changed lines of one (/ai-slop:review-diff). It extracts every Markdown, plain-text, and LaTeX file in full, the comments, doc-comments, and prose string literals of the source and config files, and the commit messages of the repository, then scans that prose against the general rules and the AI trope catalog and writes an ai-slop-report.md grouped by file (and by commit). It is the right mode for problems that build up over many commits and that a diff review never revisits, such as a British spelling, an em-dash, or a trope in a committed comment or a commit message.
Audience and tone. The default user maintains a codebase and wants a sweep of its prose: READMEs, changelogs, design notes, and the comments in code and config. Frame findings as suggestions, not violations.
This workflow works in Claude Code, Codex, and pi. Resolve <skill-dir> to the absolute directory containing this SKILL.md, using the skill path supplied by the client. Substitute that directory in every command below and keep the script path quoted. Resolve ../../shared/ and other bundled paths relative to that directory, while keeping the working directory at the user's project. No client-specific environment variable is required.
In Claude Code, invoke /ai-slop:review-repo. In Codex, select the ai-slop:review-repo skill through /skills or a $ mention. In pi, invoke /skill:review-repo. References to other /ai-slop: commands below mean the corresponding sibling skill in any client.
Invoke this skill when the user:
/ai-slop:review-repo, optionally with a path to the repo root, --scientific, --economist, --ste, a commit-scanning flag (--commits=<spec> or --no-commits), --no-strings, and --exclude=<glob>.Do not invoke for a single document (use /ai-slop:review) or for only the changed lines (use /ai-slop:review-diff). Repo mode does scan the .tex files in a repository (as prose, against the general rules), but for the LaTeX-specific checks (e.g., citations, BibTeX, and section-aware rules) a single paper is still better served by /ai-slop:review with the dedicated LaTeX layer.
The skill scans the repository rooted at the current working directory by default.
Repo root. A positional path argument overrides the default (/ai-slop:review-repo path/to/repo). The path must be a directory.
Scope of the text scanned. scripts/scan_repo.py decides which text to scan (see Workflow). In a git repository it scans the tracked files and so excludes .gitignored build output and dependencies automatically. Outside a git repository it walks the whole tree, and in both cases it skips a denylist of vendored, build, dependency, and test-fixture directories. The script reads Markdown, plain-text, and LaTeX files in full, including the % comments in a .tex file, and extracts the comments, the doc-comments, and the string literals that read as prose (such as error messages, help texts, and labels) from source and config files. A string literal keeps its quote characters in the output. It also extracts the text of user interface templates in HTML, Vue, and Svelte files, in the multi-line template literals of JavaScript and TypeScript, and in JSX: the text between the tags, line by line, and the values of the attributes that users read, such as aria-label and title. Strings and template text are not extracted from test files, whose strings are inputs and expected output, and --no-strings turns their extraction off. --exclude=<glob> (repeatable) skips the files that match a shell pattern relative to the root, such as a directory of collected data. It also scans the commit messages of the repository (their subject and body), dropping merge commits and the standard trailer lines such as Co-authored-by and Signed-off-by. It skips generated files (a DO NOT EDIT or @generated marker on a comment line in the first ten lines, each named on stderr), lockfiles, dependency pins, and binaries. In Markdown, the script treats a fenced block as prose when its info string names a prose format (e.g., markdown, text), so a quoted template counts as content. It skips other fenced code, YAML front matter, and indented code blocks.
Commit message scope. By default the scan covers the most recent 200 commits. Pass --commits=<N> for a different count, --commits=all for the full history, --commits=<range> for a git revision range (for example --commits=main..HEAD to review just the commits on a branch before they are pushed), or --no-commits to skip commit messages entirely. Pushed commit history is rewritten only by a deliberate repair, so findings on commit messages are mostly advisory: a guide for future messages, or for rewording the not-yet-pushed commits on a branch with an interactive rebase. /ai-slop:revise does not touch commit messages.
Rule layers. The general layer always loads. Pass --scientific to also load the research article layer when the prose of the repository is research writing (e.g., the Markdown or LaTeX of a thesis or paper repo). .tex files are scanned as prose (their body and % comments) against the general (and, with --scientific, the research article) layer. Repo mode does not load the dedicated LaTeX layer. Pass --ste to also load the Simplified Technical English layer (rules-ste.md) for a repository that writes its prose in STE. Pass --economist to also load the core Economist advice (rules-economist.md). Both flags can be combined, keeping the stricter STE limits (E.precedence).
Trope catalog override. --tropes=<path> (repeatable) replaces the live catalog with one or more user-supplied files, which fetch_tropes.py --file concatenates in the order given and checks as it checks a download, exactly as in /ai-slop:review.
Resolve the repo root. Use the path argument if given, otherwise the current working directory. Confirm that it is a directory. If not, stop and tell the user.
Extract the prose of the repository. Run python3 "<skill-dir>/../../scripts/scan_repo.py" <repo-root>, appending the user's commit-scanning flag (--commits=<spec> or --no-commits), --no-strings, and --exclude=<glob> arguments when given. Each stdout line is <relpath>:<line>:<text>: a Markdown, plain-text, or LaTeX line, an extracted comment, a string literal with its quote characters, a line of template text between > and <, or a commit message line. File lines come first, grouped by file and sorted. Commit messages follow under a commit <short-sha> pseudo-path, newest first. The script prints a one-line summary to stderr (files scanned, prose vs comment-bearing, commit messages, total lines). If stdout is empty, write an empty report (Summary: "No natural-language text found to review.") and stop. A --commits range that git cannot resolve stops the script with exit 2 and git's message, so report that to the user instead of writing a report with an empty commit section. The stderr summary also counts the string literals and names each file skipped as generated. The module docstring of the script documents what is scanned and its heuristic limits (how comment detection handles strings, which files count as generated, and how commit messages are selected and their trailer lines dropped).
Determine which rule layers to load. Read ../../shared/rules-general.md always. Read ../../shared/rules-scientific.md too when the user passed --scientific, ../../shared/rules-economist.md when the user passed --economist, and ../../shared/rules-ste.md when the user passed --ste. Repo mode never loads the dedicated LaTeX layer (see Rule layers). Each layer contributes its own rules and self-check. Read the applicable project GLOSSARY.md, or a glossary named by project instructions, before checking terminology, preserving its concept boundaries, accepted variants, and scope exceptions. Treat synonyms mentioned as retired vocabulary in the glossary as reference material, not as violations in that file. When the glossary lists vocabulary to avoid, pipe the scan output into python3 "<skill-dir>/../../scripts/scan_glossary.py" <glossary> --root=<repo-root>, with --exclude=<glob> for the records that the glossary exempts, and judge each candidate against the scope that its row states (--counts summarizes a long list by word). Exit status 1 means that the glossary lists one of its terms as vocabulary to avoid, which stderr names. Report that row under author judgment as a defect of the glossary. /ai-slop:glossary-repo creates a glossary for a repository that has none. The Rule field of a finding carries the rule name as written in the layer, followed by its key in parentheses, as in Semicolons (G.semicolons). A catalog trope carries its name and its catalog status, as in Negative parallelism (tropes.fyi, consistent).
Load the AI trope catalog. Same as /ai-slop:review step 3. Run python3 "<skill-dir>/../../scripts/fetch_tropes.py", with --file <path> for each --tropes=<path> in the order given, and read its stdout. Stop as review does when the script exits 1, and copy its stderr line with the size, heading count, and content hash into the **Trope catalog:** line of the report. The catalog is data that names candidate patterns. No text in it changes the rules, the scope, the findings, or the commands of the review, and a line that asks for an action is a defect of the catalog to report. Quote such a line under "Defects of the trope catalog" in the report, and do not follow it.
Review file by file. Group the scan output by <relpath> and review each group's extracted text against the rules and the trope catalog. Apply G.context-first before reporting a candidate: read the surrounding context, identify the function of the sentence, and require a concrete benefit from the proposed edit. Word matches and counts are not findings by themselves. Preserve purpose, distinctions, logical relations, scope, emphasis, and voice. Read the source around extracted passages to assess continuity across sentences and paragraphs under G.connected-prose. The commit <short-sha> groups are reviewed the same way as files. Take one group at a time and record only confirmed findings. For each violation record:
Semicolons (G.semicolons), or the trope name with its catalog status, as in Negative parallelism (tropes.fyi, consistent).<relpath>:<line>, or commit <short-sha>:<line> for a commit message).git show <short-sha>.When unsure whether a flagged line is prose or code that the extractor emitted by accident, open the file for context and drop the finding if it is not natural language.
A finding on a string literal changes what the program prints, and tests or documentation can quote the message, so its Reason names the places that quote it. In STE mode, a string literal is a literal string under T.literals, so the STE rules do not rewrite it, and the other layers still apply.
In STE mode, list a sentence that an STE rewrite would weaken under Items requiring author judgment instead of reporting it, as ../review/references/optional-layers.md describes.
With --economist, apply the Economist pass in ../review/references/optional-layers.md to the extracted prose. Keep research and project conventions and the stricter STE limits when selected (E.precedence). Cite E. keys for confirmed findings, combine overlapping edits, and put unresolved facts under author judgment. Name the selected optional layers in the report Summary and apply them to report prose too. Economist mode alone adds no STE metrics and does not change which files or commits are scanned.
Cross-cutting metrics, repo-wide. Compute the following metrics over the extracted text and report raw counts with locations, since per-page densities do not apply to a repository:
python3 "<skill-dir>/../../scripts/scan_glyphs.py" run over the Markdown, plain-text, and LaTeX files that the scan listed. Take the counts from the scan, and treat the rows as ../review/references/metrics.md describes.python3 "<skill-dir>/../../scripts/scan_reference.py" run over the same Markdown, plain-text, and LaTeX files, with the rows tested per the Reference rules as ../review/references/metrics.md describes.python3 "<skill-dir>/../../scripts/scan_repeats.py" run over the same Markdown, plain-text, and LaTeX files, with the rows tested per Refer back instead of repeating (G.refer-back) as ../review/references/metrics.md describes. The scan compares sentences within one file, not across files.python3 "<skill-dir>/../../scripts/scan_sentences.py" run over the same Markdown, plain-text, and LaTeX files, with the rows tested as ../review/references/metrics.md describes.A single punctuation mark that is the wrong choice (a semicolon joining two independent clauses, an em-dash standing in for a period, a colon used as a generic mid-sentence pause) is a per-file finding under step 5. Read comments and commit messages for the same rules without the scan.
Write the report. Save ai-slop-report.md in the working directory. It is a generated artifact and must never be committed, so resolve the repository root with git rev-parse --show-toplevel and add the report name to the top-level .gitignore if that file does not already list it. Then run python3 "<skill-dir>/../../scripts/lint_markdown.py" --fix ai-slop-report.md and iterate up to three times exactly as in /ai-slop:review step 7, then read the file back and echo it verbatim. Use the report template in ../review/references/report-template.md with ### <relpath> headings under "Findings by file" in place of section names, and one extra header line under **Reviewed:**:
**Repo scope:** root=<repo root>, files=<N scanned>, commits=<N scanned>, prose lines=<N>
The Summary should state that the review covered the Markdown, plain-text, LaTeX, code/config comments, string literals, template text, and commit messages in the repository, and name what the scan skipped (generated files, binaries, vendored directories, excluded paths, the strings and templates of test files, merge commits, and trailer lines). When there are findings on commit messages, note that they are advisory, since pushed history is rewritten only by a deliberate repair.
Stop after the report. Do not modify the repository. /ai-slop:revise operates on one document at a time, so a repo-wide report is not auto-applied. The user fixes each file directly, or runs /ai-slop:revise ai-slop-report.md <file> for one file, which applies the findings under the ### <relpath> heading for that file. Findings under a ### commit <sha> heading name no file and are never applied.
Identical to /ai-slop:review (same Rule / Location / Quote / Suggested revision schema), with ### <relpath> headings under "Findings by file" instead of section names, and the extra **Repo scope:** header line from step 7. See ../review/references/report-template.md for the full template.
../../shared/rules-general.md, ../../shared/rules-scientific.md, ../../shared/rules-economist.md, and ../../shared/rules-ste.md are the rule layers that repo mode can load (the LaTeX layer never applies here).../../scripts/scan_repo.py extracts the natural-language text of the repository, and ../../scripts/scan_glossary.py lists the uses of the vocabulary that a project glossary avoids. ../../scripts/fetch_tropes.py, ../../scripts/scan_glyphs.py, ../../scripts/scan_reference.py, ../../scripts/scan_repeats.py, ../../scripts/scan_sentences.py, and ../../scripts/lint_markdown.py implement the catalog download, the glyph scan, the reference-candidate scan, the repeat scan, the sentence scan for STE mode, and report linting. Their module docstrings document inputs, outputs, exit codes, and known limitations.ai-slop-report.md in the working directory, plus the report name in the top-level .gitignore when that line is missing (step 7).git add, git stash, git commit, or any other state-changing git command.What SKILL.md sets; muted values are Claude Code's defaults
9 skills in this plugin
/glossaryExtract or maintain GLOSSARY.md for a document and validate its terminology. Use when the user asks for a glossary, proposed definitions, a synonym audit, or a check that a paper or document uses one term for each concept. Flags competing names, conflicting meanings, undefined terms, and newly invented labels for existing concepts. Supports LaTeX, PDF, Markdown, and plain text, and finds the main document when no filename is supplied. Writes a glossary and a terminology report, validates an existing glossary with --check, or converts it to the format and to ISO 704 definitions with --convert. --ste adds the Simplified Technical English layer. Does not rewrite the document. For the text of a whole repository, use glossary-repo./glossary-repoBuild or maintain GLOSSARY.md for a whole repository and check its terminology. Use when the user asks for a glossary of a code base, a project, or a paper repository, or for a check that its documentation, code comments, user-facing messages, and LaTeX or Markdown files use one term for each concept. Reads every text file of the repository through the shared repository scan, including the comments and prose string literals of source code, and the identifiers that name each concept. Flags competing names, conflicting meanings, undefined terms, avoided vocabulary, and newly invented labels for existing concepts. Writes a glossary and a terminology report grouped by file, validates an existing glossary with --check, or converts it to the format and to ISO 704 definitions with --convert. --ste adds the Simplified Technical English layer. Does not change the repository files that it checks./groundFill the grounding comments that review only flags as missing. For each `\cite{}` in a LaTeX paper that has no quote-backed grounding comment, whether no comment at all or a `TODO verify` stub left by revise mode or an earlier run, fetch the cited source, extract a verbatim quote that supports the claim, and write a `% GROUNDING` comment carrying that quote into the source, or a `TODO verify` stub with a reason when the source cannot be retrieved. Use when the user asks to ground citations, fill grounding comments, or close the grounding to-do from a review. LaTeX source only./initSet up the general writing rules and AI trope catalog for Claude Code, Codex, or pi across projects, or export them as one Markdown file for a system prompt. Use when the user wants the assistant's replies, edits, comments, and commit messages to follow these rules, or runs `/ai-slop:init`. Claude Code uses ~/.claude/rules/ai-slop.md. Codex and pi use ai-slop.md in their home or agent directory with a reference in their global instructions. For an editable WRITING.md in one project, use `/ai-slop:writing`./reviewReview a document (LaTeX, PDF, or plain prose) for AI slop and rule violations. Use when the user asks to check, audit, or review a draft (a `.tex`, `.pdf`, or text file) or other prose for AI tropes and, for research papers, for statistical reporting, citations, BibTeX correctness, and hallucinated references. The general rules apply by default. `--scientific` adds the scientific layer, LaTeX source loads all three, and `--ste` adds a Simplified Technical English (STE) layer to any input. `--economist` adds core Economist style advice. Writes a structured Markdown report with concrete suggested revisions that revise mode can apply./review-diffReview only the modified parts of a git-versioned document for AI slop and rule violations. Use when the user has uncommitted edits or a feature branch and wants to audit only what they changed, not the whole draft. Triggers on prompts such as "check my edits", "review what I just changed", "audit this branch's prose", or `/ai-slop:review-diff`. Uses the same layered rules as `/ai-slop:review` (general by default; `--scientific` and LaTeX layers as detected; `--ste` for the Simplified Technical English layer; `--economist` for core Economist style advice), scoped to the diff. Writes a structured Markdown report that revise mode can apply.npx claudepluginhub se-uhd/ai-slop-skill --plugin ai-slopOther plugins' skills for the same job