docs
Original:🇺🇸 English
Translated
Initialize or update project documentation. Use when setting up docs for a new project (`--init`) or syncing docs to current codebase and architecture changes (`--update`).
12installs
Sourcebuiducnhat/agent-skills
Added on
NPX Install
npx skill4agent add buiducnhat/agent-skills docsTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Docs
Create and maintain project documentation in with a consistent, lightweight workflow.
docs/Parameters
- : Create documentation for the first time.
--init - : Refresh existing documentation without rewriting from scratch.
--update
Outputs
Always maintain these files:
- — product goals, users, requirements
docs/project-pdr.md - — stack, conventions, development rules
docs/code-standard.md - — codebase map and key files
docs/codebase.md - — components, interactions, data flow
docs/architecture.md
Also keep aligned with current docs links and project summary.
README.mdWorkflow
Step 1: Context Scan (Docs First)
Review documentation first, then inspect code/config only as needed.
Priority order:
docs/project-pdr.mddocs/code-standard.mddocs/codebase.mddocs/architecture.mdREADME.md- Key source/config files
Focus on facts that changed: features, architecture, stack, structure, and workflows.
Step 2: Choose Mode
- If docs do not exist or are incomplete: run behavior.
--init - If docs exist: run behavior.
--update - If mode is unspecified, infer from repository state and state your assumption.
Step 3: Produce Documentation
--init
--init- Create if missing.
docs/ - Create all required documentation files.
- Populate each file with concrete, project-specific content.
- Avoid placeholders and generic templates.
--update
--update- Preserve useful existing content and section structure.
- Update stale or inaccurate sections.
- Add newly discovered features/components/conventions.
- Remove clearly obsolete statements.
Step 4: Sync README
Ensure includes:
README.md- Short project overview
- Quick start (if present in project)
- Documentation links section pointing to all 4 docs files
Step 5: Validate Quality
Before finishing, verify:
- 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 by File
project-pdr.md
project-pdr.mdInclude:
- Problem statement
- Product purpose
- Target users
- Core use cases
- Feature scope and constraints
- Success criteria
code-standard.md
code-standard.mdInclude:
- Languages/frameworks/tools in use
- Naming and structure conventions
- Testing/linting/formatting expectations
- PR/commit expectations if discoverable
codebase.md
codebase.mdInclude:
- High-level tree
- Directory responsibilities
- Key entry points and modules
- Important scripts/config files
architecture.md
architecture.mdInclude:
- Main components/subsystems
- Data flow between components
- Integration boundaries (internal/external)
- Deployment/runtime assumptions (if known)
Clarification Rules
Ask targeted questions only when information cannot be reliably inferred, especially for:
- Business goals and domain intent
- Ambiguous ownership/responsibility of modules
- Conflicting conventions
- Unclear architecture decisions
Prefer 1 focused question at a time.
Rules
- Keep documentation factual; do not invent requirements.
- Prefer concise updates over verbose prose.
- Keep docs aligned with current implementation.
- Follow project conventions from .
docs/code-standard.md - When uncertain, mark assumptions explicitly and request confirmation.