Generate structured planning documentation for web projects with context-safe phases, verification criteria, and exit conditions. Creates IMPLEMENTATION_PHASES.md plus conditional documents (DATABASE_SCHEMA.md, API_ENDPOINTS.md, UI_COMPONENTS.md, CRITICAL_WORKFLOWS.md). Use when: starting new Cloudflare Workers or React projects, adding major features to existing applications, breaking large work into manageable phases, or when verified planning is required before coding begins.
Version: 2.0 Last Updated: 2025-11-17 Status: Production Ready ✅
This skill generates comprehensive, context-optimized planning documentation for web application projects. It structures work into manageable phases with built-in verification, ensuring projects can be built iteratively while maintaining clarity between sessions.
1. Starting a New Project (Most Common)
User: "I want to build a task management app with authentication"
Claude: "Let me use the project-planning skill to structure this properly"
→ Skill generates planning docs
→ Review and refine
→ Start building
2. Adding a Major Feature
User: "I need to add real-time collaboration to the existing app"
Claude: "Let me use project-planning to create phases for this feature"
→ Skill generates new phases
→ Append to existing IMPLEMENTATION_PHASES.md
3. Re-planning a Messy Project
User: "This project has gotten out of hand, let's restructure it"
Claude: "Let me use project-planning to reorganize the work"
→ Skill analyzes current state
→ Generates new phase structure
4. Validating Existing Phases
User: "Does Phase 3 look reasonable, or is it too big?"
Claude: "Let me use project-planning to validate this phase"
→ Skill checks sizing rules
→ Suggests improvements
Decision Logic: Skill asks if additional docs are needed, or auto-generates based on project complexity
The skill knows your preferred stack from CLAUDE.md:
It only asks clarifying questions when:
Template-driven with smart questions:
Every generated phase follows context-safe sizing:
If a phase violates these rules, skill auto-suggests splitting it.
The skill uses standardized templates for common web app patterns:
Before file maps: Claude needs to grep/glob through your codebase to understand where files are and what they do. This burns tokens and sometimes results in code being placed in the wrong files.
With file maps: Each phase includes a detailed map showing:
Example: "Implement task CRUD endpoints"
| Approach | Token Usage | Corrections Needed | Time | |----------|-------------|-------------------|------| | Without file maps | ~15k tokens | 2-3 corrections | ~10 min | | With file maps | ~3.5k tokens | 0 corrections | ~3 min | | Savings | ~77% reduction | No corrections | ~70% faster |
Each phase now includes (when applicable):
1. File Map
- `src/routes/tasks.ts` (estimated ~150 lines)
- Purpose: CRUD endpoints for tasks
- Key exports: GET, POST, PATCH, DELETE handlers
- Dependencies: schemas.ts, auth middleware, D1 binding
- Used by: Frontend task components
2. Data Flow Diagrams (Mermaid)
3. Critical Dependencies
4. Gotchas & Known Issues
Always include for:
Optional for:
See references/example-enhanced-phase.md for complete before/after comparison with multiple Mermaid diagram examples.
Problem Solved: Users were installing all shadcn components upfront, then forgetting which components each phase needed.
Solution: UI_COMPONENTS.md now includes phase-aligned installation strategy:
Time Saved: ~15-20 minutes per project (no more "which components do I need?")
Problem Solved: Complex, order-sensitive setup steps (like D1 binding order, better-auth factory patterns) were causing users to get stuck.
Solution: CRITICAL_WORKFLOWS.md documents:
Example: D1 Database Binding workflow prevents the "cannot bind to non-existent Worker" error
Time Saved: ~30-60 minutes per complex workflow (no more trial-and-error)
Problem Solved: Users repeatedly asking "what was that command again?" between sessions.
Solution: INSTALLATION_COMMANDS.md provides:
Time Saved: ~5-10 minutes per session (instant command lookup)
Problem Solved: Users unsure which secrets/API keys needed, where to get them, how to configure.
Solution: ENV_VARIABLES.md includes:
Time Saved: ~20-30 minutes initial setup + prevents security mistakes
Problem Solved: SESSION.md was growing to 400+ lines by duplicating phase information from IMPLEMENTATION_PHASES.md.
Solution: New compact template (<200 lines):
Token Saved: ~8-12k tokens per session (no duplicate phase info)
Problem Solved: Users planning before prototyping new frameworks, missing critical workflows.
Solution: Skill now asks before generating docs:
Time Saved: Prevents hours of backtracking from wrong assumptions
Problem Solved: Users starting Phase 1 without reviewing docs, environment setup, or critical workflows.
Solution: Skill outputs checklist after generating docs:
Errors Prevented: "Missing IMPLEMENTATION_PHASES.md", "Forgot to set secrets", "Skipped critical workflow"
| Metric | v1.1 | v2.0 | Improvement | |--------|------|------|-------------| | Docs Generated | 7 types | 11 types | +57% | | Time Saved per Project | ~2 hours | ~4-5 hours | +2-3 hours | | Common Errors Prevented | 5-7 | 12-15 | +100% | | Token Efficiency (SESSION.md) | Baseline | -60% tokens | ~10k tokens saved | | Setup Mistakes Prevented | No validation | Pre/Post checks | Fewer stuck users |
Production Tested: TanStack Cloudflare Starter project (revealed all these improvements)
Claude Code will automatically discover this skill when you mention:
Project Initiation:
Planning Documents:
Phase Management:
Stack Keywords:
Use Cases:
AI/Integration Projects:
File-Level Navigation (NEW):
When you describe a new project, Claude Code will automatically suggest using this skill:
User: "I want to build a blog with comments and user profiles"
Claude: "Let me use the project-planning skill to structure this"
Explicitly request the skill:
"Use the project-planning skill to plan this project"
"Generate planning docs for this feature"
"Validate my existing phases with project-planning"
User: "I want to build a URL shortener with analytics"
Skill:
Analyzing project requirements...
Project Type: Web App (CRUD + Analytics)
Suggested Stack: Cloudflare Workers + D1 + Vite + React
Questions:
1. Auth required? (public tool vs user accounts)
2. Custom short URLs or auto-generated?
3. Analytics detail level? (simple count vs detailed visitor data)
4. Admin dashboard needed?
User: "User accounts, auto-generated, detailed analytics, yes to dashboard"
Skill Generates:
Output Preview:
# Implementation Phases: URL Shortener
## Phase 1: Project Setup (2 hours)
**Type**: Infrastructure
**Files**: package.json, wrangler.jsonc, vite.config.ts, src/index.ts
**Tasks**:
- [x] Scaffold Cloudflare Worker with Vite
- [x] Configure Tailwind v4 + shadcn/ui
- [x] Setup D1 database binding
- [x] Test deployment
**Verification**:
- [ ] `npm run dev` starts without errors
- [ ] Can deploy to Cloudflare
- [ ] Worker serves React app
**Exit Criteria**: Working dev environment and successful deployment
---
## Phase 2: Database Schema (2-3 hours)
**Type**: Database
**Files**: migrations/0001_initial.sql, src/db/schema.ts
[... and so on for each phase ...]
Not a code generator: Generates planning docs, not implementation code Not a session tracker: Doesn't update SESSION.md (that's Claude's job) Not an architect: Doesn't make technical decisions (Claude does that with you) Not mandatory: Optional tool - use when beneficial
Easy to add new document templates:
templates/ directoryFuture possibilities:
phase-split: Break oversized phase into sub-phasessession-init: Generate SESSION.md from IMPLEMENTATION_PHASES.mdproject-planning/
├── README.md # This file
├── SKILL.md # Main skill logic (planning assistant)
├── templates/
│ ├── IMPLEMENTATION_PHASES.md # Phase breakdown template (enhanced with file maps)
│ ├── DATABASE_SCHEMA.md # Database design template
│ ├── API_ENDPOINTS.md # API routes template
│ ├── ARCHITECTURE.md # System design template
│ ├── UI_COMPONENTS.md # Component structure template
│ ├── TESTING.md # Test strategy template
│ ├── AGENTS_CONFIG.md # AI agents template
│ └── INTEGRATION.md # Third-party integrations template
└── references/
├── example-enhanced-phase.md # NEW: File maps, Mermaid diagrams, before/after
└── example-outputs/
├── simple-web-app.md # Basic CRUD example
├── auth-web-app.md # Authentication example
└── ai-web-app.md # AI-powered app example
Be specific in project description: "Task manager with tags and due dates" is better than "to-do app"
Mention non-standard requirements early: "Need to support 10k concurrent users" or "Must integrate with legacy SOAP API"
Review generated phases before starting: Easier to refine planning docs than mid-implementation
Use examples for reference: Check references/example-outputs/ directory for similar projects
Iterate if needed: Regenerate or refine phases if initial output doesn't feel right
After this skill generates IMPLEMENTATION_PHASES.md:
session-init tool)See main CLAUDE.md for full session handoff protocol.
This skill is designed to evolve based on usage. If something doesn't work as expected or you'd like additional capabilities, refine SKILL.md and templates directly.
npx skills add ovachiever/项目规划下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Category:developer