/ai-slop:revisefrom ai-slop
Applies findings from an AI-slop review report to the source document, replacing flagged quotes with suggested revisions and inserting grounding stubs for ungrounded citations.
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 applies a previous /ai-slop:review report to the document that the review read, whether LaTeX, Markdown, or plain text. For each finding, it locates the quoted text in the document and replaces it with the suggested revision. A repo-mode report is applied one file at a time.
Audience and tone. The user has already reviewed the report and wants it applied. Trust the Suggested revision fields in the report. Do not re-derive a review or substitute your own style preference. Check that applying a suggestion in its current context preserves the argument as well as the facts. Removing a purpose statement, a meaningful contrast, an essential qualification, or an inference counts as a meaning change even when all reported numbers remain. Skip and explain such a change unless the user explicitly approved that specific change in meaning.
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:revise. In Codex, select the ai-slop:revise skill through /skills or a $ mention. In pi, invoke /skill:revise. References to other /ai-slop: commands below mean the corresponding sibling skill in any client.
Invoke this skill when the user:
ai-slop-report.md (or similarly structured report) and wants the findings applied to the paper.Do not invoke when the user wants a fresh review (use /ai-slop:review instead), or when no report file exists.
Both inputs default to the current working directory. No arguments are required.
ai-slop-report.md in the working directory. If that file does not exist, ask the user to point to the report (or to run /ai-slop:review first). The report must match the schema produced by /ai-slop:review (i.e., Findings by section or, for a repo-mode report, Findings by file, then Cross-cutting metrics and Items requiring author judgment).**Paper:** header of the report names the file that the review read. Use that path when it exists. Otherwise auto-detect a LaTeX root by running python3 "<skill-dir>/../../scripts/find_latex_root.py". Exit 0 means that the printed path is the paper. Exit 2 means that multiple candidates were printed, so ask the user. Exit 1 with no path in the report means there is nothing to edit, so stop. A Markdown or plain-text document is edited the same way as LaTeX, minus the LaTeX-only steps (following \input, the syntax check in step 3, and the grounding stubs in step 4). PDF input is not supported, since revise mode edits source text.Optional path overrides. Paths can still be passed as arguments. The first argument is the report path, and the second is the document path. For a repo-mode report, the second argument selects one file, and only the findings under its ### <relpath> heading are applied.
Read the report. Parse the finding blocks under Findings by section (or, in a repo-mode report, under Findings by file, taking only the blocks under the ### <relpath> heading that matches the document being edited). Each block has Rule, Location, Quote, and Suggested revision. Skip blocks under "Items requiring author judgment". Those blocks need human input. Blocks under a ### commit <sha> heading name no file and are listed as skipped.
Read the document. For LaTeX, open the source root and follow \input{} / \include{} to gather the full text, and note which file contains each section if the paper is multi-file. For Markdown or plain text, open the file named in the report header or on the command line.
Apply each finding. For each finding, in document order:
Quote text in the paper. Use the Location hint (file:line) to disambiguate if the same text appears multiple times.Suggested revision using the client's edit or patch tool. One edit or patch hunk per finding (do not bundle multiple findings into one edit, which makes diffs harder to review). Check the passage again after replacement, especially after splitting sentences or removing transitions. If the revision causes a loss that the user did not explicitly approve, restore the original and log the finding as skipped.Location hint does not uniquely identify one, prefer the location closest to the hint and log the ambiguity in the summary.\cite{} keys), log it as skipped with the reason rather than apply it.Insert grounding stubs (LaTeX only). For every \cite{} listed in the Grounding to-do section of the report, insert a % GROUNDING: TODO verify <key> comment on its own line directly below the line on which that \cite{} call ends (one edit or patch hunk per citation, matching the indentation of the \cite{} line). A stub placed inside the line would comment out the rest of it, and /ai-slop:ground never edits a stub on the same line as the citation. These stubs are TODO markers for a supporting quote. Never invent the quote. The author can fill them by hand, or run /ai-slop:ground, which fetches each cited source and replaces the stub with a retrieved verbatim quote. Skip and log any citation if its location cannot be matched.
Cross-cutting metrics. These metrics are aggregate counts, not individual edits. The specific instances behind them should already appear under "Findings by section" (or "Findings by file" in a repo-mode report). Do not invent new edits to balance a metric.
Summarize. Print a summary to the console with the following lists:
Quote located and replaced, plus grounding stubs inserted.Quote that could not be uniquely located or a suggestion that was unsafe to apply, with reasons.Stop. Do not regenerate the report. Do not commit the changes. The user runs git diff to inspect and git commit when satisfied.
../../shared/rules-general.md, ../../shared/rules-scientific.md, ../../shared/rules-latex.md, ../../shared/rules-economist.md, ../../shared/rules-ste.md: the rule layers, referenced only as a fallback when the user asks why a finding was flagged. Revise mode applies the suggested revisions in the report as written and does not re-derive them from the rules.../../scripts/find_latex_root.py: used by the Inputs section to locate the LaTeX root.Revise mode does not load the trope catalog at runtime. The report already contains every suggested revision, so no trope source is needed.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
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