/ai-slop:glossary-repofrom ai-slop
Builds or maintains a repository-wide GLOSSARY.md by scanning all text files, code comments, and identifiers to detect competing names, conflicting meanings, undefined terms, and invented labels. Supports check, convert, and Simplified Technical English modes.
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.
Read the text of a whole repository to establish its concepts, record one term
for each concept in GLOSSARY.md, and check how the repository names them.
This mode is the repository counterpart of /ai-slop:glossary, which works on
one document. The glossary is maintained project content, and the terminology
report records suggestions for revising the files. Preserve distinctions that
matter to the project and the connected prose that explains them.
Resolve <skill-dir> to the absolute directory containing this SKILL.md,
using the path supplied by the client. Resolve bundled files relative to that
directory, while keeping the working directory at the user's project. Quote
script paths and do not require a client-specific environment variable.
In Claude Code, invoke /ai-slop:glossary-repo. In Codex, select the
ai-slop:glossary-repo skill through /skills or a $ mention. In pi, invoke
/skill:glossary-repo. References to other /ai-slop: commands below mean
the corresponding sibling skill in any client.
The skill reads the repository rooted at the current working directory. A
positional path to a directory overrides it. For one document, use
/ai-slop:glossary.
GLOSSARY.md at the repository root, or the
glossary that the project instructions name. --glossary=<path> selects
another path, resolved from the repository root.--check reads the existing glossary and writes only
ai-slop-report.md. If the glossary does not exist, explain that a normal
invocation creates it and stop. Without --check, the skill creates or
updates the glossary and checks the repository against it in the same run.--convert rewrites the existing glossary into the format
and its definitions into the form of ISO 704 before the check (see Convert
an existing glossary).--exclude=<glob> (repeatable) skips the files that match
a shell pattern relative to the root, such as data/*. --no-strings reads
only the comments of source files and not their string literals.
--commits=<spec> adds commit messages, which the scan leaves out by
default, with the selectors of /ai-slop:review-repo.--ste loads the Simplified Technical English layer (see Check the
repository).The skill writes the glossary (not in check mode) and ai-slop-report.md in
the working directory. It does not edit the other files of the repository.
Run python3 "<skill-dir>/../../scripts/scan_repo.py" <root> --no-commits,
or with the user's --commits=<spec> in place of --no-commits, and append
the user's --exclude and --no-strings arguments. Each stdout line is
<relpath>:<line>:<text>. The scan covers the tracked files, reads Markdown,
plain text, and LaTeX in full, and extracts the comments, doc-comments, and
prose string literals of source and config files and the text of user
interface templates, in HTML files, in the template literals of JavaScript
and TypeScript, and in JSX. Text between tags appears as >text<, and a
string literal or attribute value keeps its quote characters, which tells
both from a comment. Short strings under keys that name text, such as
label: 'Manage users', are included too, so the labels of the interface
reach the check. The module docstring of the script documents what it skips, such as generated files, test strings,
vendored directories, and binaries. Save the output to a file in the
scratchpad or a temporary directory and read it from there.
Before reading the lines, list the directories with their line counts, for
example with cut -d: -f1 <scan> | sed 's|/[^/]*$||' | sort | uniq -c. Sort
the directories into the following kinds:
AGENTS.md, CLAUDE.md), design documents,
specifications, current decision records, a codebook, the main manuscript of
a paper, and the docstrings of the main modules. Read in full the parts that
describe the product, its concepts, and its terms, and search the parts on
building, deployment, and tooling for the terms.--exclude pattern for
each data directory, and name the exclusion in the scope paragraph. If it is
unclear whether a large directory is data or project prose, ask the user.Sort a directory by what it holds, not by its name. A module named data/
that holds source code is a using source. When the using sources are too large
to read in one pass, as a guide more than about 5,000 scan lines, read them
through searches instead: the candidates that scan_glossary.py lists and a
search of the scan for the names, variants, and likely competing names of each
concept. The report names the directories read in full and those covered by
searches.
Read ../../shared/rules-general.md, especially G.one-term,
G.define-once, G.distinct-synonyms, G.definition-form, G.no-coinages,
and G.context-first, and read ../../shared/glossary-format.md. With --ste,
also read ../../shared/rules-ste.md. This mode checks terminology and does
not fetch the trope catalog or audit unrelated style. Existing project
terminology, an explicitly designated codebook, and the wording of a user
interface that the project names as its reference take precedence over a newly
proposed preference.
Identify the concepts that readers need to distinguish, such as the parts of the system, roles, data, units, states, processes, measures, and named artifacts. For each concept, collect the following:
git grep -n -i -E and by reading the declarations of the main types,
modules, configuration keys, and commandsCompare meanings before grouping names. Two subsystems can use one word for different concepts, such as "host" for a developer machine and for a production server, and related concepts, such as a session and the agent loop inside it, keep separate entries when the sources support the distinction. Where the sources leave a distinction unclear, record the competing readings as an open question instead of inventing a definition or treating the terms as synonyms.
Skip this section in check mode.
Prefer an established glossary term, then an explicit definition in a defining source, then the wording that users see in the interface and messages, then the predominant term across the repository. Do not invent a new label to replace several existing labels. A preference inferred from usage is a proposal, and an existing definition is not silently replaced when a later passage disagrees with it. Record the disagreement in the report.
Write the glossary in the format of ../../shared/glossary-format.md, with the
Code column. The scope paragraph names the directories and kinds of text that
the glossary covers, the records and data that the check skips, and the source
that decides between sources. Mark a definition as proposed unless a defining
source states it. Write each definition in the form that the format
describes, following G.definition-form: the superordinate concept without an
article, the delimiting characteristics, and notes for the rest. A definition
and its notes must preserve what counts as an instance, what it excludes, and
how it differs from neighboring concepts, without adding facts that the
sources do not give. Apply the substitution test to each definition: put it in
place of the term in a sentence of a defining source, and revise it when the
meaning changes. With --ste, write the definitions, the notes, the scope
paragraph, and the reasons in the avoid table in STE.
An existing glossary keeps its structure, its definitions, and the edits of
its authors, unless the user asks to convert it to the format or passes --convert
(see Convert an existing glossary). Add new
concepts to the matching section, with "Proposed," in the Source cell.
With --convert, rewrite the existing glossary into the format of
../../shared/glossary-format.md before the check. Without the flag, a
conversion happens only when the user asks for it.
G.definition-form: one statement
without an article that starts with the superordinate concept and names
the delimiting characteristics. Apply the substitution test to it. Move
every other sentence of the old definition into a note that starts with
"Note:", or into the documentation that the Source cell names when the note
would only repeat it. Keep every restriction and decision.scan_glossary.py <glossary> --lint --definitions and revise each
listed definition until only the exceptions of its kind remain.A term of the glossary is never vocabulary to avoid. Before finishing, run
python3 "<skill-dir>/../../scripts/scan_glossary.py" <glossary> --lint --definitions.
It exits with status 1 and names each avoided word that is also a term or a
variant of one. Remove each such word from the avoided vocabulary and state
the distinction in a note of the term, as
../../shared/glossary-format.md describes, in an existing glossary too. The
script also lists the definitions that a pattern marks as deficient, such as a
definition that contains its term or two definitions that use each other's
term. Revise each listed definition that you added or changed, unless the
exception in its kind applies, and report the others.
Check the repository against the glossary in both modes.
python3 "<skill-dir>/../../scripts/scan_glossary.py" <glossary> --root=<root> --counts,
adding an --exclude=<glob> for each record or data path that the glossary
exempts, in its scope paragraph or, in an older format, wherever it names
the exempt files. The counts show how many uses each avoided word has and
the scope that the glossary states for it, such as the Scope and reason
cell or a sense in parentheses, and the words without a use come last
with zero counts. An avoided word that is also a term is named on stderr,
left out of the counts, and reported as a defect of the glossary (below).
Without a scope paragraph, the check covers every scanned
file except the records and data. Run the scan again without --counts to
list the uses. Judge every use of a word that the glossary avoids in every
sense. For a word avoided in one sense, read enough uses to find those in
the avoided sense, searching the list for the contexts in which that sense
occurs, and report the uses in that sense. The script lists candidates, and
the scope decides each one.>text< lines and the quoted strings in the UI code).--ste, also apply T.one-meaning to
the key words of the repository that are not glossary terms, such as "run",
"check", or "issue", and report a word that takes a second meaning within
one document or one module.For each suspected synonym or new label, quote the passage that establishes the concept and the passage that uses the competing name, explain why they refer to the same thing, and state how the change helps the reader. Keep genuine distinctions, a clear reference to an established concept, and approved short forms. Do not replace ordinary descriptive wording with the full term in every sentence when the reference is already clear.
When a word appears in the avoided sense in more places than the report can list one by one, as a guide more than about 20, report a few representative uses as findings, and put the count and the files under author judgment, since the authors decide between a sweep and a change of the glossary.
Report a defect of the glossary itself as a finding on the glossary under
G.distinct-synonyms, with a suggested revision of its line:
Report a deficient definition as a finding on the glossary under
G.definition-form, with the definition rewritten in the form of the format
as the suggested revision. Run
python3 "<skill-dir>/../../scripts/scan_glossary.py" <glossary> --definitions
for the candidates that a pattern finds, and apply the substitution test to
the other definitions. The Reason names the defect and its clause of ISO 704
from the list of deficient definitions in ../../shared/glossary-format.md.
A definition that the code contradicts goes under author judgment, since the authors decide which of the two is right.
Quotations, attributed terminology, titles, external names, commands, and
identifiers keep their wording. 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, including generated files that the
scan skips, such as an API specification. In STE mode, a string literal is a
literal string under T.literals: report a competing term in it, and leave its
wording otherwise as written. An identifier that uses an avoided word or a
second name is not renamed by a suggested revision, since renaming code is a
refactoring. List it under author judgment with the files that declare it.
Read the report template in ../review/references/report-template.md for its schema, without
running the review workflow. Write ai-slop-report.md in that format, with
the repository root as **Paper:**, ### <relpath> headings under "Findings
by file", as /ai-slop:review-repo does, and the following header lines under
**Reviewed:**:
**Repo scope:** root=<repo root>, files=<N scanned>, commits=<N scanned>, prose lines=<N>
**Glossary:** <path>, <created | updated | checked>
prose lines counts the lines of the scan that the check read, after the
exclusions. Include the version from the metadata of this skill and the review
date. Each
#### Finding N contains Rule, Location, Quote, Suggested revision,
and Reason, with a rule key from the general layer (or T.one-meaning in
STE mode) and an exact quote from one line of the file, not the scan line and
without the comment leader of a wrapped doc-comment, so that /ai-slop:revise
can locate it. The Reason of a finding on avoided vocabulary names the row of
the glossary (GLOSSARY.md:<line>), and the Reason of a finding on a second
name says that the glossary does not list it. Put a supporting passage from
another file in Reason with its location.
Use Cross-cutting metrics, in place of the subsections of the template, for
the scope actually checked: the directories read in full and those covered by
searches, the excluded records and data, the counts from
scan_glossary.py --counts, and the counts of confirmed terminology issues.
Put proposed definitions, open questions, identifiers that use another name,
and uses in records under Items requiring author judgment. Write each
proposed definition in full, in the format of the glossary and with its
source, so that the authors can confirm it as written. State when no
confirmed issue was found.
The report is a generated artifact. Add ai-slop-report.md to the root
.gitignore of the repository when it is absent. GLOSSARY.md is maintained
content and must not be added to .gitignore. Do not change project
instruction files or the files that the report covers.
Run python3 "<skill-dir>/../../scripts/lint_markdown.py" <output> separately
on each written output and correct introduced Markdown errors. Read the outputs
back, then give the user their paths, the main terminology decisions, and the
open questions. Stop after the glossary and the report, without committing or
applying changes. /ai-slop:revise ai-slop-report.md <file> applies the
findings for one file.
../../shared/glossary-format.md defines the format of the glossary.../../shared/rules-general.md and, with --ste, ../../shared/rules-ste.md
hold the terminology rules.../../scripts/scan_repo.py extracts the text of the repository, and
../../scripts/scan_glossary.py lists the uses of avoided vocabulary. Their
module docstrings document inputs, outputs, exit codes, and limitations.../../scripts/lint_markdown.py lints the outputs.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
glossary, terminology, documentation-quality, code-review, ai-slop
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./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./review-repoReview the natural-language text of a whole code repository for AI slop and rule violations, covering every Markdown, plain-text, and LaTeX file plus the comments, doc-comments, user-facing string literals, and UI template text of its source and config files, not just one document or a diff. Use when the user wants to audit the prose spread across a codebase (READMEs, changelogs, design docs, the comments in code and config, and the messages that the code shows). Triggers on prompts such as "scan this repo for slop", "check the prose across the codebase", "audit the comments and docs", or `/ai-slop:review-repo`. Loads the general rules by default. `--scientific` adds the research article layer, `--ste` adds the Simplified Technical English layer, and `--economist` adds core Economist style advice. Writes a structured Markdown report grouped by file.npx claudepluginhub se-uhd/ai-slop-skill --plugin ai-slopOther plugins' skills for the same job