docs-manager-skill
Orchestrates complete single-document workflows with automatic validation and indexing in a write→validate→index pipeline
When & Why to Use This Skill
The docs-manager-skill is a sophisticated orchestration agent designed to automate the end-to-end lifecycle of technical documentation. By implementing a rigorous 'write→validate→index' pipeline, it ensures that every document is professionally authored, strictly adheres to organizational schemas, and is automatically indexed for seamless knowledge management and discoverability.
Use Cases
- Automated API Documentation: Streamline the creation of API references by automatically generating content, validating it against JSON schemas, and updating the central API index.
- Standardized Project Onboarding: Orchestrate the production of README files and setup guides that follow strict technical standards and templates to maintain consistency across repositories.
- Continuous Documentation Maintenance: Efficiently update existing technical docs with new feature context while ensuring version control integrity and automatic re-validation of content.
| name | docs-manager-skill |
|---|---|
| description | Orchestrates complete single-document workflows with automatic validation and indexing in a write→validate→index pipeline |
| model | claude-haiku-4-5 |
docs-manager-skill
**Purpose**: Orchestrate complete single-document workflows with automatic validation and indexing.Architecture: Coordination skill (Layer 2) - manages write → validate → index pipeline for single documents.
Scope: ONE document at a time (director handles multi-doc operations).
1. **Single Document Focus** - ALWAYS operate on exactly ONE document - NEVER handle wildcards or patterns (that's docs-director-skill's job)Workflow Coordination
- ALWAYS execute: write → validate → index (3-phase pipeline)
- NEVER skip validation unless explicitly requested
- ALWAYS update index after successful write+validate
Type Context Loading
- ALWAYS load type context before operations
- NEVER proceed without valid doc_type
Error Handling
- STOP immediately on validation errors
- REPORT all failures clearly
- ROLLBACK if index update fails (delete written file)
Operation Skills
- ALWAYS use operation skills (doc-writer, doc-validator, doc-lister)
- NEVER implement operations directly
For write/update:
doc_typeOR auto-detect from path/contentcontext- Conversational context (what user wants)template_data- Explicit template variables (optional)skip_validation- Skip validation step (default: false)skip_index- Skip index update (default: false)
For validate:
doc_typeOR auto-detect
For index:
doc_type- Requireddirectory- Directory to index (default: parent of file_path)
Classify Document Type
- If doc_type provided: use it
- Else: invoke doc-classifier skill to auto-detect from path
Load Type Context
- Load schema.json, template.md, standards.md from types/{doc_type}/
- Build context bundle: conversational + type-specific + template_data
Invoke doc-writer Skill
- Pass: file_path, doc_type, context bundle
- Receive: written file path
Validate Document (unless skip_validation=true)
- Invoke doc-validator skill
- Pass: file_path, doc_type
- If validation fails: STOP, report errors
- If validation succeeds: continue
Update Index (unless skip_index=true)
- Determine directory from file_path
- Invoke index-updater.sh script
- Pass: directory, doc_type
Return Success
{ "status": "success", "operation": "write", "file_path": "docs/api/user-login/README.md", "doc_type": "api", "validation": "passed", "index_updated": true }
Operation: update
Same as write, but:
- Read existing file first
- Merge existing content with new context
- Bump version if version field exists
Operation: validate
Classify Document Type
- Auto-detect if not provided
Invoke doc-validator Skill
- Pass: file_path, doc_type
- Return validation results
Operation: index
- Invoke index-updater.sh
- Pass: directory, doc_type
- Return index update status
Failure:
{
"status": "error",
"operation": "write|update|validate|index",
"error": "Validation failed: missing required field 'endpoint'",
"file_path": "path/to/file",
"validation_errors": ["error1", "error2"]
}
Output structured messages:
Start:
🎯 STARTING: docs-manager-skill
Operation: write
File: docs/api/user-login/README.md
Doc Type: api
───────────────────────────────────────
During Execution:
Step 1/5: Classifying document type...
✅ Detected: api (confidence: 100, method: path)
Step 2/5: Loading type context...
✅ Loaded: schema.json, template.md, standards.md
Step 3/5: Writing document...
✅ Generated: docs/api/user-login/README.md
Step 4/5: Validating document...
✅ Validation passed (0 errors, 0 warnings)
Step 5/5: Updating index...
✅ Index updated: docs/api/README.md
Completion:
✅ COMPLETED: docs-manager-skill
Operation: write
File: docs/api/user-login/README.md
Artifacts:
- docs/api/user-login/README.md
- docs/api/README.md (index)
───────────────────────────────────────
Next: Document ready for review
**Validation Errors**:
- Stop pipeline immediately
- Report all validation errors
- Do NOT update index
- Do NOT delete written file (user may want to fix manually)
Index Update Errors:
- Report error
- Document is still valid (validation passed)
- Suggest manual index update
Type Detection Errors:
- Cannot proceed without valid doc_type
- Suggest manual doc_type specification
- List available doc_types
Script Execution Errors:
- Report script path and error message
- Suggest checking script permissions
- Provide command to run script manually for debugging