一键导入
docs-review
Review and fix language correctness and formatting in documentation files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review and fix language correctness and formatting in documentation files.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Compare two nightly GitHub Actions runs and classify failures as new, persisting, or fixed
Stash local changes, pull latest main, and display a structured commit summary. For tt_forge_models uplift commits, shows the affected models from the submodule log.
Analyze a PyTorch model, then design and implement an optimal multi-device sharding strategy for Tenstorrent hardware that minimizes collective-communication (CCL) ops. A strategy is both which parallelism to use (tensor / sequence / data) and how to shard under it - e.g. Megatron column→row is one of several tensor-parallel schemes. Use whenever the user asks to shard a model, distribute it across devices, write Shardy annotations, reduce CCLs, or analyze a model for tensor/sequence parallelism. Trigger even when the user only says "sharding strategy" or names a model with a device count, without asking for a full plan.
Analyze CI benchmark workflow runs from GitHub Actions for the tt-xla project. Produces a markdown report covering failed jobs (with root-cause error extraction via logs and Glean), successful model performance metrics (samples/sec, TTFT, device perf), perf regressions/improvements vs previous nightly, and the full dependency commit chain (tt-xla, tt-mlir, tt-metal). Use this skill whenever the user wants to analyze a CI run, review nightly benchmark results, investigate CI failures, check benchmark performance from a workflow run, or asks about "latest nightly" results. Also trigger when the user pastes a GitHub Actions run URL or mentions a run ID in the context of performance analysis, or asks about perf regressions.
Triage one tt-forge-models training test failing with a bfloat16 dtype-mismatch RuntimeError (e.g. "mat1 and mat2 must have the same dtype, but got Float and BFloat16", "'<op>' not implemented for 'BFloat16'"). For cross-dtype operands, attempts a minimal loader fix propagating `dtype_override` into the offending tensor constructor, then re-runs CPU + pytest and updates the YAML (passing -> EXPECTED_PASSING; new failure -> KNOWN_FAILURE_XFAIL). For op-not-implemented (no PyTorch kernel), goes straight to KNOWN_FAILURE_XFAIL with the verbatim error. Updates every training entry sharing the affected loader. Never edits inference YAML or `dynamic_loader.py`.
Triage one tt-forge-models training test stuck at FAILED_FE_COMPILATION with reason "tt-forge-models doesn't implement unpack_forward_output for this model." Inspects the model's forward output, registers a handler or writes a per-loader override, and updates the YAML.
| name | docs-review |
| description | Review and fix language correctness and formatting in documentation files. |
| disable-model-invocation | false |
| allowed-tools | Read, Grep, Write, Edit, Bash |
| context | fork |
| model | opus |
--base <ref> (optional): Scope review to documentation files on the current branch when compared to .--all (flag): Review the entire docs/ directory tree.--no-edits (flag): Don't fix anything; provide a list of editing suggestions as output.Use this skill whenever the focus is on the written English of documentation text,
not its technical accuracy / content. It targets prose found in Markdown (.md),
reStructuredText (.rst), and plain text (.txt) files found exclusively under
the docs/ directory tree.
Trigger this skill when the user:
Do not use this skill for:
Resolve the set of files to review based on the flags.
Only files under docs/ with a .md, .rst, or .txt extension are eligible.
Anything outside that tree or with a different extension must be filtered out, even if it appears in a diff.
Apply the flags in this order of precedence:
--all -- list every eligible file under docs/:
git ls-files 'docs/**/*.md' 'docs/**/*.rst' 'docs/**/*.txt'
If --all is set, ignore --base.
--base <ref> -- list eligible files that differ between <ref> and HEAD:
git diff --name-only <ref>...HEAD -- 'docs/**/*.md' 'docs/**/*.rst' 'docs/**/*.txt'
Verify <ref> exists first (git rev-parse --verify <ref>); if it does not, stop and report the error.
Default (no flags) -- list eligible files with uncommitted changes (staged or unstaged) relative to HEAD:
git diff --name-only HEAD -- 'docs/**/*.md' 'docs/**/*.rst' 'docs/**/*.txt'
git ls-files --others --exclude-standard -- 'docs/**/*.md' 'docs/**/*.rst' 'docs/**/*.txt'
Union both lists so newly added untracked files are included.
After resolution:
Load the content of every file in the resolved set. Use the Read tool,
not cat or shell pipes, so line numbers are preserved for later citation.
Two pieces of content matter for each file:
ambiguous-pronoun whose antecedent is in the previous sentence).--base and default modes. Collect the diff so the review can prioritize lines the user actually touched:
# --base mode
git diff <ref>...HEAD -- <file>
# Default mode (uncommitted, staged + unstaged)
git diff HEAD -- <file>
For untracked new files in default mode, treat the entire file as "changed."When reading, identify and exclude the following regions from prose review -- they are not English text and must not be edited:
``` in Markdown, .. code-block:: in RST, indented code blocks).`like this`).https://... part, not the link text).<!-- ... -->) unless they contain user-facing prose... note::, :ref:`...`), except for the prose inside them.Keep a per-file map of {line_number -> text} for the reviewable lines only.
Findings in later steps must cite these line numbers so the user can locate them.
In --all mode, the review covers the full reviewable text of every file.
In --base and default modes, the review prioritizes lines inside changed hunks,
but may flag issues on adjacent unchanged lines when they are part of
the same sentence or paragraph as a changed line.
For every reviewable line in the per-file map, evaluate it against the rules in the Language rules section,
and against the Markdown rules section when the file is a .md file.
For .rst and .txt files, only the language rules apply.
Each violation becomes a finding. A finding has the following fields:
file -- path relative to the repository root.line -- 1-based line number from the per-file map. Use a range (e.g., 42-45) when the violation spans multiple lines.rule -- the rule name from the rules section (e.g., active-voice, serial-comma, dangling-modifier).
Use a stable, kebab-case identifier so findings can be grouped.severity -- one of:
error -- objective language violation: grammar, subject-verb agreement, punctuation errors, misspellings, broken Markdown syntax.warning -- clarity or consistency issue: passive voice in a how-to step, inconsistent terminology, an undefined acronym.
The text is understandable but worse than it could be.info -- stylistic preference: a shorter synonym is available, a sentence could be tightened, a list could be parallel.
Surface only when high confidence.quote -- the exact text being flagged (verbatim, including surrounding whitespace if relevant).suggestion -- the proposed replacement text. Required for error and warning. For info, include when concrete; omit when the fix is open-ended.rationale -- one short sentence explaining which rule was triggered and why. No more than one sentence per finding.Rules for applying the rules:
error) and a style rule (info) apply to the same span,
keep the grammar finding and drop the style one -- it will be moot once the rewrite happens.info. False positives erode trust faster than false negatives.
If the rule's application is debatable in context, drop it.quote field must match the file byte-for-byte (modulo trailing newlines),
so the user can grep for it and so the fix step can find and replace it deterministically.At the end of this step, the working state is a list of findings per file, ready to be reported and (unless --no-edits) applied.
Present the findings to the user before any file is modified. The report is always emitted, regardless of whether --no-edits is set.
When fixes will be applied, it serves as a preview; when they will not, it is the deliverable.
Follow the structure defined in the Output format section. In short:
--all, --base <ref>, or uncommitted), the number of files reviewed,
and the total finding count broken down by severity (e.g., 3 errors, 7 warnings, 2 info).error -> warning -> info), then by line number. Files with zero findings are listed
once under a "Clean files" line at the end of the report; do not give them their own section.line, rule, severity, quote, suggestion, rationale) in the format
defined in Output format.Rules for reporting:
quote. Render it verbatim. If it is long, truncate with ellipses,
but keep enough on either side of the violation that the user can locate it.error findings. Each grammar or punctuation violation gets its own entry,
even if the same rule fires twice in one file.warning/info findings that share a rule and a fix pattern
(e.g., the same passive construction used in three list items): one entry, with all line numbers cited.error first, then warning, then info. This keeps high-impact issues above the fold.suggestion.After the report is rendered:
--no-edits is set, emit the closing line specified in Output format and stop here. The skill's job is done.--no-edits)This step is skipped entirely when --no-edits is set. Otherwise, walk the findings list and apply every fix
whose suggestion field is populated. Findings without a suggestion (open-ended info items) are reported
but not edited.
For each file with at least one applicable finding:
Edit tool. Use quote as the old_string and suggestion as the new_string.
This guarantees byte-accurate replacement and a clear diff.quote is no longer unique in the file (because an earlier fix introduced a duplicate), expand it
with one line of context above and below before retrying. Do not switch to replace_all -- a same-string
violation elsewhere in the file may need a different fix.Edit call fails because the quote no longer matches the file (a previous fix overlapped this span),
skip the finding and add it to a deferred list. Do not retry with a guessed replacement.Cross-cutting rules:
After all files are processed, emit a short closing report:
quote not found after prior edit).info findings that were reported but not auto-applied because they had no concrete suggestion.Tell the user to git diff to review the changes before committing.
The rules below are grouped by category. Each rule is the authoritative source for a rule identifier used in findings.
The kebab-case slug at the start of every bullet is the canonical rule value.
present-tense -- Use the present tense to describe behavior. "The function returns X" not "The function will return X."active-voice -- Use active voice over passive. "The parser reads the file" not "The file is read by the parser."second-person -- Address the reader as "you." Avoid "we" unless referring to a team decision.subject-verb-agreement -- Maintain subject-verb agreement, especially with collective nouns ("the data are" vs. "the dataset is").dangling-modifier -- Place modifiers next to what they modify. "After installing the package, run the tests" -- not "After installing the package, the tests run."parallel-structure -- Use parallel structure in lists and series. All items should share grammatical form (all verbs, all nouns, all imperatives).concrete-terms -- Prefer concrete over abstract terms. "Returns a list of users" beats "Handles user retrieval."consistent-terminology -- Use consistent terminology. Do not alternate between "parameter," "argument," and "option" for the same concept.define-jargon -- Avoid jargon unless the audience is known to understand it; define it on first use otherwise.filler-words -- Eliminate filler words: "very," "really," "quite," "basically," "actually," "simply," "just" and similar.condescending-adverbs -- Avoid "easily," "simply," and "obviously" -- what is obvious to the writer may frustrate the reader.rfc2119-keywords -- Use "must," "should," and "may" with RFC 2119 precision when specifying requirements.shorter-words -- Prefer shorter words when meaning is preserved: "use" over "utilize," "help" over "facilitate."latin-abbreviations -- Avoid Latin abbreviations (e.g., i.e., etc.) in prose; use "for example," "that is," "and so on."sentence-length -- Keep sentences under ~25 words. Break long sentences at logical clauses.one-idea-per-sentence -- One idea per sentence. Compound ideas obscure meaning.front-loaded-information -- Front-load important information. Put the subject and main verb early.nominalization -- Avoid nominalizations. "Decide" beats "make a decision"; "configure" beats "perform configuration."hedging -- Cut hedging language: "perhaps," "might possibly," "in some cases may potentially."serial-comma -- Use the serial (Oxford) comma for clarity in lists of three or more.semicolons -- Use semicolons sparingly. Prefer two sentences.dash-usage -- Use em-dashes for parenthetical asides, en-dashes for ranges, hyphens for compound modifiers.compound-modifier-hyphen -- Hyphenate compound modifiers before nouns: "command-line tool," "open-source library."list-item-punctuation -- End list items consistently -- either all with periods or all without, based on whether they are full sentences.heading-case -- Use sentence case for headings unless a project style guide mandates title case; be consistent throughout.proper-noun-case -- Capitalize proper nouns correctly: JavaScript, GitHub, macOS, npm, iOS.emphasis-capitalization -- Do not capitalize for emphasis. Use italics or bold instead.code-formatting -- Use code formatting (backticks) for identifiers, file paths, commands, and literal values.bold-italics-usage -- Use bold for UI elements the reader interacts with; italics for introducing new terms.bluf -- Lead with the conclusion (BLUF -- bottom line up front). State what the reader needs before the details.descriptive-headings -- Use descriptive headings that summarize content, not "Introduction" or "Overview."paragraph-unity -- One paragraph per idea; break when the topic shifts.list-vs-prose -- Use lists for parallel items, prose for connected reasoning.context-before-code -- Provide context before code. Explain what and why before showing how.acronym-on-first-use -- Define acronyms on first use: "Just-In-Time (JIT) compilation." Exception: universally known ones (API, URL, HTTP).ambiguous-pronoun -- Avoid ambiguous pronouns. If "it," "this," or "they" could refer to two antecedents, repeat the noun.units-and-types -- Specify units and types. "Timeout in milliseconds" not just "timeout."state-assumptions -- State assumptions and prerequisites before instructions.neutral-tone -- Be neutral and professional. Avoid humor.no-apology -- Do not apologize for the software or anticipate user errors patronizingly.avoid-idioms -- Avoid culture-specific idioms and metaphors ("hit it out of the park," "low-hanging fruit") -- they confuse non-native speakers.inclusive-language -- Write inclusively. Prefer "allowlist/blocklist," "primary/replica," and the singular "they" over gendered defaults.spelling-convention -- Pick one spelling convention (US or UK English) and apply it throughout.date-number-format -- Standardize date and number formats. ISO 8601 (2026-05-15) avoids regional ambiguity.glossary -- Maintain a glossary or style guide for project-specific terms.identifier-case-match -- Match code identifiers exactly when referenced in prose, including case.show-output -- Show output alongside commands when the result matters.realistic-placeholders -- Use realistic placeholder values (alice@example.com, not foo@bar).inline-annotations -- Annotate non-obvious lines with brief inline explanations, not multi-paragraph commentary.These rules apply only to .md files. Each rule's kebab-case slug is its canonical rule value.
single-h1 -- Use exactly one H1 (#) per file. Subsequent sections start at H2.heading-level-skip -- Do not skip heading levels (H2 -> H4). Each level descends by one.blank-line-around-heading -- Surround every heading with a blank line above and below.blank-line-around-block -- Surround lists, fenced code blocks, and tables with a blank line above and below.fenced-code-language -- Fenced code blocks must declare a language tag (```bash, ```python). Use text for plain output.consistent-list-marker -- Within a file, use one bullet marker (-, *, or +). Do not mix.link-text -- Link text must describe the destination. Do not use "click here," "here," or a bare URL as link text.bare-url -- Wrap bare URLs in angle brackets (<https://...>) or proper Markdown links. Do not paste raw URLs in prose.image-alt-text -- Every image must have non-empty alt text: .trailing-whitespace -- Remove trailing whitespace from every line, except deliberate Markdown hard line breaks (two trailing spaces).final-newline -- End the file with a single trailing newline.consistent-emphasis-marker -- Use one emphasis style per file: *italic* or _italic_, **bold** or __bold__. Do not mix.nested-list-indent -- Indent nested list items with two spaces (or four, consistently within a file). Do not mix indentation.no-raw-html -- Avoid raw HTML unless Markdown cannot express the structure (e.g., complex tables, <details>).empty-link-or-image -- Do not commit links or images with empty targets ([text](), ![alt]()).The review report is plain Markdown, emitted to the conversation (not written to a file). It has four parts in this order: a one-line header, per-file sections, a clean-files line, and a rule-frequency summary.
docs-review -- scope: <scope> | <N> files reviewed | <E> errors, <W> warnings, <I> info
<scope> is one of --all, --base <ref>, or uncommitted.<N> is the count of files that were read (clean + flagged).<E>, <W>, <I> are total finding counts by severity. Omit a category with zero count (e.g., 3 errors, 2 info).One H3 per file, in alphabetical path order. Skip files with no findings -- they go on the clean-files line.
### <path/to/file.md>
- [<severity>] L<line> | `<rule>` -- <rationale>
> <quote>
-> <suggestion>
Field rendering:
<severity> is one of error, warning, info. Render in lowercase.L<line> is the line number, or a range L<start>-<end> for multi-line findings.`<rule>` is the kebab-case rule slug in backticks.> <quote> is the verbatim offending text on its own line, prefixed with >.
> on each line.... when longer than ~120 characters, keeping the violating span centered.-> <suggestion> is the proposed replacement on its own line.
-> line when the finding has no suggestion (open-ended info items only).Within a file, sort findings by severity (error -> warning -> info), then by line number ascending.
If any reviewed files had zero findings, append one line after the per-file sections:
Clean: <count> file(s) -- <comma-separated paths>
If the path list is longer than ~10 entries, show the first 10 and append ... (+<N> more).
Close with an H3 summary, sorted by count descending, then alphabetically by rule for ties:
### Summary
- `<rule>` x <count>
- `<rule>` x <count>
Include every rule that fired at least once. This is the user's at-a-glance view of systemic issues.
--no-editsWhen --no-edits is set, end with:
No edits applied (--no-edits). Findings above are the deliverable.
When step 5 ran, emit the closing report described in that step after the rule-frequency summary, separated by a blank line. Format:
### Applied
- <path>: <N> fix(es)
- ...
Deferred (<N>):
- <path>:L<line> -- <reason>
- ...
Reported only (no suggestion): <N>
Run `git diff` to review the changes before committing.
Omit the Deferred block when zero. Omit the Reported only line when zero.