Claude-skill-registry docs-bootstrapper
Bootstraps documentation structure for projects. Creates initial README, architecture docs, and API documentation with project-aware templates.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/docs-bootstrapper" ~/.claude/skills/majiayu000-claude-skill-registry-docs-bootstrapper && rm -rf "$T"
skills/data/docs-bootstrapper/SKILL.mdDocumentation Bootstrapper Skill
Purpose
This skill creates initial documentation structure for projects that lack proper documentation. It detects project type and generates appropriate documentation templates, including README, architecture overview, and API documentation.
When to Activate
Use this skill when:
- Starting a new project without documentation
- Existing project lacks basic documentation structure
- docs-analyzer identifies missing documentation structure
- User explicitly requests documentation bootstrapping
- Migrating from undocumented codebase
Core Workflow
Step 1: Check Existing Documentation
Before bootstrapping, verify what documentation already exists:
Check for:
- README.md (root)
- docs/ directory
- CONTRIBUTING.md
- Architecture documentation
- API documentation
Decision:
- If comprehensive docs exist: Skip bootstrapping, report status
- If partial docs exist: Ask user if they want to supplement
- If no docs exist: Proceed with full bootstrap
Step 2: Detect Project Type
Analyze the codebase to determine project type and technology stack.
Backend Projects
Django:
- Indicators:
,manage.py
,settings.py
with Djangorequirements.txt - Framework: Django + DRF
- Components: ViewSets, Models, Serializers, Migrations
FastAPI:
- Indicators:
,main.py
with fastapirequirements.txt - Framework: FastAPI + Pydantic
- Components: Route handlers, Schemas, Dependencies
Express:
- Indicators:
with express,package.json
orapp.jsserver.js - Framework: Express.js
- Components: Routes, Controllers, Middleware
NestJS:
- Indicators:
,nest-cli.json
with @nestjspackage.json - Framework: NestJS
- Components: Controllers, Services, Modules
Flask:
- Indicators:
,app.py
with flaskrequirements.txt - Framework: Flask
- Components: Routes, Blueprints
Spring Boot:
- Indicators:
orpom.xml
,build.gradleApplication.java - Framework: Spring Boot
- Components: Controllers, Services, Repositories
Frontend Projects
React:
- Indicators:
with react,package.json
or.jsx
files.tsx - Framework: React
- Components: Functional components, Hooks, Context
Vue:
- Indicators:
with vue,package.json
,vue.config.js
files.vue - Framework: Vue 3
- Components: Single File Components, Composition API
Angular:
- Indicators:
,angular.json
with @angularpackage.json - Framework: Angular
- Components: Components, Services, Modules
Next.js:
- Indicators:
,next.config.js
directorypages/ - Framework: Next.js (React)
- Components: Pages, API routes, Components
Svelte:
- Indicators:
,svelte.config.js
files.svelte - Framework: Svelte
- Components: Svelte components
Full-Stack Projects
Indicators:
- Both frontend and backend markers present
- Monorepo structure (
,apps/
,packages/
)workspaces - Multiple package.json files
Infrastructure Projects
Terraform:
- Indicators:
files.tf - Type: Infrastructure as Code
- Resources: Providers, Modules, Resources
Kubernetes:
- Indicators:
files with.yaml
,kind:apiVersion: - Type: Container orchestration
- Resources: Pods, Services, Deployments
Docker:
- Indicators:
,Dockerfiledocker-compose.yml - Type: Containerization
- Resources: Services, Images, Networks
Ansible:
- Indicators:
,playbook.ymlansible.cfg - Type: Configuration management
- Resources: Playbooks, Roles, Tasks
Library/Package Projects
Python Package:
- Indicators:
,setup.py
without web frameworkpyproject.toml - Type: Library
- Structure: Package with init.py
JavaScript/TypeScript Library:
- Indicators:
withpackage.json
field, no web framework"main" - Type: Library
- Structure: Exported modules
Rust Crate:
- Indicators:
,Cargo.tomlsrc/lib.rs - Type: Library
- Structure: Cargo package
Go Package:
- Indicators:
, package structurego.mod - Type: Library
- Structure: Go module
Detection Method:
# Use Glob to find indicator files Glob: "manage.py" # Django Glob: "main.py" # FastAPI Glob: "package.json" # Node.js # Use Read to check file contents Read: "package.json" # Check dependencies # Use Grep to find specific patterns Grep: pattern="from django" glob="*.py" # Django imports Grep: pattern="from fastapi" glob="*.py" # FastAPI imports
Step 3: Generate README.md
Create comprehensive README based on project type using template.
README Sections (adapt based on project type):
-
Project Header
- Project name (from directory or package.json/setup.py)
- Brief description (placeholder for user to fill)
- Badges (build status, coverage - placeholders)
-
Overview
- What the project does
- Key features (placeholder with examples)
- Technology stack (detected technologies)
-
Installation
- Prerequisites (based on project type)
- Installation steps (framework-specific)
- Environment setup
-
Usage
- Quick start example
- Common commands (framework-specific)
- Configuration options
-
Project Structure
- Directory tree (generated from actual structure)
- Key directories explanation
-
Development
- Setup development environment
- Running tests (framework-specific commands)
- Code style guidelines
-
API Documentation (for backend projects)
- Link to detailed API docs
- Example endpoints
-
Deployment (if applicable)
- Deployment prerequisites
- Deployment steps
- Environment variables
-
Contributing
- Link to CONTRIBUTING.md
- Basic contribution workflow
-
License
- License type (detect from LICENSE file or placeholder)
Use template:
templates/README.template.md with placeholders replaced
Step 4: Create docs/ Directory Structure
Generate standard documentation directory:
docs/ ├── architecture.md ├── api.md (for backend/full-stack) └── .gitkeep (if empty)
Step 5: Generate architecture.md
Create architecture documentation using template.
Architecture Sections (adapt based on project type):
-
System Overview
- High-level description
- Main components
- Technology choices
-
Architecture Diagram (Mermaid placeholder)
- Component diagram
- Data flow diagram
- Deployment diagram (for infrastructure)
-
Components
- Component 1: Description
- Component 2: Description
- (Based on detected project structure)
-
Data Flow
- Request/response flow (backend)
- State management flow (frontend)
- Resource provisioning (infrastructure)
-
Technology Stack
- Languages
- Frameworks
- Libraries
- Infrastructure
-
Design Decisions
- Key architectural choices (placeholders)
- Trade-offs considered
Use template:
templates/architecture.template.md
Step 6: Generate api.md (Backend/Full-Stack Only)
Create API documentation template.
API Documentation Sections:
-
Overview
- API base URL (placeholder)
- Authentication method (detect or placeholder)
- Response format (JSON, XML, etc.)
-
Authentication
- Auth type (JWT, OAuth, API Key)
- How to authenticate
- Example auth request
-
Endpoints
- Table of endpoints (detect from code or placeholders)
- Method | Endpoint | Description
- Request/response examples
-
Error Handling
- Error response format
- Common error codes
-
Rate Limiting (if applicable)
- Rate limit rules
- Headers
Use template:
templates/api.template.md
Step 7: Create Directory Structure Visual
Generate directory tree for README using Bash:
# Generate tree (if tree command available) tree -L 3 -I 'node_modules|__pycache__|*.pyc|.git' # Or use find find . -type d -maxdepth 3 | grep -v node_modules | grep -v __pycache__
Insert into README.md
Step 8: Populate Placeholders
Replace template placeholders with detected values:
Replacements:
: From directory name, package.json, setup.py{{PROJECT_NAME}}
: Placeholder or from package.json{{DESCRIPTION}}
: Detected framework (Django, React, etc.){{FRAMEWORK}}
: Detected language (Python, JavaScript, etc.){{LANGUAGE}}
: Framework-specific ({{INSTALL_COMMAND}}
,pip install
)npm install
: Framework-specific ({{RUN_COMMAND}}
,python manage.py runserver
)npm start
: Framework-specific ({{TEST_COMMAND}}
,pytest
)npm test
Step 9: Report Creation
After creating files, report to user:
# Documentation Bootstrap Complete ✅ ## Created Files - README.md (X lines) - docs/architecture.md (Y lines) - docs/api.md (Z lines) [if applicable] ## Project Type Detected - Type: [Django Backend / React Frontend / etc.] - Framework: [framework name] - Language: [language] ## Next Steps 1. Review generated documentation 2. Fill in placeholders marked with [PLACEHOLDER] or {{VARIABLE}} 3. Add project-specific details 4. Update Mermaid diagrams with actual architecture 5. Add real API endpoint examples ## Customization Needed - [ ] Add project description in README.md - [ ] Fill technology stack details - [ ] Add real API endpoints in docs/api.md - [ ] Update architecture diagram - [ ] Add deployment instructions - [ ] Update environment variables
Templates
Templates are located in
skills/docs-bootstrapper/templates/:
- README.template.md: Main README template
- architecture.template.md: Architecture doc template
- api.template.md: API documentation template
Templates use placeholders:
: Auto-replaced with detected values{{VARIABLE}}
: User must fill in[PLACEHOLDER]
: Optional section, can be removed[OPTIONAL]
Integration with Other Skills
- docs-manager: Invokes bootstrapper when no docs exist
- docs-analyzer: Identifies when bootstrapping is needed
- mermaid-expert: Called after bootstrapping to fill diagram placeholders
Example Usage
Scenario 1: New Django Project
User: /docs-bootstrapper docs-bootstrapper: Checking existing documentation... No comprehensive docs found. Detecting project type... ✓ Detected: Django Backend ✓ Framework: Django 4.2 + DRF ✓ Database: PostgreSQL (from settings) Creating documentation... ✓ README.md created (180 lines) ✓ docs/architecture.md created (120 lines) ✓ docs/api.md created (90 lines) Bootstrap complete! Review and customize generated docs.
Scenario 2: React Project
User: Bootstrap documentation for this React app docs-bootstrapper: Detecting project type... ✓ Detected: React Frontend ✓ Framework: React 18 + TypeScript ✓ State: Redux Toolkit Creating documentation... ✓ README.md created (160 lines) ✓ docs/architecture.md created (100 lines) Bootstrap complete! Frontend project detected, no API docs generated.
Guidelines
Do:
- ✅ Detect project type accurately
- ✅ Use appropriate templates for project type
- ✅ Generate realistic directory structures
- ✅ Provide clear placeholders for user input
- ✅ Report what was created
- ✅ Give next steps guidance
Don't:
- ❌ Overwrite existing comprehensive documentation
- ❌ Make assumptions about business logic
- ❌ Generate fake/incorrect API endpoints
- ❌ Include overly generic content
- ❌ Skip project type detection
- ❌ Create docs without user awareness
Standalone Usage
Can be invoked directly when starting new projects:
User: /docs-bootstrapper Skill: Detects project, creates comprehensive documentation structure
Or called by docs-manager when gap analysis shows no docs exist.