Official agent skill

Docs Sync

by microsoft in microsoft/apm

A skill your agent uses whenever a pull request is opened, reopened, or synchronized in microsoft/apm to assess whether and how the documentation corpus must change to stay truthful with the…

OfficialMITAuto-check passedDevelopment

Install Docs Sync

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

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

GitHub CLI
$ gh skill install microsoft/apm docs-sync --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-sync .claude/skills/docs-sync && 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-sync
GitHub stars
4k
Token cost
~3k tokens
SKILL.md length
1,298 words
Files
7 (incl. assets)
Skills in repo
27
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses whenever a pull request is opened, reopened, or synchronized in microsoft/apm to assess whether and how the documentation corpus must change to stay truthful with the…

  • Works in 7 steps: Classify → Localize (in_place) or Architect… → Fan-out panel → …
  • A pull request is opened
  • SKILL.md covers Architecture invariants, Roster, Topology and Execution checklist, plus 3 more sections
  • Calls node, gh and python

What it does

Docs Sync is an agent skill from microsoft/apm, published by the product's own GitHub organization. Use this skill whenever a pull request is opened, reopened, or synchronized in microsoft/apm to assess whether and how the documentation corpus must change to stay truthful with the proposed code change. Activate even when the PR title or body says nothing about docs -- the skill must run on every PR to detect silent drift between code and docs. Classifies impact as no-change, in-place edit (one to a few paragraphs), or structural change (new page or TOC reshape), then orchestrates a CDO + doc-writer +…

Its SKILL.md is about 3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including assets (for example `assets/advisory-comment-template.md`, `assets/classifier-return-schema.json` and `assets/panelist-return-schema.json`).

It sits in Development, covering Monitoring and alerting, Code review and Test coverage. It works with Python. The repository describes itself as: Agent Package Manager. The licence is MIT.

When your agent uses it

  • A pull request is opened
  • Synchronized in microsoft/apm to assess whether and how the documentation corpus must change to stay truthful with the proposed code change

Example prompts

  • “/docs-sync”

Requirements

  • Python 3

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Classify
  2. Localize (in_place) or Architect (structural)
  3. Fan-out panel
  4. Validate
  5. CDO synthesize
  6. Emit ONE comment
  7. Optional companion PR

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

    Shell commands in SKILL.md call:

    • node
    • gh
    • python

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

  • Network

    No URLs in SKILL.md. Its commands use 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 Sync loads about 3k tokens when it runs. Until then it costs about 178 tokens; SKILL.md has 1,298 words of instructions outside code blocks.

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

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); files beside SKILL.md are not scanned.

SKILL.md

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

Download SKILL.mdSave it as .claude/skills/docs-sync/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
docs-sync
description
Use this skill whenever a pull request is opened, reopened, or synchronized in microsoft/apm to assess whether and how the documentation corpus must change to stay truthful with the proposed code change. Activate even when the PR title or body says nothing about docs -- the skill must run on every PR to detect silent drift between code and docs. Classifies impact as no-change, in-place edit (one to a few paragraphs), or structural change (new page or TOC reshape), then orchestrates a CDO + doc-writer + python-architect + editorial-owner + growth-hacker loop to produce a patch-ready advisory. Does NOT review code quality, security, or test coverage. Does NOT auto-merge or auto-push doc edits.

docs-sync -- per-PR documentation impact panel

The docs corpus drifts silently and constantly. This skill catches drift at PR-open time, classifies its impact, and orchestrates a persona panel to produce a patch-ready advisory comment.

The pattern is A1 PANEL + B1 FAN-OUT/SYNTHESIZER + A8 ALIGNMENT LOOP. The classifier is the cost gate (~70% of PRs short-circuit to no-change with ~1 LLM call). When the panel does fan out, every agent reads a bounded context (~10 KB) -- never the full corpus.

This skill is ADVISORY. It does not gate merge, apply verdict labels, or push to the contributor's fork. The orchestrator is the sole writer to the PR: exactly one comment per run (idempotent edit-in-place), plus optional label sweeps.

Architecture invariants

  • Cost ceiling: 15 LLM calls per run. Hard-wired. The orchestrator refuses to spawn beyond. Header prints N/15 for observability.
  • Single-writer interlock. Only the orchestrator writes. Panelist subagents return JSON; they MUST NOT call any gh write command, post comments, or touch PR state.
  • Idempotent comment. Exactly one comment per run, with a stable header ## Docs sync advisory. Re-runs edit-in-place using gh pr comment --edit-last.
  • No fork-write. Companion docs PRs require Step 7's fresh responsible-human issue-scope checkpoint and open in the BASE repo; never pushed to the contributor's fork. Labels request advice, not implementation.
  • Index-not-corpus reads. Every classifier and architect agent reads .apm/docs-index.yml, NOT the corpus itself. The corpus is sampled only by the localizer (which reads the specific candidate pages) and by per-page panelists (which read one page each).
  • S7 deterministic tool bridge. The python-architect panelist MUST run real apm --help, grep, and python -c commands to verify doc claims, never assert from prose.

Roster

RoleAgentAlways active?
Classifierdoc-analyser inside docs-impact-classifierYes (every run)
Localizerdocs-impact-localizerOnly on in_place verdict
Architectdocs-impact-architectOnly on structural verdict
Writerdoc-writerPer candidate page (fan-out)
Verifierpython-architectPer candidate page (fan-out, S7)
Editorialeditorial-ownerOnce across all redrafts
Growthoss-growth-hackerOnce across all redrafts
SynthesizercdoOnce, with ALIGNMENT LOOP up to 3 redrafts

Topology

   docs-sync SKILL (orchestrator thread)
                 |
   Step 1: classify (1 LLM call, may exit here)
                 |
                 v
            verdict?
            /    |    \
   no-change  in-place  structural
       |        |          |
     EXIT       |       architect (TOC delta)
                |          |
                +----<-----+
                |
   Step 2: localize (1 LLM call) -- per-page task brief
                |
   Step 3: FAN-OUT panel via task tool
                |
       +----+----+----+----+
       v    v    v    v    v
     writer  verify edit growth
     x N    x N   once  once
       (parallel; each <=10 KB context)
                |
   Step 4: schema-validate returns
                |
   Step 5: CDO synthesize (1 LLM call)
                |
            agree?
            / | \
        revise (N<=3 redrafts) | agree
                                  |
   Step 6: emit ONE comment via safe-outputs.add-comment
   Step 7: OPTIONAL companion docs PR (structural AND fresh
           responsible-human issue-scope checkpoint)

Execution checklist

Step 1 -- Classify

Spawn ONE task: load the docs-impact-classifier skill, pass it the PR number. It returns the classifier JSON.

Validate the JSON against assets/classifier-return-schema.json. On schema failure, abort the run with a comment explaining the internal error.

If verdict is no_change: skip to Step 6 with a brief advisory ("No docs impact detected. Reason: <one-line>. LLM calls: 1/15.")

Step 2 -- Localize (in_place) or Architect (structural)

For in_place: spawn ONE task that loads the docs-impact-localizer skill with the classifier output. Returns per-page task briefs.

For structural: spawn ONE task that loads the docs-impact-architect skill with the classifier output. Returns TOC delta + new-page outlines + downstream in-place pages. THEN spawn the localizer for those downstream pages.

Step 3 -- Fan-out panel

Cascade-size mitigation (PR 1244 class). If scope_pages[] has

8 entries, the per-page fan-out at one writer call per page would approach the 15-call ceiling with no headroom for verifier redrafts. BEFORE spawning, group scope_pages[] into SECTIONS:

  • Pages under the same TOC section (e.g. all consumer/**) with the SAME conceptual fix (e.g. "rename apm update -> apm self-update in every mention") become ONE writer task with a pages_in_section[] array in its brief.
  • A 9-page rename cascade collapses to 2-3 section writer tasks.

The python-architect verifier still runs per verify_claims[] (not per page), because S7 evidence is keyed on claims, not pages.

For each page-or-section in the per-page task brief, spawn TWO parallel tasks:

  1. doc-writer task -- drafts the patch for that page's (or section's) specific edits. Output: JSON with before:, after: for each location.
  2. python-architect task -- for each verify_claims[] in the page brief, run the actual command (S7 tool bridge: apm <verb> --help, grep -n <symbol> src/). Output: JSON with claim: verified | refuted | inconclusive per claim.

In parallel with the per-page fan-out, spawn ONCE each:

  1. editorial-owner task -- receives ALL writer drafts, returns tone fixes.
  2. oss-growth-hacker task -- receives ALL writer drafts, returns ramp-clarity notes (does this read well to a cold OSS visitor).

All panelist tasks return JSON matching assets/panelist-return-schema.json. Schema-validate every return; on failure, abort.

Step 4 -- Validate

Cross-check:

  • Every verify_claims from a python-architect comes back verified or inconclusive (never refuted). If any are refuted, the doc-writer's draft is wrong; re-run the writer for that page with the refutation as context.
  • Cross-page constraints from the localizer are honored across all writer drafts.
  • All drafts are ASCII-only (per repo encoding rule).
Step 5 -- CDO synthesize

Spawn ONE task: load the cdo persona with the full panel return (writer drafts + verifier reports + editorial notes + growth notes

  • classifier verdict + (architect output if structural)) and .apm/docs-index.yml.

The CDO returns one of three verdicts:

  • agree: ship. Proceed to Step 6.
  • revise: re-spawn the writer panelists with the CDO's specific concerns as additional context. Re-run the editorial and growth passes if needed. Bounded N <= 3 redrafts. Increment a redraft counter; if it hits 3 and CDO still disagrees, ship with cdo_disagreement_noted: true.
  • ship_with_disagreement: ship as-is with the disagreement surfaced in the comment for the maintainer to weigh.
Show full SKILL.md (475 more words)Show less
Step 6 -- Emit ONE comment

Render assets/advisory-comment-template.md with the final results. Write it via safe-outputs.add-comment. Header is exactly ## Docs sync advisory (stable for idempotent edit-in-place).

The comment MUST include the cost header:

Verdict: <verdict>  *  Pages affected: N  *  LLM calls: M/15  *  Took: Xs
Step 7 -- Optional companion PR

Only on structural verdict in a human-supervised follow-up. docs-sync-confirm is at most a request to discuss the proposal; it never ratifies scope or permits companion implementation. This applies even when an older workflow prompt calls it confirmation. Unattended label/manual-dispatch runs end with advice, not a companion PR.

Before editing, tie the companion to a real issue and a nominated scope-record comment URL. In a trusted default-branch checkout of the target repository (not the contributor branch or skill directory), probe:

bash
node scripts/governance/eligibility.cjs --help
node scripts/governance/eligibility.cjs --repo microsoft/apm --issue N --approval-url URL

The target's authority.cjs owns record interpretation and the trusted GOVERNANCE.md roster. Do not add a package dependency, duplicate parser, or label-based roster. Missing tool, incomplete/API-failed reads, or unverifiable evidence means STOP and escalate.

The result always has authorizes_implementation: false: even an unedited scope evidence record cannot reveal deleted withdrawals. Obtain a fresh explicit confirmation from a responsible human for this issue's bounded scope, done-when, exclusions, and review contact before companion implementation. Capture its current confirmation reference; neither bot advice, a review, historical acceptance, silence, nor a label is consent. A named contact is not proof of review availability.

Only after that checkpoint:

  1. Branch name: docs-sync/companion-<PR_NUMBER> in the BASE repo.
  2. Apply the doc-writer drafts as a commit on that branch.
  3. Apply the architect's TOC delta (.apm/docs-index.yml entries + new page files + redirects on retired pages).
  4. Open a draft PR linked to the original PR, with the advisory comment text as the PR body.
  5. Reference the companion PR in the advisory comment.

The default is to recommend patches without opening a PR. Reconfirm on resume, changed scope, or uncertain withdrawal; never auto-push or merge.

Cost accounting

The orchestrator maintains a running LLM-call counter:

StepMin callsMax calls
Step 1 classify11
Step 2 localize/architect02
Step 3 fan-out (N pages)02N + 2
Step 5 CDO01 + 3 redrafts
Total115

If the counter would exceed 15, the orchestrator stops spawning, ships the partial result with cost_ceiling_hit: true, and the comment surfaces the truncation.

Anti-patterns

  • Reading the corpus instead of the index. Context budget breach.
  • Letting panelists post comments. Single-writer interlock violation.
  • Ignoring refuted verify_claims. That's silent drift you're shipping.
  • Skipping the CDO synthesis on "obvious" in-place patches. The bridges still matter.
  • Treating docs-sync-confirm or evidence JSON as ratification. Only the fresh responsible-human issue-scope checkpoint permits implementation.
  • Re-running on every push (synchronize). Wasteful. Re-apply the trigger label for re-run.

Operating modes

  • Rung 1 (label-gated, default): triggered by docs-sync label on PR. Maintainer opts in.
  • Rung 2 (default-on): triggered on every pull_request_target event. Enabled only after shadow validation.

The workflow file controls which rung is active. The skill body is identical for both.

© 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 (assets) in .apm/skills/docs-sync of microsoft/apm.

  • SKILL.md
  • assets/advisory-comment-template.md
  • assets/classifier-return-schema.json
  • assets/panelist-return-schema.json
  • evals/README.md
  • evals/content-evals.json
  • evals/trigger-evals.json

Open the folder on GitHubat commit 280b8a7

Compare with similar skills

Docs Sync 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 Sync compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docs Sync this skillmicrosoft/apm4k—~3kAutomated safety check: PassMIT
Code ReviewAzure/sap-automation145—~7kAutomated safety check: PassMIT
Core Components Code Reviewcore-ds/core-components137—~5.4kAutomated safety check: PassMIT
Code Review Skillawesome-skills/code-review-skill2.1k—~2.8kAutomated safety check: NotesMIT
Evaluate PR Testsdotnet/maui23k—~2.9kAutomated safety check: PassMIT
Docling Pull Request Reviewdocling-project/docling68k—~1kAutomated safety check: PassMIT

Similar skills

  • Code Review

    Azure/sap-automation

    Official

    Review pull requests in the SAP Deployment Automation Framework.

    145 GitHub stars~7k tokensUpdated today
    DevelopmentAuto-check passed
  • Core Components Code Review

    core-ds/core-components

    Review a Pull Request or diff in the @alfalab/core-components UI library — correctness bugs, public API/breaking changes, accessibility, keyboard/focus/pointer interaction, component states…

    137 GitHub stars~5.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Review Skill

    awesome-skills/code-review-skill

    Provides comprehensive code review guidance for React 19, Vue 3, Angular 17+, Svelte 5, Rust, TypeScript, Java, Java 8, PHP, Ruby, Rails, Python, Django, FastAPI, Go, C/.NET, Kotlin, Swift, Dart…

    2.1k GitHub stars~2.8k tokensUpdated 29 days ago
    DevelopmentAuto-check: notes
  • Official

    Reviews the tests added in a pull request for fix coverage, quality, edge cases and test type, and recommends lighter test types where they would do.

    23k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Docling Pull Request Review

    docling-project/docling

    Reviews or re-reviews a Docling pull request in fixed stages, with findings that can be reproduced and an explicit record of every check that was run.

    68k GitHub stars~1k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Code Reviewer

    jewbetcha/opentrace

    Comprehensive code review skill for TypeScript, JavaScript, Python, Swift, Kotlin, Go.

    116 GitHub starsUsed in 2 repos~1.1k tokens
    DevelopmentAuto-check: notes

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
  • Docs Corpus Audit

    microsoft/apm

    Official

    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.

    4k GitHub stars~2.6k 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

Works with

Questions about Docs Sync

What does Docs Sync do?

A skill your agent uses whenever a pull request is opened, reopened, or synchronized in microsoft/apm to assess whether and how the documentation corpus must change to stay truthful with the…. Docs Sync is an agent skill from microsoft/apm, published by the product's own GitHub organization. Use this skill whenever a pull request is opened, reopened, or synchronized in microsoft/apm to assess whether and how the documentation corpus must change to stay truthful with the proposed code change.

When should I use Docs Sync?

Docs Sync fits situations like: A pull request is opened; synchronized in microsoft/apm to assess whether and how the documentation corpus must change to stay truthful with the proposed code change.

How do I install Docs Sync in Claude Code?

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

How do I install Docs Sync in Codex?

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

Can I use Docs Sync 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-sync -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-sync, .gemini/skills/docs-sync, .github/skills/docs-sync and .opencode/skills/docs-sync in your project.

What does Docs Sync need to run?

Going by SKILL.md and its folder, Docs Sync needs the command-line tools its instructions call (node, gh and python). Our summary lists: Python 3.

Does Docs Sync access the network?

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

Is Docs Sync 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. Review the folder before installing.

What licence does Docs Sync use?

Docs Sync 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 Sync use?

About 3k tokens (SKILL.md is roughly 12k 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 Sync?

Skills that share tags, products or a category with Docs Sync: Code Review (Azure/sap-automation, 145 stars), Core Components Code Review (core-ds/core-components, 137 stars), Code Review Skill (awesome-skills/code-review-skill, 2.1k stars) and Evaluate PR Tests (dotnet/maui, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docs Sync?

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.