/ai-slop:writingfrom ai-slop
Generates a project-local WRITING.md from layered writing rules and an AI trope catalog, then references it in AGENTS.md. Useful for setting up editable writing conventions in a repo.
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 builds a project-local WRITING.md by concatenating the layered writing rules with the AI trope catalog (fetched live from tropes.fyi), then either creates an AGENTS.md that references it or appends a reference to an existing one. Codex and pi read the reference through AGENTS.md, and Claude Code reads it through a CLAUDE.md import. All three can use the generated rules without this plugin installed and when offline.
Audience and tone. The default user is an author setting up a new project repository or retrofitting an existing one. After this mode runs, the user may edit WRITING.md to add project-specific conventions. The file is a starting point, not a synced replica of the bundled rules.
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:writing. In Codex, select the ai-slop:writing skill through /skills or a $ mention. In pi, invoke /skill:writing. References to other /ai-slop: commands below mean the corresponding sibling skill in any client.
Invoke this skill when the user:
/ai-slop:writing.Do not invoke when the user wants to audit a draft (use /ai-slop:review or /ai-slop:review-diff), to apply review findings (/ai-slop:revise), or to have the assistant follow the rules in every project (/ai-slop:init).
The skill operates on the current working directory. No arguments are required.
Optional path override. A target directory can be passed as the first positional argument. The default is the working directory.
Resolve the target directory. Default is the working directory. If the user passed a directory argument, use that. Verify that it exists and is writable.
Determine which rule layers to include. The layers under ../../shared/ are rules-general.md (always), rules-scientific.md (research article conventions), rules-latex.md (LaTeX-source mechanics), rules-economist.md (the optional core Economist advice), and rules-ste.md (the optional Simplified Technical English layer). Run python3 "<skill-dir>/../../scripts/detect_scope.py" <target-directory>. latex (the directory has a LaTeX root) includes the general, scientific, and LaTeX layers, which the helper selects with --latex. general includes rules-general.md, plus rules-scientific.md when the user passed --scientific (a non-LaTeX research article project), which the helper also selects with --scientific. --general overrides the detection and includes rules-general.md alone, for a code repository that happens to contain a paper under a subdirectory. --economist adds rules-economist.md to whatever the detection or --general chose, and --ste adds rules-ste.md for a project that writes in Simplified Technical English. Both flags can be combined, keeping project and research conventions and the stricter STE limits (E.precedence).
Write WRITING.md. Run python3 "<skill-dir>/../../scripts/build_writing.py" <target>/WRITING.md [--latex | --scientific] [--economist] [--ste] with the flags from step 2. The helper fetches the catalog from tropes.fyi and writes the whole file: a header for the contributors of the project with the skill version, the selected layers from their first ## heading onward in the order general, scientific, LaTeX, Economist, STE, and the catalog under one ## AI writing tropes to avoid section with its headings demoted one level. Do not compose or edit the file by hand. The next step depends on its exit code:
0: the file is written. The stderr line names the layers and the size of the file.1: there is no catalog. tropes.fyi is the only source and there is no bundled fallback, so stop and tell the user, rather than writing a WRITING.md with no trope catalog in it.2: a usage error, or a file that could not be read. Pass the message on and stop.3: WRITING.md already exists, and the user may have local edits that matter. Ask before overwriting (e.g., "WRITING.md already exists in this directory. Overwrite (y/n)?"). On yes, run the helper again with --force. On no, leave WRITING.md alone and continue to the AGENTS.md step.Update AGENTS.md.
If <target>/AGENTS.md does not exist, create it with this content:
# AGENTS.md
This file guides coding agents working in this repository.
## Writing conventions
Read [`WRITING.md`](./WRITING.md) and apply its rules to all prose in this repository. The file is derived from the [ai-slop-skill](https://github.com/se-uhd/ai-slop-skill) and can be edited to add project-specific conventions. Use the `ai-slop:review` or `ai-slop:review-diff` skill to audit a draft against these rules.
If <target>/AGENTS.md exists, check whether it already references WRITING.md (a substring match for WRITING.md is sufficient). If found, leave AGENTS.md alone. The reference is already in place. If not found, append the following section to the end of the file, preceded by a blank line:
## Writing conventions
Read [`WRITING.md`](./WRITING.md) and apply its rules to all prose in this repository. The file is derived from the [ai-slop-skill](https://github.com/se-uhd/ai-slop-skill) and can be edited to add project-specific conventions. Use the `ai-slop:review` or `ai-slop:review-diff` skill to audit a draft against these rules.
Preserve Claude Code loading. If <target>/CLAUDE.md does not exist, create it with # CLAUDE.md, a blank line, and @AGENTS.md on its own line. If it exists, preserve its contents and append @AGENTS.md on a separate line unless it already imports AGENTS.md or references WRITING.md. If it is a symlink to AGENTS.md, leave it alone and do not append a self-import. This keeps older Claude Code versions working and avoids depending on the client's instruction-file setting.
Respect Codex and pi overrides. If <target>/AGENTS.override.md exists, Codex and pi read it instead of AGENTS.md, even when it is empty. Preserve it and append the same writing-conventions section there if it does not already reference WRITING.md.
Lint and finalize. For each instruction file created or appended in step 4, run python3 "<skill-dir>/../../scripts/lint_markdown.py" --fix <path>. If the linter exits non-zero on any file, read its stdout findings (one per line, tab-separated <file>:<line>\t<rule>\t<message>), revise that file in place to address each, and re-run. Repeat at most three iterations per file. After the third pass, proceed regardless of what the linter reports. The lint loop is internal quality control. Do not mention lint output, rule names, exit codes, or iteration counts in the user-facing summary.
Print a summary. Tell the user what happened to WRITING.md and each instruction file (created / appended / overwritten / left alone / declined).
Stop. Do not run a review. The user can invoke /ai-slop:review separately when ready, and is expected to inspect the new files with git diff and commit when satisfied.
../../shared/rules-general.md, ../../shared/rules-scientific.md, ../../shared/rules-latex.md, ../../shared/rules-economist.md, and ../../shared/rules-ste.md are the rule layers. The scope and the --scientific, --general, --economist, and --ste flags select which layers provide the rules section of WRITING.md.../../scripts/build_writing.py assembles and writes WRITING.md (step 3). It calls ../../scripts/fetch_tropes.py for the catalog, so that the inlined catalog is current at the moment of generation.../../scripts/detect_scope.py selects the rule layers (step 2), and ../../scripts/lint_markdown.py lints the instruction files that the skill edits (step 5).--force.WRITING.md, do not append a duplicate section. Re-running this skill must be safe.WRITING.md, AGENTS.md, the Claude compatibility import in CLAUDE.md, and the reference in an existing AGENTS.override.md in the target directory.git diff and commits when satisfied.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub se-uhd/ai-slop-skill --plugin ai-slop9 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.Other plugins' skills for the same job