Agent skill

Update Docs

by sd0xdev in sd0xdev/sd0x-harness

Research current code state then update corresponding docs, ensuring docs stay in sync with code.

MITAuto-check passedDevelopment

Install Update Docs

skills CLI
$ npx skills add sd0xdev/sd0x-harness --skill update-docs -a claude-code

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

GitHub CLI
$ gh skill install sd0xdev/sd0x-harness update-docs --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/sd0xdev/sd0x-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/update-docs .claude/skills/update-docs && 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
update-docs
GitHub stars
192
Token cost
~2.1k tokens
SKILL.md length
1,093 words
Files
1
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Research current code state then update corresponding docs, ensuring docs stay in sync with code.

  • Works in 6 steps: Locate Docs and Related Code (5-Level… → 5: Classify Each Target — Sync… → Research Current Code State → …
  • Development work in your project
  • SKILL.md covers Trigger, When NOT to Use, Auto-Trigger and Task, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Update Docs is an agent skill from sd0xdev/sd0x-harness. Research current code state then update corresponding docs, ensuring docs stay in sync with code.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. The repository describes itself as: The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and… The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/update-docs”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(ls:*), Bash(git:*), Bash(find:*), Bash(node:*)

Workflow steps

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

  1. Locate Docs and Related Code (5-Level Cascade)
  2. 5: Classify Each Target — Sync Authority, Freeze Records
  3. Research Current Code State
  4. Compare Docs vs Code Differences
  5. Update Docs
  6. Verification

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(ls:*)
    • Bash(git:*)
    • Bash(find:*)
    • Bash(node:*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

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

  • Network

    No URLs in SKILL.md.

    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

Update Docs loads about 2.1k tokens when it runs. Until then it costs about 27 tokens; SKILL.md has 1,093 words of instructions outside code blocks.

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

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 sd0xdev/sd0x-harness at commit a4d4bc1, republished under its MIT licence (© sd0xdev). 1,093 words, ~2,139 tokens.

Download SKILL.mdSave it as .claude/skills/update-docs/SKILL.md (or your agent's skills folder).
name
update-docs
description
Research current code state then update corresponding docs, ensuring docs stay in sync with code.
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(ls:*), Bash(git:*), Bash(find:*), Bash(node:*)

Update Docs

Trigger

  • Keywords: update docs, sync docs, docs out of date, update-docs

When NOT to Use

  • Document review (use /codex-review-doc)
  • Creating new docs (use /tech-spec or /create-request)
  • Document refactoring (use /doc-refactor)

Auto-Trigger

Auto-triggered after precommit Pass, only when the change maps to a feature under docs/features/ (see @rules/auto-loop.md § Tiers, gate sequence). Can also be invoked manually.

Task

Key principle: can't find target → ## Gate: ⚠️ Need Human — don't guess or create new docs.

Use the shared feature context resolution algorithm (see @skills/create-request/references/feature-context-resolution.md):

scan_error gate. scan_error !== false ⇒ the source sets are unknown, not empty — report it and take the ⚠️ Need Human exit rather than syncing against a corpus you could not enumerate — an unreadable corpus and a feature with no documents both return empty, and the first one silently becomes "nothing to sync". Gate on !== false, not === true: a {} payload from a shell fallback carries no such field at all, and a non-null key is not evidence the sets are complete — scan_error rides alongside a resolved key.

ConfidenceAction
high/mediumProceed with detected feature
lowProceed with warning
null (not found)Output ## Gate: ⚠️ Need Human — do not guess
Step 1.5: Classify Each Target — Sync Authority, Freeze Records

This skill rewrites current-authority docs. It does not rewrite records.

resolveDocRole(path, source, taxonomy) in scripts/lib/doc-metadata.js answers which a file is, and owesCodeAlignment(path, source, taxonomy) is the same answer as a boolean — a doc owes code alignment exactly when its role is the fallback (current-authority) one.

Both take a repository path as the first argument — never a role label. Spelling it owesCodeAlignment() invites the call that has already been made here once: passing the string "Design record" where the path goes. That string matches no rule, so it falls through to FALLBACK_ROLE and the function returns true — a fail-closed default reads exactly like an affirmative answer, and the wrong reading was an instruction to rewrite a frozen record (docs/features/push-gate-optin/review-log-push-gate-optin.md, round 43).

The four roles below are BUILTIN_ROLE_CONFIG.closed_set in that file, and the Examples column states what its path_defaults patterns actually match — read it there, not from the phase number. docs-numbering.md numbers documents by lifecycle phase; doc-metadata.js assigns authority role. They are different axes, and reading the first as the second is what put 2-tech-spec.md in the Current-authority row of this table until 2026-08-21 — an instruction to rewrite a frozen design record, and the exact failure the paragraph below this table warns about.

RoleMatches (path_defaults)What this skill does
Current authority — owes code alignment4-implementation*; anything whose first segment is skills/rules/agents/commands; and the fallback, which is what README.md resolves throughRewrite the sections the code changed
Design record — states a decisionConventionally 0-feasibility-study*, 1-requirements*, 2-tech-spec*, 3-architecture* — but the pattern is ^[0-3]-(feasibility|requirements|tech-spec|architecture), a cross-product: any of those four prefixes with any of those four stems, sixteen names, not four (see below). Also intent-<feature>.md (the intent-records rule) — planner-written constraints the implementer checks work againstDo not rewrite. Append a dated > **Update(…)** note recording what later changed — except intent-*: touch it not at all, appends included. Amending intent is a human re-decision, never a sync; this skill only reports a tension between the code and an invariant or Non-goal, and the human edits the file or does not
Work record — states what was askedanything under a requests/ segmentDo not rewrite — this skill does not touch it at all. /create-request --update may overwrite exactly four fields (Status, the Progress table, AC checkboxes, Progress.Note); everything else in the ticket is frozen, and a closed ticket is frozen entirely. That is the whole mutable set for an ordinary update. The single exception is a reported factual correction — a non-lifecycle recorded fact such as a path or a date, or an unfilled template placeholder that was never a statement about the ticket — which may also apply to a closed ticket, authorizes only that correction, and never unrelated trimming or cleanup; it must be stated in Progress.Note. It must never change Status, a Progress phase status, or AC checkbox state: those lifecycle fields stay governed by the freeze and the ordinary transition rules, or "the erroneous fact" becomes a label an agent can put on a lifecycle edit to walk past them. Both halves are defined once in skills/create-request/SKILL.md § Phase 4.5
History recordreview-log-*, adr-*Do not rewrite. Append only
Show full SKILL.md (376 more words)Show less

owesCodeAlignment(path, source, taxonomy) is resolveDocRole(path, source, taxonomy) === FALLBACK_ROLE — the Current authority role and nothing else, so the three record rows are one decision, not three. Named by role, not by position: "the first row" was true only until somebody reordered or inserted one, and a reordered table would then have silently redirected this instruction at a record.

The four canonical pairings — 0-feasibility-study, 1-requirements, 2-tech-spec, 3-architecture — are a naming convention (@rules/docs-numbering.md), not what the classifier tests. Measured 2026-08-21: 1-tech-spec.md, 3-requirements.md, 0-architecture.md and 2-feasibility-study.md all resolve to Design record, because the prefix and the stem are matched independently. Listing only the four pairings invites the opposite reading — that an off-convention name is a gap the classifier cannot see — and it is the reverse: the classifier is wider than the convention, deliberately, so a mis-numbered spec is still protected from rewriting. Where it does stop is the prefix: 4-tech-spec.md falls past [0-3] into the fallback and resolves to Current authority, i.e. rewritable. A spec numbered outside the range loses the protection its name suggests, so fix the number rather than relying on the stem.

A record that disagrees with today's code is not stale — that disagreement is the record. Editing it to agree destroys the only copy of what was decided, and buys nothing: the reviewer reads records under the record-diff profile, which carries no code-alignment obligation (skills/doc-review/SKILL.md § Review Profiles).

Report a record you were pointed at rather than silently skipping it — "not in scope for rewriting" is a fact the caller needs, and silence reads as "synced".

Step 2: Research Current Code State

Key research items:

  • Any new scripts / skills / commands added?
  • Any modified logic in existing files?
  • Any new configuration or rules added?
  • Any API or interface changes?
Step 3: Compare Docs vs Code Differences
ItemDoc DescriptionCurrent CodeStatus
Step 4: Update Docs

Update document content based on differences:

  1. Architecture diagrams (Mermaid sequenceDiagram / flowchart)
  2. Core service table
  3. API description
  4. Data model
Step 5: Verification

After update:

  1. Re-read updated document sections
  2. Verify all new modules are documented
  3. Verify all removed modules are cleaned up

Safety Valve

After doc sync, compare code diff against pre-sync baseline. If new code changes exist (e.g., lint:fix modified code), return to review loop.

Output

markdown
## Doc Update Report

| Document | Sections Updated | Status |
|----------|-----------------|--------|

## Changes Made
- <summary of each update>

## Verification
- [ ] New modules documented
- [ ] Removed modules cleaned
- [ ] Diagrams updated

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

Files

Just SKILL.md in skills/update-docs of sd0xdev/sd0x-harness.

Open the folder on GitHubat commit a4d4bc1

Compare with similar skills

Update Docs 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.

Update Docs compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Update Docs this skillsd0xdev/sd0x-harness192—~2.1kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k59 repos~726Automated safety check: PassMIT
Finishing a Development Branchobra/superpowers296k5 repos~1.9kAutomated safety check: PassMIT
Typescript Advanced Typesrolling-scopes/rsschool-app10k25 repos~4.2kAutomated safety check: PassMPL-2.0
PR Babysitteropeninterpreter/openinterpreter69k3 repos~4.2kAutomated safety check: PassApache-2.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 59 repos~726 tokens
    DevelopmentAuto-check passed
  • Walks the last step of a branch: confirm tests pass, detect the git environment, ask how to integrate, carry out your choice and clean up the worktree.

    296k GitHub starsUsed in 5 repos~1.9k tokens
    DevelopmentAuto-check passed
  • Typescript Advanced Types

    rolling-scopes/rsschool-app

    Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications.

    10k GitHub starsUsed in 25 repos~4.2k tokens
    DevelopmentAuto-check passed
  • PR Babysitter

    openinterpreter/openinterpreter

    Watches an open GitHub pull request until it merges, handling review comments, diagnosing CI failures and retrying flaky checks along the way.

    69k GitHub starsUsed in 3 repos~4.2k tokens
    DevelopmentAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Greploop

    onyx-dot-app/onyx

    Iteratively improves a PR (GitHub), MR (GitLab), or shelved changelist (Perforce) until Greptile gives it a 5/5 confidence score with zero unresolved comments.

    32k GitHub starsUsed in 4 repos~3.3k tokens
    DevelopmentAuto-check passed

More from sd0xdev/sd0x-harness

All 89 skills in this repo
  • Adr

    sd0xdev/sd0x-harness

    Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature/adr-<NNN-<title.md with a 3-digit zero-padded…

    192 GitHub stars~4.8k tokensUpdated today
    Auto-check passed
  • Load PR Review

    sd0xdev/sd0x-harness

    Load GitHub PR review comments into AI session — analyze, triage, plan.

    192 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Next Step

    sd0xdev/sd0x-harness

    Change-aware next step advisor. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Obsidian CLI

    sd0xdev/sd0x-harness

    Obsidian vault integration via official CLI. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Orchestrate

    sd0xdev/sd0x-harness

    Agent-driven workflow orchestration (v1 report-only). An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~2.5k tokensUpdated today
    Auto-check passed
  • PR Comment

    sd0xdev/sd0x-harness

    Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

    192 GitHub stars~1.5k tokensUpdated today
    Auto-check passed

Categories

Questions about Update Docs

What does Update Docs do?

Research current code state then update corresponding docs, ensuring docs stay in sync with code. Update Docs is an agent skill from sd0xdev/sd0x-harness. Research current code state then update corresponding docs, ensuring docs stay in sync with code.

When should I use Update Docs?

Update Docs fits situations like: development work in your project.

How do I install Update Docs in Claude Code?

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

How do I install Update Docs in Codex?

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

Can I use Update Docs 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 sd0xdev/sd0x-harness --skill update-docs -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/update-docs, .gemini/skills/update-docs, .github/skills/update-docs and .opencode/skills/update-docs in your project.

What does Update Docs need to run?

SKILL.md names no scripts, command-line tools or credentials: Update Docs is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(ls:*), Bash(git:*), Bash(find:*), Bash(node:*).

Does Update Docs access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Update Docs 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 Update Docs use?

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

About 2.1k tokens (SKILL.md is roughly 8.6k 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 Update Docs?

Skills that share tags, products or a category with Update Docs: Vercel Composition Patterns (supabase/supabase, 111k stars), Finishing a Development Branch (obra/superpowers, 296k stars), Typescript Advanced Types (rolling-scopes/rsschool-app, 10k stars) and PR Babysitter (openinterpreter/openinterpreter, 69k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Update Docs?

sd0xdev (a GitHub user) maintains it in sd0xdev/sd0x-harness, which has 192 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 8, 2026.

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