skills/scribe-role-skill/SKILL.md
Professional technical writing and documentation skill for creating and maintaining comprehensive, accurate, and user-friendly documentation for codebases, APIs, deployment processes, and end-user guides.
npx skillsauth add enuno/claude-command-and-control scribe-role-skillInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create and maintain comprehensive, accurate, and user-friendly documentation for codebases, APIs, deployment processes, and end-user guides. This skill implements professional technical writing practices including documentation planning, structured content creation, and maintenance workflows.
Create complete documentation suite for a project.
Step 1.1: Codebase Analysis
# Understand project structure
tree -L 3 -I 'node_modules|.git|dist|build'
# Identify main entry points
find . -name "index.*" -o -name "main.*" -o -name "app.*" | grep -v node_modules
# Review package manifest
cat package.json || cat requirements.txt || cat pom.xml || cat Cargo.toml
# Check existing documentation
find . -name "*.md" -o -name "*.rst" | grep -v node_modules
Step 1.2: Documentation Planning
Create DOCUMENTATION_PLAN.md:
# Documentation Plan: [Project Name]
## Current State Assessment
- Existing docs: [List what exists]
- Documentation gaps: [What's missing]
- Outdated sections: [What needs updating]
## Documentation Structure
docs/ ├── README.md # Project overview ├── GETTING_STARTED.md # Quick start guide ├── BUILDING.md # Build instructions ├── DEPLOYMENT.md # Deployment guide ├── USAGE.md # User manual ├── API.md # API reference ├── ARCHITECTURE.md # System architecture ├── CONTRIBUTING.md # Contribution guidelines ├── TROUBLESHOOTING.md # Common issues └── CHANGELOG.md # Version history
## Priority
1. **Critical (Must Have)**:
- README.md
- BUILDING.md
- DEPLOYMENT.md
2. **Important (Should Have)**:
- API.md
- USAGE.md
- TROUBLESHOOTING.md
3. **Nice to Have**:
- ARCHITECTURE.md (if not done by architect)
- CONTRIBUTING.md
- Advanced guides
## Timeline
- Phase 1 (Critical): Immediate
- Phase 2 (Important): Next sprint
- Phase 3 (Nice to Have): Following sprint
Step 1.3: Create Core Documentation
# [Project Name]
[One-sentence description of what this project does]
## Overview
[2-3 paragraph description covering:
- What problem does this solve?
- Who is it for?
- What are the key features?]
## Quick Start
```bash
# Clone the repository
git clone [repository-url]
cd [project-name]
# Install dependencies
npm install # or pip install -r requirements.txt, etc.
# Run the application
npm start # or python main.py, etc.
See GETTING_STARTED.md for detailed installation instructions.
See USAGE.md for comprehensive usage documentation.
See CONTRIBUTING.md for contribution guidelines.
[License type and link]
[Acknowledgments, authors, contributors]
#### BUILDING.md Template
```markdown
# Building [Project Name]
This guide covers how to build the application from source.
## Prerequisites
### Required Tools
- [Tool 1]: version X.X+ ([installation link])
- [Tool 2]: version Y.Y+ ([installation link])
- [Tool 3]: version Z.Z+ ([installation link])
### Optional Tools
- [Tool]: For [purpose]
## Environment Setup
### macOS
```bash
# Install dependencies
brew install [package1] [package2]
# Set environment variables
export VAR_NAME=value
# Install dependencies
sudo apt-get update
sudo apt-get install [package1] [package2]
# Set environment variables
export VAR_NAME=value
# Install dependencies using chocolatey
choco install [package1] [package2]
# Set environment variables
$env:VAR_NAME="value"
# Install dependencies
npm install # or equivalent
# Build for development
npm run build:dev
# Output location: ./dist/
# Clean previous builds
npm run clean
# Install production dependencies
npm ci --production
# Build optimized version
npm run build:prod
# Output location: ./dist/production/
Configuration files:
build.config.js: Main build configuration.env.build: Build-time environment variableswebpack.config.js: Bundler configuration (if applicable)Key configuration options:
{
mode: 'production', // production | development
optimization: true, // Enable optimizations
minify: true, // Minify output
sourceMaps: false // Generate source maps
}
After successful build, the following artifacts are generated:
dist/
├── app.[hash].js # Main application bundle
├── vendor.[hash].js # Third-party dependencies
├── styles.[hash].css # Compiled styles
├── assets/ # Static assets
│ ├── images/
│ └── fonts/
└── index.html # Entry point
Issue: Build fails with "out of memory" error
# Solution: Increase Node memory limit
export NODE_OPTIONS="--max-old-space-size=4096"
npm run build
Issue: Dependency resolution fails
# Solution: Clear cache and reinstall
rm -rf node_modules package-lock.json
npm cache clean --force
npm install
Issue: Module not found errors
# Solution: Verify all dependencies installed
npm list --depth=0
npm install [missing-package]
This project uses [CI system] for automated builds.
Build triggers:
main branch: Production builddevelop branch: Development buildBuild status:
Typical build times:
To improve build performance:
npm run build:watchbuild.config.js--parallel flagAfter building, see:
#### DEPLOYMENT.md Template
```markdown
# Deploying [Project Name]
This guide covers deploying the application to various environments.
## Environments
| Environment | Purpose | URL | Access |
|------------|---------|-----|--------|
| Development | Local development | localhost:3000 | All developers |
| QA | Testing | qa.example.com | QA team |
| Staging | Pre-production validation | staging.example.com | Internal users |
| Production | Live application | www.example.com | Public |
## Prerequisites
### Required
- Built application artifacts (see [BUILDING.md](BUILDING.md))
- Access credentials for target environment
- [Cloud provider] CLI tools installed and configured
### Environment Variables
Create `.env.[environment]` file:
```bash
# Application
NODE_ENV=production
PORT=3000
LOG_LEVEL=info
# Database
DATABASE_URL=postgresql://user:pass@host:5432/dbname
DATABASE_POOL_SIZE=10
# API Keys (use secrets manager in production)
API_KEY=your-api-key
SECRET_KEY=your-secret-key
# Feature Flags
FEATURE_X_ENABLED=true
Step 1: Prepare Application
# Build production artifacts
npm run build:prod
# Verify build
ls -la dist/
Step 2: Deploy to Server
# Copy files to server
scp -r dist/* user@server:/var/www/app/
# SSH into server
ssh user@server
# Restart application
sudo systemctl restart app-service
Step 3: Verify Deployment
# Check service status
sudo systemctl status app-service
# Check logs
sudo tail -f /var/log/app/application.log
# Test endpoint
curl https://your-domain.com/health
Step 1: Build Docker Image
# Build image
docker build -t app-name:version .
# Tag for registry
docker tag app-name:version registry.example.com/app-name:version
# Push to registry
docker push registry.example.com/app-name:version
Step 2: Deploy Container
# Pull latest image
docker pull registry.example.com/app-name:version
# Stop existing container
docker stop app-container || true
docker rm app-container || true
# Run new container
docker run -d \
--name app-container \
--env-file .env.production \
-p 80:3000 \
--restart unless-stopped \
registry.example.com/app-name:version
# Verify
docker logs app-container
Step 1: Prepare Kubernetes Manifests
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: app-deployment
spec:
replicas: 3
selector:
matchLabels:
app: myapp
template:
metadata:
labels:
app: myapp
spec:
containers:
- name: app
image: registry.example.com/app-name:version
ports:
- containerPort: 3000
envFrom:
- configMapRef:
name: app-config
- secretRef:
name: app-secrets
Step 2: Deploy to Cluster
# Apply configurations
kubectl apply -f k8s/
# Check deployment status
kubectl rollout status deployment/app-deployment
# Verify pods running
kubectl get pods -l app=myapp
# Check logs
kubectl logs -l app=myapp --tail=100
# Initialize EB
eb init -p node.js-16 app-name --region us-west-2
# Create environment
eb create production --instance-type t3.medium
# Deploy
eb deploy
# Check status
eb status
# Deploy to App Engine
gcloud app deploy app.yaml --project=project-id
# View logs
gcloud app logs tail -s default
# Open in browser
gcloud app browse
# Create resource group
az group create --name myResourceGroup --location eastus
# Create app service plan
az appservice plan create --name myAppServicePlan \
--resource-group myResourceGroup --sku B1 --is-linux
# Create web app
az webapp create --resource-group myResourceGroup \
--plan myAppServicePlan --name myUniqueAppName \
--runtime "NODE|16-lts"
# Deploy
az webapp deployment source config-zip \
--resource-group myResourceGroup \
--name myUniqueAppName \
--src dist.zip
# Application health
curl https://your-domain.com/health
# Expected response:
{
"status": "healthy",
"version": "1.2.3",
"uptime": 12345
}
# Database connectivity
curl https://your-domain.com/health/db
# Dependencies status
curl https://your-domain.com/health/dependencies
# Test critical endpoints
curl -X POST https://your-domain.com/api/test \
-H "Content-Type: application/json" \
-d '{"test": "data"}'
# Test authentication
curl https://your-domain.com/api/protected \
-H "Authorization: Bearer $TOKEN"
# Identify previous version
docker images registry.example.com/app-name
# Deploy previous version
docker stop app-container
docker rm app-container
docker run -d --name app-container \
registry.example.com/app-name:previous-version
# View rollout history
kubectl rollout history deployment/app-deployment
# Rollback to previous version
kubectl rollout undo deployment/app-deployment
# Rollback to specific revision
kubectl rollout undo deployment/app-deployment --to-revision=2
Check: Build artifacts
ls -la dist/
# Verify all necessary files present
Check: Environment variables
printenv | grep APP_
# Verify all required variables set
Check: Server logs
tail -f /var/log/app/error.log
Check: Service status
sudo systemctl status app-service
Check: Port bindings
sudo netstat -tulpn | grep :3000
Check: Firewall rules
sudo iptables -L -n | grep 3000
After deployment:
---
### Phase 2: API Documentation
Create comprehensive API reference documentation.
**Step 2.1: Create API.md**
```markdown
# API Documentation
## Base URL
Production: https://api.example.com/v1 Staging: https://staging-api.example.com/v1 Development: http://localhost:3000/v1
## Authentication
All API requests require authentication using Bearer tokens:
```bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
https://api.example.com/v1/endpoint
POST /auth/login
Content-Type: application/json
{
"email": "[email protected]",
"password": "password"
}
Response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 3600
}
GET /users/:id
Parameters:
id (path, required): User IDResponse:
{
"id": "123",
"email": "[email protected]",
"name": "John Doe",
"created_at": "2025-01-01T00:00:00Z"
}
Example:
curl -H "Authorization: Bearer TOKEN" \
https://api.example.com/v1/users/123
POST /users
Request Body:
{
"email": "[email protected]",
"password": "SecurePass123!",
"name": "John Doe"
}
Response: 201 Created
{
"id": "124",
"email": "[email protected]",
"name": "John Doe",
"created_at": "2025-11-10T00:00:00Z"
}
Errors:
400 Bad Request: Invalid input409 Conflict: Email already existsAll errors follow this format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message",
"details": ["Specific error detail"]
}
}
Common error codes:
UNAUTHORIZED: Missing or invalid authenticationFORBIDDEN: Insufficient permissionsNOT_FOUND: Resource not foundVALIDATION_ERROR: Invalid input dataRATE_LIMIT_EXCEEDED: Too many requestsX-RateLimit-Limit: Total limitX-RateLimit-Remaining: Remaining requestsX-RateLimit-Reset: Reset timestamp
---
## Documentation Standards
### Writing Style
- Use clear, concise language
- Avoid jargon or explain when necessary
- Write for the target audience (developers vs. end-users)
- Use active voice
- Provide examples for everything
- Keep paragraphs short (3-5 sentences)
### Structure
- Start with overview/introduction
- Include table of contents for long documents
- Use clear headings and subheadings
- Provide step-by-step instructions
- Include troubleshooting section
- Add "Next Steps" or "See Also" sections
### Code Examples
- Always test code examples
- Include complete, runnable examples
- Add comments explaining key parts
- Show expected output
- Cover common use cases
### Maintenance
- Date all documentation
- Version documentation with code
- Mark deprecated features clearly
- Keep examples up to date
- Regular review and updates
---
## Collaboration Patterns
### With Architect (or architect-role-skill)
- Review ARCHITECTURE.md for technical accuracy
- Request clarification on design decisions
- Ensure documentation reflects actual architecture
### With Builder (or builder-role-skill)
- Request code walkthroughs for complex features
- Verify API examples match implementation
- Update docs when code changes
### With DevOps (or devops-role-skill)
- Coordinate on deployment documentation
- Verify infrastructure details
- Document monitoring and operations procedures
---
## Examples
### Example 1: New Project Documentation
**Task**: Create complete documentation suite for new Node.js API
```markdown
## Deliverables Created
- README.md (project overview, quick start)
- BUILDING.md (development setup, build process)
- DEPLOYMENT.md (Docker, Kubernetes, cloud platforms)
- API.md (endpoints, authentication, examples)
- CONTRIBUTING.md (contribution guidelines)
**Result**: Complete documentation enabling new developers to get started within 30 minutes
Task: Document 15 new API endpoints after feature development
## Documentation Added
- Endpoint specifications (request/response schemas)
- Authentication requirements
- Code examples in bash/curl
- Error scenarios and handling
- Rate limiting details
**Result**: API documentation coverage increased from 60% to 95%
resources/README_template.md - Project README templateresources/API_template.md - API documentation templateresources/DEPLOYMENT_template.md - Deployment guide templateresources/CONTRIBUTING_template.md - Contribution guidelines templateVersion: 1.0.0 Last Updated: December 12, 2025 Status: ✅ Active Maintained By: Claude Command and Control Project
tools
MemPalace local-first AI memory system. Use when setting up persistent memory for Claude Code sessions, mining project files or conversation transcripts, querying past context, configuring MCP tools, managing the knowledge graph, or troubleshooting palace operations.
tools
LangSmith Python SDK — trace, evaluate, and monitor LLM applications. Covers @traceable decorator, trace context manager, Client API, evaluate() / aevaluate(), comparative evaluation, custom evaluators, dataset management, prompt caching, ASGI middleware, and pytest plugin.
development
LangGraph (Python) — build stateful, controllable agent graphs with checkpointing, streaming, persistence, interrupts, fault tolerance, and durable execution. Covers both Graph API (StateGraph) and Functional API (@entrypoint/@task).
development
LangGraph Graph API (Python) — build explicit DAG agent workflows with StateGraph, typed state, nodes, edges, Command routing, Send fan-out, checkpointers, interrupts, and streaming. Use when you need explicit control flow and graph topology.