A Claude Code skill that automates the docs-as-code LLM execution pattern for complex, multi-step tasks.
This skill implements a structured approach to creating, executing, and archiving automation plans. The docs-as-code pattern treats documentation as executable specifications - plans contain pre-written bash scripts that Claude executes autonomously, rather than improvising solutions.
- Pre-Written Scripts - Complete bash scripts, not instructions
- Read-Once Architecture - All context embedded upfront
- Explicit Success Criteria - Programmatically verifiable conditions
- Minimal Approval Points - Only for destructive operations
- Built-In Validation - Check, Execute, Verify pattern
The skill is installed at:
~/.claude/skills/docs-as-code-execution-plan/
├── SKILL.md
└── references/
├── docs-as-code-guide.md
└── docs-as-code-execution-plan-template.md
The slash command is installed at:
~/.claude/commands/execution-plan.md
# Check skill
ls ~/.claude/skills/docs-as-code-execution-plan/
# Check command
ls ~/.claude/commands/execution-plan.mdThe skill triggers on phrases that include "docs-as-code":
- "Create a docs-as-code execution plan for..."
- "Help me plan this change using a docs-as-code execution plan"
- "Create a docs-as-code plan"
- "Execute this plan" (in context of a docs-as-code plan)
- "Archive this execution plan" (in context of a docs-as-code plan)
Quick template scaffolding:
/execution-plan <topic words>
Examples:
/execution-plan ollama startup fix
/execution-plan database migration setup
/execution-plan openmemory upgrade
Use when starting a new infrastructure task. The skill will:
- Gather requirements (goal, current state, target state, risks)
- Generate plan structure with YAML front matter
- Create phases with bash scripts and success criteria
- Include pre-flight validation and rollback procedure
- Save to project's
docs/folder
Use to run a previously created plan. The skill will:
- Read the entire plan before starting
- Run pre-flight validation
- Execute phases in order (autonomous or with approval)
- Verify success criteria after each phase
- Handle failures with rollback if needed
Use after completing a task. The skill will:
- Update YAML front matter status
- Complete the Dev Agent Record section
- Move to
docs/archives/folder - Extract procedural learnings to OpenMemory (if available)
All execution plans follow this pattern:
YYYY-MM-DD-<topic-words>-execution-plan[-vN].md
| Element | Rule |
|---|---|
| Case | kebab-case (lowercase, hyphens) |
| Date prefix | Today's date |
| Topic words | 3-4 words max |
| Suffix | Always -execution-plan |
| Versioning | -v2, -v3 only if previous exists |
Examples:
2025-12-03-ollama-startup-fix-execution-plan.md
2025-12-03-database-migration-execution-plan.md
2025-12-03-database-migration-execution-plan-v2.md
The skill includes two reference files:
Full documentation of the docs-as-code pattern, including:
- Why documentation is execution context
- Anti-patterns to avoid
- YAML front matter schema
- Status prefixes for LLM parsing
- Windows-specific patterns
Complete template with all sections:
- YAML front matter
- Test Plan Summary table
- Problem Statement
- Risk Assessment
- Pre-Flight Validation
- Numbered Phases
- Rollback Procedure
- Completion/Acceptance Checklists
- Dev Agent Record
Skills need permission to read their own reference files. Add these to your global Claude Code settings (~/.claude/settings.json):
{
"permissions": {
"allow": [
"Glob(~/.claude/skills/**)",
"Read(~/.claude/skills/**)"
]
}
}Without this, you'll get approval prompts each time the skill tries to read its template.
This dev project serves as the source repository for the skill. To make changes:
- Edit files in this project
- Copy updated files to
~/.claude/skills/docs-as-code-execution-plan/ - Run validation:
python ~/.claude/skills/skill-creator/scripts/quick_validate.py ~/.claude/skills/docs-as-code-execution-plan
- Created: 2025-12-03
- Last Updated: 2025-12-04
- Status: Complete
- Author: Drew Arnold (with Claude Code)