/vision-powers:fact-check [file-path] [--format html|md] [--lang <code>]from vision-powers
Verifies factual accuracy of a document against the codebase and git history. Extracts claims, checks each against source code, corrects inaccuracies in place, and appends a verification summary. Accepts a file path or auto-detects the most recent HTML report.
Ships in vision-powers. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Verify the factual accuracy of a document against the actual codebase and git history. Extracts verifiable claims, checks each against source, corrects inaccuracies in place, and adds a verification summary.
This is not a re-review. It does not second-guess analysis, opinions, or design judgments. It does not change the document's structure or organization. It is a fact-checker — it verifies that the data presented matches reality, corrects what doesn't, and leaves everything else alone.
--format controls which verification-summary block to inject:
| Flag | Values | Default | Meaning |
|---|---|---|---|
--format | html | md | auto | Auto-detected from the input file extension (.html → html block, .md → markdown block). Override when the input is a generic text file or when you want a markdown summary inside an HTML document |
Principle: Fact-check edits the source document in place. The format flag only governs the verification summary appended at the end — HTML summary uses KPI cards + <details> blocks, markdown summary uses a table + bullet lists. Auto-detection is almost always correct; override only for edge cases.
Determine what to verify from $1:
.html, .md, or any text document)
ls -t ${CLAUDE_PLUGIN_DATA}/reports/*.html ${CLAUDE_PLUGIN_DATA}/reports/*.md 2>/dev/null | head -1
If no reports found, inform the user and stop.Document type detection — from the filename, the same rule report-manager uses:
| Document Type | Detection | Verification Focus |
|---|---|---|
| diff-visual report | Filename contains -diff-visual | Verify against the git ref the review was based on |
| doc-visual report | Filename contains -doc-visual | Verify file references, names, architecture claims |
| plugin-visual report | Filename contains -report | Verify plugin structure, file paths, feature descriptions |
| Markdown document | .md extension | Verify file references, function/type names, behavior descriptions |
| Other | Fallback | Extract and verify whatever factual claims about code it contains |
Artifact-channel detection — after resolving the target, check whether a <target-path>.artifact.json sidecar sits next to it. Its presence means the file is a published Artifact fragment (an .artifact.html living on claude.ai), not a plain local report. This flips two things downstream: the Phase 4 gate runs --content-only (the fragment's design layer is owned by the built-in artifact-design skill, not this file's CSS), and Phase 4.5 republishes the corrected fragment to the same claude.ai URL. A local file with no sidecar takes neither branch — fact-check edits it in place exactly as it always has.
Why this isn't a channel decision: fact-check does not author reports, so there is nothing to route. It follows the target's existing channel: a local file stays local, a published fragment stays published at its link.
Determine the output language for the verification summary:
--lang <code> (e.g., --lang ko, --lang fr, --lang zh) → use that language. Any language code is validWhy: Systematic extraction prevents cherry-picking. Every verifiable claim must be identified before verification begins.
Read the target file. Extract every verifiable factual claim into 5 categories:
Skip subjective analysis: opinions, design judgments, readability assessments, severity ratings, recommendations. These aren't verifiable facts.
Why: Each claim category requires a different verification method. Using the wrong method (e.g., Grep for quantitative claims) produces false confirmations.
For each extracted claim, go to the actual source:
Naming claims — Glob + Read:
Quantitative claims — Bash git commands:
git diff --stat, git log, git diff --name-status and compare output against the document's numberswc -lBehavioral claims — Read source files:
git show <ref>:file) and working tree version to verify before/after claimsStructural claims — Grep + Read:
Temporal claims — Git commands:
git log commands to verify activity narrativeClassify each claim:
Why: Surgical corrections preserve the document's structure and style. Over-editing risks breaking HTML layout or changing the author's voice.
Use the Edit tool for surgical corrections:
Do correct:
Do NOT change:
If a section contains a factual error, fix only the factual part. If a section is fundamentally wrong (not just a detail error), rewrite that section's content while preserving the surrounding HTML/markdown structure.
Why: Transparency — readers can see what was checked, what changed, and what couldn't be verified.
Insert a verification summary into the document. Choose block type based on resolved --format (explicit flag wins, otherwise auto-detect from file extension: .html → HTML block, .md → Markdown block, other text → Markdown block).
For HTML files — insert a verification section matching the page's existing design:
<section id="verification-summary">
<h2>Verification Summary</h2>
<div>
<div>
<strong>{total}</strong>
<span>Claims Checked</span>
</div>
<div>
<strong>{confirmed}</strong>
<span>Confirmed</span>
</div>
<div>
<strong>{corrected}</strong>
<span>Corrected</span>
</div>
<div>
<strong>{unverifiable}</strong>
<span>Unverifiable</span>
</div>
</div>
<details>
<summary>Corrections Made</summary>
<ul>
<li>{description of each correction with file:line reference}</li>
</ul>
</details>
<details>
<summary>Unverifiable Claims</summary>
<ul>
<li>{claim that could not be verified and why}</li>
</ul>
</details>
</section>
Place the verification section as the last content section, before </main> or the closing layout wrapper.
Re-check the gate (HTML output only). After injecting the HTML verification section, re-run the artifact-gate on the final output to confirm the inserted summary didn't break the artifact:
node ${CLAUDE_PLUGIN_ROOT}/scripts/artifact-gate.js <report-path> [--content-only]
Pass --content-only when the target is a published Artifact fragment (the sidecar found during Target File Detection, or a filename ending in .artifact.html). The design-layer checks (density, palette, font fallback, Mermaid classDef) belong to the built-in artifact-design skill that owns the fragment, not to this file — running the full gate would false-flag it. A plain local HTML report gets the full gate (no flag), same as before.
If the gate flags violations, fix them inline (max 2 retries), consistent with how the other skills handle gate output. Only do this for HTML output — the artifact-gate is HTML-only. If the summary was appended as Markdown (.md file or markdown block), skip the re-check entirely; there is nothing for the gate to validate.
For Markdown files — append at the end:
## Verification Summary
| Metric | Count |
|--------|-------|
| Claims Checked | {total} |
| Confirmed | {confirmed} |
| Corrected | {corrected} |
| Unverifiable | {unverifiable} |
### Corrections Made
- {description of each correction}
### Unverifiable Claims
- {claim and reason}
Why: a correction that only touches the local .artifact.html file leaves the live claude.ai page stale — readers still see the unverified numbers. Re-publishing to the same URL keeps the shared link honest without minting a new one.
Do this only when Target File Detection found a sidecar (or the filename ends in .artifact.html). Local files and markdown skip this entirely — there is nothing published to update, so fact-check stops after Phase 4. Mirror the report-manager republish contract (its refine step 7):
<target-path>.artifact.json for url and title.Artifact tool with file_path=<target-path>, url=<sidecar url>, and a one-sentence description. Passing url is what stacks the correction onto the same claude.ai link instead of creating a new one — a fresh session has no other handle on an existing artifact. You do not load artifact-design here: the fragment's design is already baked in, and content-only republish needs neither the load nor the grant.published_at reflects this fact-check:
node ${CLAUDE_PLUGIN_ROOT}/scripts/write-artifact-sidecar.js --report <target-path> --url <url> --title <title>
file:// path.Edge cases (same as report-manager step 7):
.artifact.html but no sidecar: an earlier publish fell back to local-only. Publish fresh (omit url) and write the sidecar for the first time.url), overwrite the old sidecar, and tell the user in one line: "New shared link published — any previously shared link now points to a stale version." Don't guess why the old link died.<section> tags.validateAuth() but the actual function is verifyAuth(), that's a correction. But don't change diagram layout or styling.Output a summary to the user:
Fact-check complete: {file path — or the claude.ai URL when a published fragment was republished}
{total} claims checked
{confirmed} confirmed
{corrected} corrected
{unverifiable} unverifiable
{If corrections were made, list the top 3-5 most significant corrections}
{If nothing needed correction, note that verification confirms accuracy}
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub leejuoh/claude-code-zero --plugin vision-powers5 skills in this plugin
/diff-visualCatch up on a git change before you review it: background on the system it lands in, the idea behind it, a literate diff of the real code, and a five-question quiz. Use when the user wants to understand, explain, walk through, get up to speed on, or visualize a diff, branch, commit, range, or PR — including agent-written code or a teammate's PR — or asks "what changed here".
/doc-visualTurn a markdown document (README, spec, ADR, design doc, research note) into a visual report with diagrams matched to each section. Use when asked to visualize, illustrate, or add diagrams to a document, or to turn markdown into a report. Takes one md file.
/plugin-visualAnalyze agent extensions and generate self-contained HTML wiki reports with security audit and architecture diagrams. Use when asked to analyze, audit, or document a plugin. Triggers on GitHub plugin URLs or local plugin paths.
/report-managerManage and refine vision-powers reports: list, open, delete, search, and refine sections. Use when asked to list, open, delete, search, or update generated HTML reports.
Other plugins' skills for the same job