Official agent skill

Docs Corpus Audit

by microsoft in microsoft/apm

A skill your agent uses to run a holistic regrounding pass on the entire microsoft/apm documentation corpus against current source code, page-by-page, and emit surgical fixes for stale claims.

OfficialMITAuto-check passedDevOps & Cloud

Install Docs Corpus Audit

skills CLI
$ npx skills add microsoft/apm --skill docs-corpus-audit -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/apm docs-corpus-audit --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/apm.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.apm/skills/docs-corpus-audit .claude/skills/docs-corpus-audit && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
docs-corpus-audit
GitHub stars
4k
Token cost
~2.6k tokens
SKILL.md length
857 words
Files
7 (incl. scripts, assets)
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses to run a holistic regrounding pass on the entire microsoft/apm documentation corpus against current source code, page-by-page, and emit surgical fixes for stale claims.

  • Run a holistic regrounding pass on the entire microsoft/apm documentation corpus against current source code
  • SKILL.md covers Sibling contract with docs-sync, Architecture invariants, Roster (composition, not… and Process, plus 5 more sections
  • Runs Shell scripts from its folder; calls git, uv and python
  • Emit surgical fixes for stale claims

What it does

Docs Corpus Audit is an agent skill from microsoft/apm, published by the product's own GitHub organization. Use this skill to run a holistic regrounding pass on the entire microsoft/apm documentation corpus against current source code, page-by-page, and emit surgical fixes for stale claims. Activate when the maintainer wants a WHOLE-CORPUS audit (not per-PR review) -- typical triggers include "audit the docs", "reground the corpus", "check every page against code", "pre-release docs sweep", "the docs have drifted everywhere", or "we just reshaped the TOC, find dead links". Wave-batched and S7-verified; scales to the…

Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files, including scripts and assets (for example `assets/panelist-return-schema.json`, `assets/subagent-prompt-template.md` and `evals/README.md`).

It sits in DevOps & Cloud, covering Monitoring and alerting, Pull requests and GitOps. The repository describes itself as: Agent Package Manager. The licence is MIT.

When your agent uses it

  • Run a holistic regrounding pass on the entire microsoft/apm documentation corpus against current source code
  • Emit surgical fixes for stale claims
  • Include audit the docs
  • Reground the corpus

Example prompts

  • “audit the docs”
  • “reground the corpus”
  • “check every page against code”
  • “/docs-corpus-audit”

Requirements

  • Python 3
  • A Bash shell

What it can do on your machine

Read from SKILL.md and the folder at commit 280b8a7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • uv
    • python
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, uv and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Docs Corpus Audit loads about 2.6k tokens when it runs. Until then it costs about 233 tokens; SKILL.md has 857 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~233
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from microsoft/apm at commit 280b8a7, republished under its MIT licence (© microsoft). 857 words, ~2,551 tokens.

Download SKILL.mdSave it as .claude/skills/docs-corpus-audit/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
docs-corpus-audit
description
Use this skill to run a holistic regrounding pass on the entire microsoft/apm documentation corpus against current source code, page-by-page, and emit surgical fixes for stale claims. Activate when the maintainer wants a WHOLE-CORPUS audit (not per-PR review) -- typical triggers include "audit the docs", "reground the corpus", "check every page against code", "pre-release docs sweep", "the docs have drifted everywhere", or "we just reshaped the TOC, find dead links". Wave-batched and S7-verified; scales to the full ~112-page corpus in ~10 minutes wall-time. This is a SIBLING to docs-sync, not a replacement: docs-sync is per-PR (triggered by a diff); this skill is per-corpus (triggered by a maintainer ask). They share agent personas, schemas, and the docs index, but their triggers MUST NOT collide. Does NOT auto-merge, does NOT push without maintainer review, and does NOT replace per-PR drift detection.

docs-corpus-audit -- whole-corpus regrounding pass

The docs corpus drifts silently between releases. docs-sync catches drift introduced by individual PRs at PR-open time. This skill catches the accumulated drift that slips past per-PR review -- stale flag names, dead nav links from past IA reshuffles, deprecation banners that outlived their version targets, factual claims whose source-side truth has moved.

The pattern is A1 PANEL + WAVE EXECUTION + S7 DETERMINISTIC TOOL BRIDGE + A8 ALIGNMENT LOOP + A9 SUPERVISED EXECUTION. The corpus is split into disjoint page scopes; one verifier subagent owns each scope; agents extract factual claims, S7-verify against source, apply surgical fixes inline. The orchestrator then runs an alignment-loop pass to re-verify that applied edits actually ground out true.

This skill is ADVISORY but ACTIONABLE: agents apply edits inline on a working branch. The orchestrator is the sole writer to git -- stages, commits, pushes. Maintainer reviews the resulting PR.

Sibling contract with docs-sync

These two skills share substrate. Be explicit:

Shared resourceOwnerBoth use
.apm/docs-index.yml (corpus map)docs-syncyes
doc-writer personasharedyes (per-page edits)
python-architect personasharedyes (S7 verification)
editorial-owner personasharedoptional (voice pass at scale)
cdo personasharedyes (final synthesis)
assets/panelist-return-schema.jsondocs-sync (mirrored)yes

Trigger boundary (avoid DISPATCH COLLISION):

  • docs-sync triggers on a PR event ("PR opened/synchronized", source-diff-driven).
  • docs-corpus-audit triggers on a maintainer ask for a WHOLE-CORPUS pass ("audit the corpus", "reground", "pre-release sweep") -- no PR required, no diff required, the whole corpus is the input.

If a maintainer asks "review this PR's doc impact", route to docs-sync. If they ask "audit all our docs" or "the docs feel stale everywhere", route here.

Architecture invariants

  • Wave-batched, not flat. Pages are partitioned into 6-8 disjoint scopes; each scope is one verifier subagent. Cost scales with wave size, not corpus size. A wave of 6 agents on ~10 pages each is the canonical shape.
  • Disjoint page ownership. Each subagent has EDIT AUTHORITY on its scope only. No two agents touch the same file -- guarantees no merge conflicts during fan-in.
  • S7 verification is mandatory. Every factual claim is verified against deterministic source: uv run apm <verb> --help for CLI, grep -n src/apm_cli/ for symbols, python -c "import ..." for module shape, file-existence checks for nav links. Never assert from LLM recall.
  • Surgical edits only. 1-3 line patches per drift, preserving voice. Restructuring is deferred to the orchestrator post-pass, never auto-applied by per-scope agents.
  • Single-writer interlock for git. Subagents NEVER run git commit, git push, or gh pr <write>. Orchestrator commits per wave; pushes once per session.
  • Alignment loop (A8). After waves return, orchestrator re-greps the corpus for the patterns the agents claimed to fix. Any residue triggers a targeted re-dispatch (max 2 redrafts) or is escalated to maintainer.

Roster (composition, not invention)

Reuse docs-sync's personas. Do NOT invent a one-off "grounding- verifier" role; that's R3 EXTRACT in reverse.

RolePersonaAlways active?
Per-scope verifier+editorpython-architect (S7) and doc-writer (edits), bundled into one subagent prompt per scopeYes -- one per page scope, parallel fan-out
Cross-corpus post-passorchestrator (deterministic greps via scripts/scan-cross-corpus-drift.sh)Yes -- once after waves return
Alignment-loop checkerorchestrator (deterministic re-grep + targeted re-dispatch)Yes -- once after post-pass
Voice pass (optional)editorial-ownerOnly when >20 edits to keep tone coherent
Final synthesiscdoOnce, for the PR summary comment

The per-scope subagent prompt that composes python-architect + doc-writer is in assets/subagent-prompt-template.md -- the orchestrator substitutes scope + working dir + branch and dispatches via the task tool.

Show full SKILL.md (299 more words)Show less

Process

1. PROBE (A9 SUPERVISED EXECUTION)
   - Check working tree: docs/src/content/docs/ exists?
   - Check working tree: packages/apm-guide/.apm/skills/apm-usage/
     exists? (Rule-4 backfill target. If missing, the audit cannot
     close Rule 4; ask maintainer before continuing.)
   - Check `.apm/docs-index.yml` reachable.
   - Verify on a working branch (not main).

2. RISK-TRIAGE (orchestrator, ~1 LLM call)
   - Read .apm/docs-index.yml only (NOT the corpus body).
   - Bucket pages by drift risk: HIGH (CLI ref, schemas, consumer
     flows), MEDIUM (producer, enterprise policy), LOW (concepts,
     contributing, troubleshooting, integrations).
   - Decide wave order: HIGH first, MEDIUM next, LOW last.

3. WAVE-PLANNER (orchestrator, deterministic)
   - Partition pages into 6-8 disjoint scopes per wave.
   - Each agent gets ~9 pages, mixed surface types.

4. WAVE EXECUTION (parallel, one subagent per scope)
   - Orchestrator dispatches one task per scope using the prompt
     template in assets/subagent-prompt-template.md.
   - Subagents read pages, extract claims, S7-verify, apply
     surgical edits, return JSON per the docs-sync panelist
     schema (mirrored at assets/panelist-return-schema.json).
   - Validate every return against the schema; reject malformed
     JSON.

5. CROSS-CORPUS POST-PASS (orchestrator, deterministic)
   - Run scripts/scan-cross-corpus-drift.sh to grep for patterns
     a per-scope agent cannot see (IA-reshuffle dead links, stale
     deprecation version targets, phantom flag references).
   - Patch residue inline.

6. ALIGNMENT LOOP (orchestrator, deterministic)
   - Re-run scripts/scan-cross-corpus-drift.sh.
   - Re-grep for claims the agents marked DRIFTED-FIXED.
   - If residue: targeted re-dispatch to the owning agent
     (bounded: max 2 redrafts per wave).

7. COMMIT + PUSH (orchestrator, single writer)
   - One commit per wave; structured message naming closed items.
   - Push to working branch.

8. PR + SUMMARY COMMENT (orchestrator)
   - If no PR exists: open one with the [pr-description-skill]
     (../pr-description-skill/SKILL.md).
   - Post per-wave summary comment: pages audited, drift caught,
     fixes applied, items deferred, alignment-loop residue.

Bundled assets

  • assets/subagent-prompt-template.md -- the per-scope prompt the orchestrator substitutes and dispatches. Composes python-architect (S7) + doc-writer (surgical edit). Loaded once per scope.
  • assets/panelist-return-schema.json -- subagent return schema, mirrored from docs-sync. Loaded once at wave start; validated against every return.
  • scripts/scan-cross-corpus-drift.sh -- deterministic grep sweep for cross-corpus patterns (IA dead links, stale deprecation targets, phantom flags). Non-interactive; emits structured matches on stdout, diagnostics on stderr. Run --help for pattern list. Update this script after each major IA reshuffle.

Cost model

Wave sizePagesSubagentsLLM dispatchesWall time
Small~304~5~3 min
Medium (default)~556~7~5 min
Large~110 (full corpus)12 (two medium waves)~14~10 min

Compared to docs-sync (15-call flat ceiling), this skill scales as O(waves), not O(claims), because per-agent work fits in one context window. S7 verification dominates wall-time, not LLM cost.

Boundary (what this skill does NOT do)

  • Per-PR doc-impact review -- use docs-sync.
  • Single-page typo or copy edit -- direct edit is faster.
  • Writing docs for a brand-new feature -- use docs-impact-architect and doc-writer directly.
  • Auto-merging or pushing without maintainer review.
  • Reviewing code quality, security, or test coverage (out of scope).

Evals

See evals/:

  • evals/content-evals.json -- 3 corpus snapshots with seeded drift (stale CLI flag, dead nav link, expired deprecation target); expected behavior is that the skill catches all three and applies surgical fixes that ground out true on re-verification.
  • evals/trigger-evals.json -- 10 should-trigger + 10 should-NOT- trigger queries, 60/40 train/val. The val split is the ship gate (>=0.5 should-trigger AND <0.5 should-not-trigger).
  • evals/README.md -- how to run.

Provenance

This skill was extracted from a real session that audited the microsoft/apm corpus across 3 waves (PR #1511, 2026-05-27): 112/112 pages audited, 49 surgical fixes, ~25 LLM dispatches, ~30 min wall-time. The session design artifact (genesis hand-off packet) lives in session state, not in this bundle (maintainer- scope, not runtime-loaded).

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, assets) in .apm/skills/docs-corpus-audit of microsoft/apm.

  • SKILL.md
  • assets/panelist-return-schema.json
  • assets/subagent-prompt-template.md
  • evals/README.md
  • evals/content-evals.json
  • evals/trigger-evals.json
  • scripts/scan-cross-corpus-drift.sh

Open the folder on GitHubat commit 280b8a7

Compare with similar skills

Docs Corpus Audit next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Docs Corpus Audit compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docs Corpus Audit this skillmicrosoft/apm4k—~2.6kAutomated safety check: PassMIT
Signozqjoly/GitOps112—~6.1kAutomated safety check: PassWTFPL
Fleet Intelligencemicrosoft/physical-ai-toolchain122—~598Automated safety check: PassMIT
Agent Health Monitoringcosmicstack-labs/mercury-agent-skills476—~2.7kAutomated safety check: PassMIT
Monitoring Observabilityyonatangross/orchestkit288—~2.2kAutomated safety check: PassMIT
Pull Request Title and Body Writeropeninterpreter/openinterpreter69k2 repos~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Signoz

    qjoly/GitOps

    Manage the self-hosted SigNoz observability stack in this GitOps repo.

    112 GitHub stars~6.1k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Fleet Intelligence

    microsoft/physical-ai-toolchain

    Official

    Monitor robot fleet telemetry via Azure IoT Operations, drift detection, Grafana dashboards, and Fabric analytics

    122 GitHub stars~598 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Agent Health Monitoring

    cosmicstack-labs/mercury-agent-skills

    Monitor AI agent health, detect anomalies, set up alerting, and maintain observability dashboards for production multi-agent systems.

    476 GitHub stars~2.7k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Monitoring Observability

    yonatangross/orchestkit

    Monitoring and observability patterns for Prometheus metrics, Grafana dashboards, Langfuse v4 LLM tracing (astype, scorecurrentspan, shouldexportspan, LangfuseMedia), and drift detection.

    288 GitHub stars~2.2k tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Pull Request Title and Body Writer

    openinterpreter/openinterpreter

    Rewrites the title and body of one or more pull requests with gh, leading with why the change was made, then what changed, and describing only the net result.

    69k GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Official

    Applies four layers of technical-writing rules to docs, RFCs, readmes, PR descriptions and commit messages so a tired engineer follows them on the first read.

    10k GitHub starsUsed in 10 repos~2.4k tokens
    Writing & ContentAuto-check passed

More from microsoft/apm

All 27 skills in this repo
  • Cut Release

    microsoft/apm

    Official

    A skill your agent uses to cut an APM release from the current worktree: assess whether the cycle since the last tag warrants a patch or minor bump (semver discipline against the…

    4k GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Official

    A skill your agent uses to verify CLAIM-LEVEL grounding of a documentation page (or set of pages) against the source code.

    4k GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed
  • Official

    A skill your agent uses to write the PR description (PR body) for any pull request opened against microsoft/apm.

    4k GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Official

    A skill your agent uses to implement ONE microsoft/apm issue already selected by autopilot-issue-delivery-scheduler.

    4k GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Official

    Drive ONE already selected open pull request in microsoft/apm to mergeable.

    4k GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Apm Spec Guardian

    microsoft/apm

    Official

    A skill your agent uses to run a four-panel adversarial advisory review on any pull request that touches the OpenAPM specification artifact (docs/src/content/docs/specs/openapm-.md), its inline /…

    4k GitHub stars~4.9k tokensUpdated yesterday
    Auto-check passed

Questions about Docs Corpus Audit

What does Docs Corpus Audit do?

A skill your agent uses to run a holistic regrounding pass on the entire microsoft/apm documentation corpus against current source code, page-by-page, and emit surgical fixes for stale claims. Docs Corpus Audit is an agent skill from microsoft/apm, published by the product's own GitHub organization. Use this skill to run a holistic regrounding pass on the entire microsoft/apm documentation corpus against current source code, page-by-page, and emit surgical fixes for stale claims.

When should I use Docs Corpus Audit?

Docs Corpus Audit fits situations like: run a holistic regrounding pass on the entire microsoft/apm documentation corpus against current source code; emit surgical fixes for stale claims; include audit the docs; reground the corpus.

How do I install Docs Corpus Audit in Claude Code?

Run `npx skills add microsoft/apm --skill docs-corpus-audit -a claude-code`. Or copy the skill folder (.apm/skills/docs-corpus-audit in microsoft/apm) into .claude/skills/docs-corpus-audit in your project. Claude Code loads it when a task matches its description.

How do I install Docs Corpus Audit in Codex?

Run `npx skills add microsoft/apm --skill docs-corpus-audit -a codex`. Or copy the skill folder (.apm/skills/docs-corpus-audit in microsoft/apm) into .agents/skills/docs-corpus-audit in your project. Codex loads it when a task matches its description.

Can I use Docs Corpus Audit in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/apm --skill docs-corpus-audit -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docs-corpus-audit, .gemini/skills/docs-corpus-audit, .github/skills/docs-corpus-audit and .opencode/skills/docs-corpus-audit in your project.

What does Docs Corpus Audit need to run?

Going by SKILL.md and its folder, Docs Corpus Audit needs a shell for the scripts in its folder and the command-line tools its instructions call (git, uv, python and gh). Our summary lists: Python 3; A Bash shell.

Does Docs Corpus Audit access the network?

SKILL.md contains no URLs. Its commands use git, uv and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Docs Corpus Audit safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Docs Corpus Audit use?

Docs Corpus Audit is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docs Corpus Audit use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Docs Corpus Audit?

Skills that share tags, products or a category with Docs Corpus Audit: Signoz (qjoly/GitOps, 112 stars), Fleet Intelligence (microsoft/physical-ai-toolchain, 122 stars), Agent Health Monitoring (cosmicstack-labs/mercury-agent-skills, 476 stars) and Monitoring Observability (yonatangross/orchestkit, 288 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docs Corpus Audit?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/apm, which has 3,968 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 6, 2026.

Source: microsoft/apm on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.