Skill v1.0.1
currentAutomated scan100/1001 files
name: battle-plan description: | Before ANY significant development task (new feature, refactor, integration, migration), run a complete planning ritual by orchestrating other skills in sequence: rubber-duck (clarify scope) -> pre-mortem (assess risks) -> eta (estimate time) -> final confirmation. Do not start coding until the battle plan is approved. allowed-tools: | bash: find, grep, cat, head, ls, wc, python file: read metadata: version: "1.0.1"
Battle Plan
<purpose> Claude Code's built-in plan mode is just "read-only mode + write a markdown file." It doesn't assess risks, estimate time, define done, or check scope. This skill orchestrates a complete planning ritual using composable skills before any significant work begins. </purpose>
When To Activate
Trigger before:
- New feature implementation
- Refactors touching multiple files
- External service integrations
- Database migrations
- "Significant" or "important" tasks (user's words)
- Anything estimated >15 minutes
Do NOT trigger for:
- Typo fixes
- Single-line changes
- Questions/exploration
- Tasks user explicitly says are trivial
Instructions
Phase 1: Scope (uses rubber-duck patterns)
Before anything, clarify what we're actually building:
Scope CheckWhat are we building?-> [Clear description of the goal]What's the definition of done?-> [Specific, verifiable completion criteria]What's explicitly OUT of scope?-> [Things we're NOT doing, even if related]Any ambiguity I should clarify before planning?
If scope is vague, ask clarifying questions. Do not proceed with vague scope.
Phase 2: Recon
Map the terrain before planning the attack:
ReconFiles likely affected:- [file1.py] - [why]- [file2.py] - [why]Existing patterns to follow:- [Pattern observed in codebase]Dependencies/callers to check:- [What depends on code we're changing]Tests that exist:- [Relevant test files]
Use find, grep, head to actually explore. Don't guess.
Phase 3: Risks (uses pre-mortem patterns)
Imagine it's 2 weeks later and this failed. Why?
Pre-mortemIf this fails, it's probably because:1. HIGH: [Specific risk]Mitigation: [How to prevent]2. MED: [Specific risk]Mitigation: [How to prevent]3. LOW: [Specific risk]Mitigation: [How to prevent]
Reorder plan to address HIGH risks first.
Phase 4: Estimate (uses eta patterns)
Provide realistic Claude-time estimate:
EstimateScope: [X files, Y estimated lines changed]Complexity: [Simple / Medium / Complex]Breakdown:- Recon & setup: ~X min- Implementation: ~Y min- Testing: ~Z min- Verification: ~W minTotal: ~[range] minutesCheckpoint: [If >15 min, where's the halfway check-in?]
Phase 5: The Plan
Now write the actual plan - structured, not prose:
Battle Plan: [Task Name]SCOPEGoal: [One sentence]Done when: [Verifiable criteria]Not doing: [Explicit exclusions]STEPS1. [ ] [Step] -> [Output/artifact]Confidence: HIGH/MED/LOW2. [ ] [Step] -> [Output/artifact]Confidence: HIGH/MED/LOWDepends on: Step 13. [ ] [Step] -> [Output/artifact]Confidence: HIGH/MED/LOWRISKS & MITIGATIONS[Risk 1] -> [Mitigation baked into steps][Risk 2] -> [Mitigation baked into steps]ROLLBACKIf this goes wrong: [How to undo safely]ESTIMATE~[X-Y] minutesCheckpoint at: [Step N / halfway point]Ready to execute?
Phase 6: Confirmation (uses you-sure patterns)
Do not proceed without explicit approval:
Type 'go' to execute this plan, or tell me what to adjust.
Accept only:
- "go" / "proceed" / "execute" -> Start work
- Feedback -> Adjust plan and re-present
- "abort" -> Cancel
Confidence Levels
For each step, assess confidence:
HIGH - Done this before, clear path, low ambiguity MED - Reasonable approach, some unknowns LOW - Best guess, might need to pivot
If multiple steps are LOW confidence, flag it:
Several steps have LOW confidence. Consider spiking/prototyping first?
Composability Note
This skill orchestrates patterns from:
- rubber-duck - Scope clarification
- pre-mortem - Risk assessment
- eta - Time estimation
- you-sure - Confirmation gate
If those skills are installed, their full capabilities enhance this ritual. If not, this skill includes the core patterns inline.
NEVER
- Start coding without presenting the battle plan
- Proceed without explicit confirmation
- Skip risk assessment for "simple" significant tasks
- Provide single-point estimates (always give ranges)
- Hide low confidence behind confident language
ALWAYS
- Map actual files before planning (recon is real, not imagined)
- Include rollback strategy
- Set checkpoint for tasks >15 minutes
- Surface confidence levels honestly
- Respect scope boundaries during execution
Example
User: "Add Stripe payment integration"Scope CheckWhat are we building?-> Accept one-time payments via Stripe CheckoutDefinition of done:-> User can click "Pay", complete Stripe Checkout, and see success confirmation-> Payment recorded in our database-> Works in test mode with test cardsExplicitly OUT of scope:-> Subscriptions (future task)-> Refunds (future task)-> Multiple payment methods (just card for now)Any ambiguity?-> Should failed payments show inline error or redirect to error page?[User answers: inline error]ReconFiles likely affected:- routes/payments.py - new endpoints- models/order.py - add payment_status field- templates/checkout.html - payment button- tests/test_payments.py - new fileExisting patterns:- Routes use Flask blueprints- Models use SQLAlchemy with migrations- Tests use pytest + fixturesDependencies:- Order model used by 3 other routes- Checkout template included in 2 placesPre-mortemIf this fails in 2 weeks, it's probably because:1. HIGH: Webhook signature validation wrongMitigation: Set up Stripe CLI, test webhooks FIRST2. HIGH: Test vs live key confusionMitigation: Env validation on startup3. MED: No idempotency on payment creationMitigation: Add idempotency key from startEstimateScope: 4 files, ~200 linesComplexity: MediumBreakdown:- Stripe CLI + webhook setup: ~5 min- Payment endpoints: ~10 min- Database migration: ~5 min- Frontend integration: ~8 min- Testing: ~12 minTotal: ~35-45 minutesCheckpoint: After webhook setup works (~15 min mark)Battle Plan: Stripe Payment IntegrationSCOPEGoal: One-time payments via Stripe CheckoutDone when: Test payment completes end-to-endNot doing: Subscriptions, refunds, multi-methodSTEPS1. [ ] Set up Stripe CLI + webhook endpoint -> Working signature validationConfidence: HIGH2. [ ] Add payment routes (create session, success, webhook) -> Endpoints respondingConfidence: HIGHDepends on: Step 13. [ ] Database migration for payment_status -> Migration appliedConfidence: HIGH4. [ ] Frontend checkout button -> Redirects to StripeConfidence: MED (need to check existing JS patterns)Depends on: Step 25. [ ] Integration tests with Stripe test mode -> Tests passingConfidence: HIGHDepends on: Steps 1-4RISKS & MITIGATIONSWebhook validation -> Addressed in Step 1 (before business logic)Key confusion -> Env check added in Step 2Idempotency -> Built into Step 2ROLLBACKIf broken: Revert migration, remove routes, disable checkout buttonData safety: No production payments until explicitly switched to live keysESTIMATE~35-45 minutesCheckpoint at: Step 1 complete (webhook working)Ready to execute?