Skip to main content
subagent CX Codex

docs-writer · justxor — Claude Code subagent: keep docs in sync with code

docs-writer — a subagent that updates README, API docs, code comments, and ADRs whenever your code changes. It verifies actual behavior and keeps examples aligned with reality.

MIT ★ 353 updated 2026-10-01

Install into Claude Code · Manually: put the files in place All methods and platforms ↓
.claude/agents/docs-writer.md
Open on GitHub

What docs-writer does

docs-writer tracks code changes via git diff, identifies affected documentation, and rewrites it while preserving style and structure. It leads with usage ("how to do it"), then explains design. It avoids stating the obvious—clarity matters where decisions need reasoning, trade-offs are real, or the pattern isn't standard.

The agent has access to Read, Grep, Glob, Edit, Write, and Bash tools, so it can run and verify the examples in your docs. Sonnet model keeps responses fast without cutting corners. Works well for projects where code moves quickly and docs must stay current without manual sync overhead.

What it helps with

  • Keep README aligned when API changes
  • Update code examples after a refactor
  • Write and refresh ADRs and inline comments
  • Verify documentation examples still work

Example prompts for the agent

  • Update all docs to match the code I just changed
  • Sync the README and API documentation with current signatures
  • Add comments and an ADR explaining the new database schema

How to install docs-writer

Manually: put the files in place

.claude/agents/docs-writer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about docs-writer

How do I install docs-writer in Claude Code?

Create .claude/agents/docs-writer.md at your project root with the subagent config. For other IDEs: .codex/agents/docs-writer.toml (Codex) or .cursor/agents/docs-writer.md (Cursor).

What does docs-writer do?

It scans your code changes, finds related docs (README, API reference, comments, ADRs), and rewrites them so they describe what the code actually does now, not what it did before.

Do I need to review every doc update?

The subagent runs and tests examples against real code, so facts are accurate. Skim for tone and format fit—if your project has a doc style or structure, mention it upfront.

Source text

docs-writer.md · MIT
---
name: docs-writer
description: Технический писатель. Используй для обновления README, документации API, комментариев и ADR после изменений кода.
tools: Read, Grep, Glob, Edit, Write, Bash
model: sonnet
---

Ты технический писатель в команде разработки.

Принципы:
- Документация описывает **фактическое** поведение — проверяй по коду, запускай команды из примеров.
- Кратко, с примерами. Сначала «как сделать», потом «как устроено».
- Сохраняй стиль и структуру существующих документов.
- Не документируй очевидное; документируй неочевидное и решения («почему»).

При вызове:
1. Определи, какие изменения кода влияют на документацию (`git diff`).
2. Обнови затронутые документы. Не создавай новые файлы без необходимости.
3. Верни список изменённых документов и что именно обновлено.

© justxor · MIT · justxor/claude-code-pro-course

Similar subagents

All subagents for Writing and docs →

docs-writer by other authors comes first.

docs-writer CloudAI-X The docs-writer subagent reads the implementation before creating or updating docs. Use it for README files, API references, guides, and documentation changes tied to code updates. CX Codex ★ 1,424repo stars docs-writer alirezarezvani docs-writer drafts API references, user tutorials, and architecture guides directly from your repository in Claude Code and Cursor. CX Codex ★ 788repo stars tech-docs-writer jarrodwatts tech-docs-writer explores unfamiliar codebases to generate and maintain technical documentation, README files, and API guides with verified code samples. CX Codex ★ 1,064repo stars code-documentation-analyzer Jeremy Longshore Auto-activating skill for auditing code documentation: API references, user guides, architecture docs. Triggers on phrases like "code documentation analyzer" or "code analyzer". CX Codex +1 1installs documentation official anthropics documentation — a skill for technical writing that drafts READMEs, API references, runbooks, architecture docs and onboarding guides. Useful when the code exists but the description does not. CX Codex +1 10,800installs gem-documentation-writer official github The gem-documentation-writer subagent for GitHub Copilot creates technical documentation, READMEs, API docs, and diagrams. It triggers when a task requires documentation updates or PRD generation. CX Codex +1 ★ 41,430repo stars docs sametcelikbicak docs is a Claude Code subagent that drafts technical guides, API documentation, and changelogs from build artifacts. Activates during release preparation and README updates. CX Codex ★ 71repo stars

From the same set15

The whole set →
review This skill checks code changes for security issues and exposed secrets, then reports findings with risk levels and file locations. Run it before a merge or when asked for a security review. CX Codex +1 ★ 353repo stars fix-issue fix-issue — a skill that runs the full cycle of fixing a GitHub issue by number — from analysis and test to commit. CX Codex +1 ★ 353repo stars test-runner test-runner runs tests on modified files, diagnoses failures, and distinguishes real code bugs from outdated test suites. CX Codex ★ 353repo stars debugger The debugger subagent reproduces errors and failing tests, tracks down their cause, then checks the fix. Use it when a stack trace or unexpected behavior needs investigation. CX Codex ★ 353repo stars pr-description pr-description generates clear pull request titles and descriptions by inspecting branch commits and diffs against main. CX Codex +1 ★ 353repo stars architect The architect subagent examines a project before implementation, compares design options, and lays out a change plan. Use it to scope a feature or a major refactor. CX Codex ★ 353repo stars code-reviewer code-reviewer reads your diff, flags security holes, missing tests and edge cases, then returns a severity-sorted report with a file and line for each fix. CX Codex ★ 353repo stars write-tests write-tests generates unit tests for a chosen file or function while matching existing project patterns. It runs new checks and flags discovered bugs instead of bending assertions. CX Codex +1 ★ 353repo stars

Project sponsors

Companies that keep this analytics open