
Docs
- 425 installs
- 52 repo stars
- Updated July 6, 2026
- buiducnhat/agent-skills
docs is a CoBrew agent skill that creates or incrementally updates a structured docs/ tree from repository scans for developers who need codebase-aligned project documentation.
About
docs is a workflow skill from buiducnhat's CoBrew plugin that creates or refreshes project documentation inside docs/. It scans README, config files, source directories, and recent git history, then either initializes four topic folders—architecture, codebase, code-standard, and project-pdr—or surgically updates existing files without full rewrites. Every run regenerates docs/SUMMARY.md with an Agent Context Guide and syncs README links. The skill enforces content-named detail files, bans generic overview.md names, and validates that listed files exist on disk. Developers invoke docs when onboarding agents to a repo, after major refactors, or when docs/SUMMARY.md is missing or stale relative to the current implementation.
- README and API reference drafting
- Architecture note generation
- Docstring alignment with code
- Setup and usage instructions
- Keeps docs synchronized with changes
Docs by the numbers
- 425 all-time installs (skills.sh)
- Ranked #400 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/buiducnhat/agent-skills --skill docsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 425 |
|---|---|
| repo stars | ★ 52 |
| Last updated | July 6, 2026 |
| Repository | buiducnhat/agent-skills ↗ |
How do you sync project docs to code?
Generate and update READMEs, API references, architecture notes, and inline docstrings from codebase context so documentation stays aligned with shipped behavior.
Who is it for?
Developers who need agent-readable, codebase-factual documentation initialized or kept current after refactors.
Skip if: Skip docs when you only need inline JSDoc on functions or a one-off README paragraph without a structured docs/ tree.
When should I use this skill?
User asks to create docs/, refresh SUMMARY.md, document architecture from code, or sync documentation after codebase changes.
What you get
docs/SUMMARY.md, topic markdown files, and an updated README documentation link
- docs/SUMMARY.md
- topic markdown files
- updated README.md
By the numbers
- Maintains 4 standard documentation topic folders under docs/
- Runs a 5-step workflow ending in README sync and quality validation
- CoBrew ships 10 first-party workflow skills including docs
Files
Docs
Create and maintain project documentation in docs/ with a consistent, lightweight structure.
Outputs
Maintain these outputs:
1. docs/SUMMARY.md — documentation entry point with an Agent Context Guide (always regenerated) 2. docs/architecture/ — system design, infrastructure, component interactions, data flows, feature flows. Focus on _how the system works_, not file/code structure. 3. docs/codebase/ — file organization, directory structure, entry points, key modules and their responsibilities. Focus on _where things live in the code_. 4. docs/code-standard/ — coding conventions, naming rules, style guides, environment setup, custom rules and patterns the team follows. Focus on _how to write code that fits in with the existing codebase_, best practices, and team conventions, very important for maintaining consistency. 5. docs/project-pdr/ — product goals, use cases, business rules, constraints, and decision rationale. Nice to have many use case/requirements files
Also keep README.md aligned with current docs links and project summary.
Workflow
Step 1: Context Scan
Scan the project to understand what needs documenting:
1. Read existing docs if any (docs/SUMMARY.md and topic folders) 2. Read README.md and key config files (package.json, tsconfig.json, Cargo.toml, etc.) 3. Scan source directories to understand project structure, entry points, and major components 4. Check git log --oneline -20 for recent changes when updating existing docs
Focus on facts: features, architecture, stack, directory structure, and workflows. Do not invent requirements or assume business logic that is not evident from the code.
Step 2: Infer Behavior
- Infer whether the repository needs an initial documentation pass or an incremental update based on the current
docs/state. - If
docs/does not exist or is clearly incomplete, perform initialization behavior. - If
docs/already exists with the standard structure, perform update behavior. - State the inferred behavior briefly when relevant.
Step 3: Produce Documentation
Initialize docs when missing or incomplete
1. Create docs/ and 4 topic folders: architecture/, codebase/, code-standard/, project-pdr/ 2. For each topic folder: a. Scan codebase for relevant information b. Generate content based on codebase scan c. Create topic-specific files based on content found in the codebase. Name each file by its content (e.g., components.md, conventions.md). Do NOT use generic names (overview.md, index.md, main.md). Split into multiple files when content covers 2+ clearly distinct sub-topics. Minimum 1 file per folder. 3. Create docs/SUMMARY.md using the format specified in Content Requirements, including the Agent Context Guide 4. Update README.md with link to docs/SUMMARY.md
Populate each file with concrete, project-specific content. Avoid placeholders and generic templates.
Update docs when they already exist
1. Detect what changed: compare current code against existing docs. Use git log --oneline and source file scanning to identify new/modified/removed components. 2. Preserve useful existing content and section structure. 3. Update stale or inaccurate sections in-place — do not rewrite from scratch. 4. Add newly discovered features, components, or conventions. 5. Remove clearly obsolete statements. 6. Add, modify, or remove detail files as needed based on content changes. 7. Regenerate docs/SUMMARY.md to match current files — only list files that actually exist on disk and keep the Agent Context Guide. 8. Update README.md if documentation links changed.
Important: The goal is an incremental, surgical update — not a full rewrite.
Step 4: Sync README
Ensure README.md includes:
- Short project overview
- Quick start (if present in project)
- Documentation link pointing to
docs/SUMMARY.md
Step 5: Validate Quality
Before finishing, verify:
docs/SUMMARY.mdexists and lists every detail file that actually exists on disk (no phantom entries)- Each topic folder has at least 1 topic-specific file
- No generic file names (
overview.md,index.md,main.md) in topic folders README.mdlinks point todocs/SUMMARY.mdSUMMARY.mdis concise, contains theAgent Context Guide, and contains file tables for all sections- Terminology is consistent across files
- No contradictions between docs and code
- Paths and component names are accurate
- Content is concise, specific, and actionable
Content Requirements
SUMMARY.md format
Contains project overview, a concise Agent Context Guide, and file tables for each documentation section.
Strictly follow the template in references/summary-template.md.
The Agent Context Guide must stay limited to project context loading:
- Read
docs/SUMMARY.mdfirst when it exists - Load only task-relevant detail docs
- Prioritize
Code Standarddocs for implementation conventions - Use the available input/question before broad changes when docs conflict with code or user intent
Do not use the guide to duplicate general engineering principles, git rules, or detailed question-tool procedures.
Topic file rules
- Each file focuses on 1 specific sub-topic within its folder
- Named by content slug:
components.md,conventions.md,product-goals.md - Do NOT use generic names:
overview.md,index.md,main.md,general.md - Keep files focused and concise without enforcing line-count targets
Edge Cases
- Minimal/empty project: If the codebase has very little code, keep topic files short and factual. Do not pad content to reach arbitrary size targets. Mark sections as "TBD — to be documented as the project grows" when there is genuinely nothing to document yet. Even with 1 file per folder, name it by its content.
- Custom files in `docs/`: Preserve any user-created files outside the 4 standard topic folders (e.g.,
docs/API.md,docs/deployment.md). List them under "Other" inSUMMARY.md. Do not move or rename them. - Monorepo: If the project contains multiple packages/apps, document the overall structure in
architecture/components.mdand note each package's purpose. Each package does not need its own full docs set — keep it proportional.
Rules
- Keep documentation factual; do not invent requirements.
- Prefer concise updates over verbose prose.
- Keep docs aligned with current implementation.
- When uncertain, mark assumptions explicitly and request confirmation.
- Ask targeted questions when information cannot be reliably inferred (business goals, ambiguous module ownership, conflicting conventions, unclear architecture decisions).
Documentation Summary
Project name — 1-2 sentence project description. Key tech stack or architecture summary.
Agent Context Guide
Before planning or implementing, read this docs/SUMMARY.md file first. Load only the detail docs relevant to the current task, and prioritize Code Standard docs for implementation conventions. If docs conflict with code or user intent, use the available question tool before making broad changes.
Architecture
System design, component interactions, data flows, deployment, and external integrations.
| File | Description |
|---|---|
| ... | _Named by content found during codebase scan_ |
Codebase
Directory structure, entry points, API patterns, and key modules.
| File | Description |
|---|---|
| ... | _Named by content found during codebase scan_ |
Code Standard
Conventions, naming rules, tech stack versions, and development workflows.
| File | Description |
|---|---|
| ... | _Named by content found during codebase scan_ |
Project PDR
Product goals, use cases, business rules, and constraints.
| File | Description |
|---|---|
| ... | _Named by content found during codebase scan_ |
Other
Optional section for repository-specific docs outside the standard topic folders, such as dated brainstorms, plans, or deployment notes.
| File | Description |
|---|---|
| ... | _Only include files that actually exist_ |
Related skills
How it compares
Pick docs over code-documentation when you need repo-level docs/SUMMARY.md and architecture folders, not inline JSDoc or function-level comments.
FAQ
What files does the docs skill maintain?
The docs skill maintains docs/SUMMARY.md as the entry point plus four topic folders: architecture, codebase, code-standard, and project-pdr. It also syncs README.md to link to docs/SUMMARY.md and preserves custom docs files under an Other section.
Does docs rewrite all documentation on every update?
No—docs performs incremental, surgical updates when the standard structure already exists. It preserves useful sections, edits stale content in place, adds newly discovered components, and regenerates SUMMARY.md to match files that actually exist on disk.