Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Finalize documentation changes for production readiness by discovering existing conventions, verifying code-doc alignment, reviewing format/terminology/tone consistency, verifying branch/worktree intent, and structuring clean commits with a post-publish branch/worktree cleanup decision. Counterpart of finalize-and-commit for documentation projects.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 417% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 706% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 387% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 337% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 493% | 0% |
Type: Execution
Finalize documentation changes for production readiness in a documentation project that coexists with the product source code in the same workspace. Works with any documentation framework (Docusaurus, VitePress, MkDocs, Nextra, plain Markdown, etc.).
Tasks:
task
same repository
Do not run this skill without:
.md/.mdx file changesprovides one)
Optional but recommended:
Run branch-context-check before validating the working set. If that skill is not installed, run the check inline: inspect git status --short --branch, git branch --show-current, git log --oneline --decorate -5, and the staged/dirty file lists, then classify the branch/worktree against the current documentation task using the same four verdicts below.
Required outcome:
are inspected.
match, ambiguous, mismatch, orblocked.
Proceed to Gate 0 only when:
match, orambiguous and the user explicitly confirms the branch/worktreeis correct for the current documentation task.
Stop before staging or committing when:
mismatch or blocked.documentation files.
In a stopped state, recommend a concrete recovery path: create/switch to a task-appropriate branch, create a separate worktree from the correct base, or finish/commit the previous-session work first. Do not move, stash, reset, or discard changes without explicit user approval.
> CRITICAL: The working tree may contain changes from other agent sessions > or manual edits. This gate must isolate only the current session's changes > without disturbing anything else.
Step 0-1: Identify current session scope
.md/.mdx files that were created, modified,or deleted by this session.
Gate 2).
Step 0-2: Inspect full working tree state
git status and git diff --name-only to enumerate all uncommittedchanges in the working tree.
Step 0-3: Classify changes
.md/.mdx files that appear in both the session scope(Step 0-1) and the working tree (Step 0-2).
Step 0-4: Protect out-of-scope changes
git add).Step 0-5: Confirm with the user
> PURPOSE: Establish the review baseline. Use a provided style guide > first; infer conventions from existing documentation only where no > explicit guidance exists.
Step 1-0: Use a provided style guide first
it as the primary Convention Reference.
frontmatter fields, framework syntax), and never let inferred patterns override explicit style-guide rules.
directly to Step 1-6.
Step 1-1a: Scan documentation headers
.md/.mdx files from the docs directory (prioritize recently modified, high-traffic pages).
reference.
first paragraph tone/speech level.
Step 1-1b: Deep read divergent samples
(e.g., inconsistent frontmatter fields, mixed heading levels).
ambiguity.
Step 1-2: Extract structural patterns
sidebar_label, description, tags, etc.)
# for page title only, ## fortop-level sections, ### for subsections)
→ Troubleshooting)
Step 1-3: Build terminology glossary
consistently across existing pages.
"Dashboard" not "대시보드" — or vice versa, depending on existing pattern).
convention (e.g., Korean prose with English UI labels).
Step 1-4: Identify tone and style
~합니다, 해요체~해요, 하십시오체 ~하십시오).
"~하세요" imperative).
Step 1-5: Identify documentation framework and catalog its conventions
(e.g., docusaurus.config.js, .vitepress/config.*, mkdocs.yml, next.config.* for Nextra, or none for plain Markdown).
:::note in Docusaurus/VitePress,!!! note in MkDocs, > [!NOTE] in GitHub-flavored Markdown).
<Tabs>/<TabItem> in Docusaurus,custom MDX components in Nextra).
Step 1-6: Compile Convention Reference
proceeding.
> ACTIVATION: This gate runs only if code-scope files were identified in > Gate 0. If no source code changed, skip to Gate 3.
Step 2-1: Analyze source code changes
git diff on code-scope files.configuration keys, CLI commands, environment variables.
Step 2-2: Map code changes to documentation
the changed items using filename, import path, and keyword matching.
changed code item → documentation section(s) referencing it.Step 2-3: Identify alignment gaps
Produce an alignment report with three categories:
reflects the code change.
updated in this session.
(flag for user decision).
Present the report to the user. "Needs update" items must be resolved before proceeding — resolution means either updating the documentation OR the user explicitly acknowledging that no documentation change is needed (with reason).
Apply the Convention Reference from Gate 1 to all doc-scope files.
3a) Structural consistency
## to ####).3b) Terminology consistency
vs "세이브").
3c) Tone and style consistency
해요체 within the same page).
3d) Content completeness
3e) Framework-specific syntax validity
attributes (if applicable).
3f) Image and screenshot references
> SKIP CONDITION: Skip if no image references ( or <img src="path">) points to afile that exists in the repository.
3g) Link validity
#section-name) match actual heading slugs in the targetdocument.
3h) Sidebar and navigation alignment
> SKIP CONDITION: Skip if no files were added or deleted in this > session (only modifications). Sidebar/nav changes are only relevant > when the file set changes.
sidebars.js in Docusaurus, _meta.json in Nextra, nav in mkdocs.yml, auto-generated from directory structure in VitePress).
navigation configuration.
sidebar_position in frontmatter, file orderingin config) does not conflict with other pages in the same category.
Produce a Quality Review Report organized by severity:
alt text).
Step 4-1: Apply automatic fixes
Fix items that require no judgment:
Step 4-2: Present judgment-required items
Items that need user input:
Step 4-3: Summarize changes
Step 5-1: Run documentation build
package.json scripts, Makefile, or framework CLI).
Step 5-2: Evaluate results
relate to in-scope files; proceed if warnings are pre-existing.
Step 5-3: Record evidence
valid.
Staging rule: Stage only doc-scope files confirmed in Gate 0. Use git add <specific-file> for each file individually. Never use git add ., git add -A, or git add --all.
Step 6-1: Categorize changes
Group in-scope files by change type:
| Change Type | Commit Prefix | Description | |---|---|---| | Error fixes | docs(fix): | Broken links, syntax errors, missing images | | Style/format | docs(style): | Terminology, tone, heading, frontmatter normalization | | Content update | docs(content): | New sections, rewritten paragraphs, expanded explanations | | Code-sync | docs(sync): | Documentation updates reflecting source code changes |
Step 6-2: Structure commits
otherwise, assign to the dominant change type.
docs(fix) → docs(style) → docs(content) → docs(sync).Step 6-3: Write commit messages
Use Conventional Commits format. Each message must include:
After any commit, push, PR creation, or PR merge performed as part of this workflow, run Gate 6 of branch-context-check.
Required behavior:
branch remains checked out.
switch back to base, or leave cleanup for after merge.
fast-forward pull, delete the local task branch, delete the remote task branch, prune remote refs, and prune stale worktree metadata.
only after confirming that worktree is clean.
Do not end the workflow after push or merge without reporting the cleanup decision. Deletion still requires the safety checks from branch-context-check Gate 6 (inline fallback: delete only when the working tree is clean, the PR is merged or the user confirms the branch is obsolete, the branch is not the current checkout, and no other branch or worktree depends on it).
code or existing documentation.
backing.
for clarification.
branch-context-checkor the user has explicitly accepted an ambiguous verdict.
handoff.
git checkout -- <file>, git restore, git stash,git reset --hard, or any other command that discards or reverts uncommitted changes to files outside the current session's scope.
git add ., git add -A, or git add --all. Always stagefiles individually with git add <specific-file>.
left completely untouched.
use in-scope changed files as convention sources.
meaning-altering tone changes) without user approval.
Common bad outputs:
in the existing corpus
docs project root)
git add . which accidentally stages out-of-scope changesof "exclude from staging"
clean
will be staged
worktrees without offering cleanup choices
merged/obsolete status
applying incorrect standards
Input:
2 documentation files changed: a new "Getting Started" page was added, and an existing "Configuration" page had a section rewritten. No source code changes.
Output:
title, sidebar_position,description; headings use ## for top-level sections; tone is 합쇼체 (~합니다); admonitions use :::note and :::tip
match — current branch and doc-scope files alignwith the documentation task
sidebar_position in frontmattersidebar_position: 1 to frontmatter, standardized"설정값" (no space, matching 80% of existing usage)
npm run build exit 0, no warningsdocs(style): standardize terminology and frontmatter in configuration pagedocs(content): add getting started guideor PR cleanup will be decided after publish
Input:
8 documentation files changed across 3 categories (guides, API reference, troubleshooting). 4 source code files also changed, including a renamed API endpoint and a new configuration option. Sidebar configuration was not updated.
Output:
title, sidebar_position,sidebar_label, description, tags; 합쇼체 tone; features referenced with English name first then Korean in parentheses (e.g., "Dashboard (대시보드)"); :::warning for breaking changes, :::tip for best practices
match — branch name and dirty files align withdocs/API synchronization
configuration guide missing new MAX_RETRY_COUNT option
old-dashboard.png)violation)
tags frontmatter fieldadded MAX_RETRY_COUNT documentation, standardized bilingual term format, corrected speech level to 합쇼체, added missing tags fields, registered new pages in sidebars.js, flagged missing screenshot for user replacement
npm run build exit 0, 1 warning (pre-existing, outof scope)
docs(fix): repair broken links and remove stale image referencedocs(style): standardize terminology format and speech level across guidesdocs(content): add MAX_RETRY_COUNT configuration documentationdocs(sync): update API reference and troubleshooting for endpoint renamelocal/remote branch deletion, remote prune, and worktree prune; do not delete while the PR is still open
FAST MODE (only if explicitly requested):
Relationship with finalize-and-commit:
When both source code and documentation changed in the same session, run finalize-and-commit for source code first, then docs-finalize-and-commit for documentation. Gate 2 of this skill reads source code diffs but does not modify or commit source code files.
Other measured skills in the registry, with their headline benchmark lift.