skill-writing-plans
Create zero-context implementation plans with bite-sized tasks — use for multi-step feature planning
What this skill does
> **Host: Codex CLI** — This skill was designed for Claude Code and adapted for Codex.
> Cross-reference commands use installed skill names in Codex rather than `/octo:*` slash commands.
> Use the active Codex shell and subagent tools. Do not claim a provider, model, or host subagent is available until the current session exposes it.
> For host tool equivalents, see `skills/blocks/codex-host-adapter.md`.
# Writing Plans
## MANDATORY COMPLIANCE — DO NOT SKIP
**When this skill is invoked, you MUST produce a full implementation plan following the structure below. You are PROHIBITED from:**
- Skipping the plan and jumping straight to implementation
- Producing a vague outline instead of the zero-context plan format
- Deciding the task is "simple enough" to not need a plan
- Omitting file paths, complete code, test instructions, or verification steps
**The user asked for a plan, not an implementation. Write the plan first.**
**Your first output line MUST be:** `🐙 **CLAUDE OCTOPUS ACTIVATED** - Implementation Planning`
## Overview
Write comprehensive implementation plans assuming the engineer has **zero context** for the codebase and **questionable taste**.
Document everything: which files to touch, complete code, how to test, how to verify.
**Principles:** DRY. YAGNI. TDD. Frequent commits.
## Plan Document Structure
### Header (Required)
```markdown
# [Feature Name] Implementation Plan
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
**Estimated Time:** [X tasks × 5 min = Y minutes]
## Prerequisites
- [ ] [Any setup needed before starting]
- [ ] [Dependencies to install]
- [ ] [Files that must exist]
```
## Task Granularity
**Each task is ONE action (2-5 minutes):**
| Good (Single Action) | Bad (Multiple Actions) |
|---------------------|------------------------|
| "Write the failing test" | "Write tests and implement" |
| "Run test to verify it fails" | "Make it work" |
| "Implement minimal code to pass" | "Add the feature" |
| "Commit with message" | "Finish the feature" |
## Task Template
```markdown
### Task N: [Component Name]
**Files:**
- Create: `exact/path/to/new-file.ts`
- Modify: `exact/path/to/existing.ts` (lines 45-67)
- Test: `tests/exact/path/to/test.spec.ts`
**Step 1: Write failing test**
```typescript
// tests/exact/path/to/test.spec.ts
describe('ComponentName', () => {
it('should do specific thing', () => {
const result = functionName(input);
expect(result).toBe(expected);
});
});
```
**Step 2: Run test to verify it fails**
```bash
npm test tests/exact/path/to/test.spec.ts
```
Expected output:
```
FAIL: expected 'expected' but got undefined
```
**Step 3: Implement minimal code**
```typescript
// exact/path/to/new-file.ts
export function functionName(input: InputType): OutputType {
// Minimal implementation
return expected;
}
```
**Step 4: Run test to verify it passes**
```bash
npm test tests/exact/path/to/test.spec.ts
```
Expected output:
```
PASS: 1/1 tests passed
```
**Step 5: Commit**
```bash
git add tests/exact/path/to/test.spec.ts exact/path/to/new-file.ts
git commit -m "feat(component): add specific functionality"
```
```
## Example: Complete Task
```markdown
### Task 3: Add Email Validation
**Files:**
- Create: `src/validators/email.ts`
- Test: `tests/validators/email.spec.ts`
**Step 1: Write failing test**
```typescript
// tests/validators/email.spec.ts
import { validateEmail } from '../src/validators/email';
describe('validateEmail', () => {
it('returns error for empty email', () => {
const result = validateEmail('');
expect(result).toEqual({ valid: false, error: 'Email required' });
});
it('returns error for invalid format', () => {
const result = validateEmail('not-an-email');
expect(result).toEqual({ valid: false, error: 'Invalid email format' });
});
it('returns valid for correct email', () => {
const result = validateEmail('[email protected]');
expect(result).toEqual({ valid: true });
});
});
```
**Step 2: Run test to verify it fails**
```bash
npm test tests/validators/email.spec.ts
```
Expected: `Cannot find module '../src/validators/email'`
**Step 3: Implement minimal code**
```typescript
// src/validators/email.ts
interface ValidationResult {
valid: boolean;
error?: string;
}
export function validateEmail(email: string): ValidationResult {
if (!email || !email.trim()) {
return { valid: false, error: 'Email required' };
}
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(email)) {
return { valid: false, error: 'Invalid email format' };
}
return { valid: true };
}
```
**Step 4: Run test to verify it passes**
```bash
npm test tests/validators/email.spec.ts
```
Expected: `PASS: 3/3 tests passed`
**Step 5: Commit**
```bash
git add src/validators/email.ts tests/validators/email.spec.ts
git commit -m "feat(validators): add email validation with tests"
```
```
## Integration with Claude Octopus
### Using Octopus for Plan Execution
After creating a plan, offer execution options:
```markdown
## Execution Options
**1. Sequential (this session)**
Execute tasks one by one with verification between each.
**2. Parallel (octopus tangle)**
Use Claude Octopus to parallelize independent tasks:
```bash
${HOME}/.claude-octopus/plugin/scripts/orchestrate.sh tangle "Execute implementation plan for [feature]"
```
**3. Full workflow (octopus embrace)**
Research → Define → Implement → Deliver:
```bash
${HOME}/.claude-octopus/plugin/scripts/orchestrate.sh embrace "Implement [feature] per plan"
```
```
### Plan Storage (Claude Code v2.1.10)
Claude Octopus uses session-aware plan storage. Plans are automatically saved to:
```
~/.claude-octopus/plans/${CLAUDE_SESSION_ID}/YYYY-MM-DD-feature-name.md
```
This integrates with Claude Code's `plansDirectory` setting. To customize:
```json
// settings.json
{
"plansDirectory": "~/.claude-octopus/plans"
}
```
For project-local plans, save to `docs/plans/`:
```bash
mkdir -p docs/plans
# docs/plans/2026-01-17-user-authentication.md
```
## Checklist for Good Plans
- [ ] Each task is 2-5 minutes (single action)
- [ ] Exact file paths (not "in the utils folder")
- [ ] Complete code (not "add validation logic")
- [ ] Exact commands with expected output
- [ ] TDD: test before implementation
- [ ] Commit after each task
## Common Mistakes
| Mistake | Fix |
|---------|-----|
| "Add the validation" | Show exact code |
| "Update the tests" | Show exact test code |
| "In the config file" | `config/app.config.ts` line 23 |
| "Run the tests" | `npm test path/to/specific.spec.ts` |
| Large tasks (30+ min) | Break into 2-5 min steps |
| No verification | Add "Run X, expect Y" |
## When to Create Plans
| Scenario | Use Plan? |
|----------|-----------|
| Multi-step feature (3+ tasks) | Yes |
| Simple bug fix (1 task) | No, just do it |
| Uncertain scope | Yes (clarifies thinking) |
| Delegation to subagent | Yes (zero-context execution) |
| Complex refactoring | Yes |
| Config change | No |
## Related Skills
- **test-driven-development** - Each task follows TDD cycle
- **verification-before-completion** - Verify each step
- **finishing-branch** - After all tasks complete
## The Bottom Line
```
Plan exists → Engineer with zero context can execute
Otherwise → Not a complete plan
```
**Exact paths. Complete code. Verification steps. No assumptions.**
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.