mcpbeat Sign in

Docs Grounding Verifier Agent Skill

Use this skill to verify CLAIM-LEVEL grounding of a documentation page (or set of pages) against the source code. Activate when you have specific pages to check for factual accuracy -- not when sweeping a whole corpus (use docs-corpus-audit for that) and not when triaging a PR diff (use docs-sync for that). Trigger nouns: "is this doc accurate", "verify the page against the code", "fact-check this section", "any claims that drifted from source", "fact-checking", "grounding audit", "drift hunt", "claim verification". Returns per-claim verdicts (GROUNDED | PARTIAL | CONTRADICTED | UNSUPPORTED) with file:line evidence citations. Catches paragraph-level inaccuracies that page-level audit averages over -- e.g. a paragraph with 5 claims where 4 are grounded and 1 is fabricated. Does NOT modify files (returns advisory only); does NOT re-architect the docs; does NOT triage PRs.

132k tokens
context cost
the whole folder, loaded on every use
101
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
3460
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/microsoft/apm --skill docs-grounding-verifier

What comes with it

182 258 bytes besides the instruction
assets/judge-prompt.md
evals/content-evals.json
evals/run-evals.sh
evals/runs/20260527-194228/seeded-corpus/drift-install-flag/page.md
evals/runs/20260527-194228/seeded-corpus/drift-install-flag/scenario.json
evals/runs/20260527-194228/seeded-corpus/drift-policy-reject/page.md
evals/runs/20260527-194228/seeded-corpus/drift-policy-reject/scenario.json
evals/runs/20260527-194228/seeded-corpus/drift-registry-resolver/page.md
evals/runs/20260527-194228/seeded-corpus/drift-registry-resolver/scenario.json
evals/runs/20260527-194228/trigger-prompts.txt
evals/runs/proof/claims/copilot.json
evals/runs/proof/claims/install.json
evals/runs/proof/claims/pkgtypes.json
evals/runs/proof/claims/policy.json
evals/runs/proof/claims/registries.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c1.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c10.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c11.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c12.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c13.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c14.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c15.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c2.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c3.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c4.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c5.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c6.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c7.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c8.json
evals/runs/proof/copilot/evidence/docs_src_content_docs_integrations_copilot-app_md_c9.json
evals/runs/proof/copilot/judge-batch-docs_src_content_docs_integrations_copilot-app_md.txt
evals/runs/proof/install/evidence/docs_src_content_docs_reference_cli_install_md_c1.json
evals/runs/proof/install/evidence/docs_src_content_docs_reference_cli_install_md_c10.json
evals/runs/proof/install/evidence/docs_src_content_docs_reference_cli_install_md_c11.json
evals/runs/proof/install/evidence/docs_src_content_docs_reference_cli_install_md_c12.json
evals/runs/proof/install/evidence/docs_src_content_docs_reference_cli_install_md_c13.json
evals/runs/proof/install/evidence/docs_src_content_docs_reference_cli_install_md_c14.json
evals/runs/proof/install/evidence/docs_src_content_docs_reference_cli_install_md_c15.json
evals/runs/proof/install/evidence/docs_src_content_docs_reference_cli_install_md_c2.json
evals/runs/proof/install/evidence/docs_src_content_docs_reference_cli_install_md_c3.json

What it tells the agent to use

found in the instruction text
Task spawns other agents

The instruction itself

14 sections, as written by the author

docs-grounding-verifier

CLAIM-LEVEL grounding verification. Adapts the RAGAS faithfulness-eval

pattern (proven in RAG literature) to docs/code instead of generated-

answers/retrieved-context. Source code is the ground truth; docs

paragraphs are the candidate text under audit.

python-architect persona

doc-writer persona

Sibling contract

This skill is a SIBLING of docs-corpus-audit and docs-sync. The

boundary is load-bearing:

| Skill | Trigger | Scope | Granularity |

| ---------------------- | -------------------------------------- | ---------------- | --------------- |

| docs-sync | PR opened/synchronized | PR diff only | Page-level |

| docs-corpus-audit | Maintainer asks for whole-corpus pass | Entire corpus | Page-level |

| docs-grounding-verifier | Verify specific pages factually | 1..N pages | CLAIM-level |

docs-corpus-audit invokes this skill in its VERIFY phase on the

highest-risk pages of each wave. docs-sync can invoke it on the

specific pages in a PR diff. The skill is also runnable standalone.

When to activate

  • Maintainer says "verify <page> against the code".
  • An audit wave wants per-claim grounding scores for its highest-risk pages.
  • A PR review wants to confirm that prose changes are not just plausible

but actually consistent with the implementation.

  • A "fact-check" or "grounding" or "drift hunt" request.

When NOT to activate

  • Whole-corpus sweep with no specific page list -> use docs-corpus-audit.
  • PR review with mixed code+docs diff -> use docs-sync.
  • Editorial / tone review -> use editorial-owner persona directly.

Architecture (PIPELINE-of-PANELS)

PARENT
  -> [Stage 1: EXTRACT claims, fan-out PANEL]
       per page -> LLM extracts atomic factual claims as JSON
       script: scripts/extract-claims.py
  -> [Stage 2: RETRIEVE evidence, deterministic S7]
       per claim -> grep over src/ via keywords + hints
       script: scripts/retrieve-evidence.sh   (NO LLM)
  -> [Stage 3: JUDGE grounding, adversarial A7]
       per (claim, evidence) -> LLM rules GROUNDED|PARTIAL|CONTRADICTED|UNSUPPORTED
       asset: assets/judge-prompt.md
  -> [Stage 4: SYNTHESIZE]
       aggregate ungrounded -> doc-writer for fix
       re-verify after fix (A8 ALIGNMENT LOOP)

Stage 2 is the load-bearing design choice: evidence retrieval is

DETERMINISTIC (grep + AST hints), not LLM. The judge in Stage 3 can

only rule on evidence it actually receives -- it cannot hallucinate

support that the retriever did not find. This is the structural

guard against the failure mode "the LLM convinces itself the docs

match the code."

Phase 1: SCOPE

Input: list of page paths to verify (1..N). If a risk_class is

attached (e.g. "high-stakes"), prefer it; otherwise treat all as equal.

Out-of-scope:

  • Pages outside docs/src/content/docs/ or

packages/apm-guide/.apm/skills/apm-usage/.

  • Pages with no factual claims (pure editorial / landing). Skip

rather than force-extract.

Phase 2: EXTRACT (parallel)

For each page, dispatch ONE claim-extractor agent:

  • Prompt template: scripts/extract-claims.py <page> produces the

prompt and embeds the page content.

  • Returns: JSON `{"page", "claims":[{"id","text","section","keywords",

"expected_source_areas"}]}` capped at 15 claims per page.

Parallel safe; no shared state between extractors.

Phase 3: RETRIEVE (deterministic, batched)

For each claim, pipe to scripts/retrieve-evidence.sh:

  • Uses keywords + expected_source_areas to grep src/.
  • Returns one-line JSON: `{"claim_id","claim_text","evidence":[...],

"evidence_count"}`.

Sequential is fine (grep is fast). No LLM. Diagnostics on stderr,

data on stdout.

Phase 4: JUDGE (parallel)

For each (claim, evidence) tuple, dispatch ONE grounding-judge agent:

  • Load assets/judge-prompt.md.
  • Send the prompt + the tuple.
  • Returns: JSON verdict per the schema in judge-prompt.md.

Batching across claims-of-one-page into a single judge call is fine

(prompt with all tuples at once). Across pages, fan out.

Phase 5: SYNTHESIZE

Aggregate verdicts. Materialize the report:

{
  "summary": {
    "pages_verified": N,
    "claims_total": N,
    "grounded": N, "partial": N, "contradicted": N, "unsupported": N,
    "grounding_rate": N/total
  },
  "actionable": [
    {"page", "claim", "verdict", "evidence_cited", "fix_suggestion"}
  ]
}

CONTRADICTED and PARTIAL are doc-writer work items. UNSUPPORTED is

split: if retrieval_fix_suggestion is plausible, retry retrieval

with the suggested keywords; if still empty, treat as CONTRADICTED.

Phase 6: ALIGNMENT LOOP (A8)

Hand actionable items to doc-writer (one subagent per page). After

edits, RE-RUN the pipeline on the same pages. The grounding_rate

must MONOTONICALLY INCREASE between iterations or the loop has

diverged -- stop and escalate to the operator.

Ship gate

  • grounding_rate >= 0.9 on each verified page after the alignment loop.
  • Every CONTRADICTED claim cited a specific code file:line that

disproves it -- not vague "the code doesn't say that".

  • The eval-runner (see evals/) passes on the trigger evals and

the content evals before the skill is treated as production-ready.

Bundled assets

  • scripts/extract-claims.py -- Stage 1 prompt builder. --help, --schema.
  • scripts/retrieve-evidence.sh -- Stage 2 retriever. Deterministic. --help.
  • scripts/verify-page.sh -- end-to-end orchestrator. --help.
  • assets/judge-prompt.md -- Stage 3 adversarial judge prompt.
  • evals/trigger-evals.json -- 20 dispatch queries (10 should, 10 shouldn't).
  • evals/content-evals.json -- seeded-drift recall scenarios.
  • evals/run-evals.sh -- the eval-runner that turns JSON into metrics.

Failure modes guarded against

  • Hallucinated grounding: Stage 2 is deterministic; judge sees only

real evidence.

  • Adversarial weakness: Stage 3 prompt defaults to SKEPTICAL.
  • Page-level averaging: claim-level granularity surfaces partials.
  • Bundle leakage: design notes / one-time scripts stay in session

state, never in references/.

  • Phantom dependency: SKILL.md links its persona deps via relative

paths; A9 PROBE before invoking docs-corpus-audit's substrate.

  • Dispatch collision with sibling skills: trigger-eval validation

split is the ship gate (must distinguish from docs-sync /

docs-corpus-audit triggers).

Other skills for the same job

different authors, same section of the catalogue
Content Research Writer
by frostant
×10

Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Transforms your writing process from solo effort to collaborative partnership.

4k tokens
Lead Research Assistant
by frostant
×8

Identifies high-quality leads for your product or service by analyzing your business, searching for target companies, and providing actionable contact strategies. Perfect for sales, business development, and marketing professionals.

2k tokens
Notebooklm
by ZhanlinCui
×6

Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.

26k tokens scripts
Biorxiv Database
by christophacham
×4

Efficient database search tool for bioRxiv preprint server. Use this skill when searching for life sciences preprints by keywords, authors, date ranges, or categories, retrieving paper metadata, downloading PDFs, or conducting literature reviews.

9k tokens scripts
Openalex Database
by christophacham
×4

Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly works. Use for literature searches, research output analysis, citation analysis, and academic database queries.

13k tokens scripts
Uspto Database
by christophacham
×4

Access USPTO APIs for patent/trademark searches, examination history (PEDS), assignments, citations, office actions, TSDR, for IP analysis and prior art searches.

21k tokens scripts
Denario
by christophacham
×3

Multiagent AI system for scientific research assistance that automates research workflows from data analysis to publication. This skill should be used when generating research ideas from datasets, developing research methodologies, executing computational experiments, performing literature searches, or generating publication-ready papers in LaTeX format. Supports end-to-end research pipelines with customizable agent orchestration.

11k tokens
Hypogenic
by christophacham
×3

Automated LLM-driven hypothesis generation and testing on tabular datasets. Use when you want to systematically explore hypotheses about patterns in empirical data (e.g., deception detection, content analysis). Combines literature insights with data-driven hypothesis testing. For manual hypothesis formulation use hypothesis-generation; for creative ideation use scientific-brainstorming.

7k tokens

How to use it

Copy the folder

Take microsoft/docs-grounding-verifier from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.