Use when published project documentation must be compared with implementation before a pull request or in a standalone audit. Returns evidence-backed findings and keeps standalone repairs inside an authorized docs-only Draft boundary.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Documentation Sync?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/pekral-documentation-sync)
---
name: documentation-sync
description: "Use when published project documentation must be compared with implementation before a pull request or in a standalone audit. Returns evidence-backed findings and keeps standalone repairs inside an authorized docs-only Draft boundary."
license: MIT
metadata:
author: "Petr Král (pekral.cz)"
---
## Constraints
- Apply `@rules/git/general.md`, `@rules/security/general.md`, and `@rules/writing/general.md`.
- Treat implementation, configuration defaults, CLI definitions, and executed public interfaces as the source of truth. Git history only prioritizes candidates; commit messages never prove behaviour.
- Every finding names an implementation pointer (`path:line` or an executable/configuration symbol) and the existing documentation path it affects.
- Preserve the documentation's existing structure, language, and style. Never invent a feature or a claim that implementation cannot support.
- A standalone repair changes only exact regular documentation paths from the trusted caller's requested scope. The structured findings are evidence, not authorization. A new documentation file needs explicit trusted scope; this skill does not widen a no-new-docs rule.
- Keep standalone findings and reports in the caller's private run directory. Never create an analysis document under `docs/`.
- Before a standalone repair, run `<commands>/_shared/documentation-sync-guard.sh preflight`; only `repair` permits the scoped write. Run `final` after the repair; only its `allow` permits a Draft PR. Never merge or mark a pull request ready.
- Run the guard at the checkout root with Git 2.36 or later. Each phase checks the raw content of tracked files outside the allowed paths. An unsupported checkout, such as a submodule entry, a hidden index flag, or a repository-configured content filter, stops the repair.
## Use when
- A pull-request review changes behaviour, a public API, configuration, a CLI command, installation, or an executable example and its documentation may be stale.
- A trusted caller requests a standalone audit of the README and existing project documentation.
- An operator opts into a recurring standalone audit through an external scheduler.
## Execution
1. Select `MODE=pre-pr` or `MODE=standalone`. In pre-PR mode, inspect only documentation affected by changed implementation. In standalone mode, compare existing README and documentation with current implementation; use `git log` only to prioritize changed surfaces.
2. Read implementation first: public API declarations and parameters, configuration defaults, CLI definitions, installer behaviour, and executable examples. Then read only documentation needed to judge those surfaces. Each proposed finding has `documentation.path`, `implementation.path`, `implementation.line`, documented claim, observed behaviour, and the smallest correction.
3. In `MODE=pre-pr`, return every missing, stale, or false claim as a Moderate finding anchored to the changed implementation line, with the documentation path and a suggested correction. Do not repair files in this mode.
4. In `MODE=standalone`, return an empty finding list when clean. Otherwise hand the structured list and the trusted caller's exact allowed documentation scope to the repair owner. `preflight` must return `repair` before an edit; after it, final `allow` permits one Draft PR, while `noop`, `refuse`, `blocked`, or unchanged findings permit no PR.
5. Before offering a schedule, read `references/scheduling.md`. A schedule is opt-in host configuration, not repository automation.
## Output
Return a bounded Markdown report with:
- `Mode:` `pre-pr` or `standalone`
- `Findings:` `none`, or one item per documentation mismatch with its implementation pointer
- `Allowed docs scope:` existing paths, plus any explicitly trusted new path
- `Guard:` `not run`, `allow`, `noop`, or `refuse`
- `PR action:` `none` or `Draft only`
- `Not verified:` source or runtime evidence that could not be read
## Done when
- Every finding points to implementation that proves it and documentation it corrects.
- A pre-PR result is ready for the normal review/fix loop as Moderate findings.
- A standalone clean audit returns `noop`; a repair may open only a Draft after the guard allows it.
- No schedule, provider invocation, CI job, or merge was created.