Help us improve
Share bugs, ideas, or general feedback.
From primeline-skills
Use when you have a multi-step task, before touching code. Creates bite-sized implementation plans with TDD emphasis, then executes them in batches with review checkpoints. Prevents the "just start coding" trap.
npx claudepluginhub primeline-ai/primeline-skillsHow this skill is triggered — by the user, by Claude, or both
Slash command
/primeline-skills:plan-and-executeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Write the plan before writing the code. Execute it in small batches. Review between batches. This is how you avoid rewriting the same feature three times.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Write the plan before writing the code. Execute it in small batches. Review between batches. This is how you avoid rewriting the same feature three times.
Announce: "Using plan-and-execute to structure this implementation."
For tasks under 30 minutes:
If the task is bigger than 30 minutes, use the full system below.
Every plan starts with a header:
# [Feature Name] Implementation Plan
**Goal:** [One sentence - what this builds]
**Architecture:** [2-3 sentences - how it fits together]
**Files involved:** [List of files to create or modify]
---
Then break it into tasks. Each task follows this structure:
### Task 1: [Component Name]
**Files:**
- Create: `src/components/widget.tsx`
- Modify: `src/app/page.tsx:45-60`
- Test: `tests/widget.test.ts`
**Step 1: Write the failing test**
[Exact test code]
**Step 2: Run it to confirm it fails**
Run: `npm test -- widget.test.ts`
Expected: FAIL - "widget is not defined"
**Step 3: Write the implementation**
[Exact implementation code]
**Step 4: Run the test to confirm it passes**
Run: `npm test -- widget.test.ts`
Expected: PASS
**Step 5: Commit**
git add src/components/widget.tsx tests/widget.test.ts
git commit -m "feat: add widget component"
Before writing any code, review your plan:
Review Checklist:
- [ ] Every task has exact file paths
- [ ] Every task has a test (or explains why not)
- [ ] No task depends on something not yet built
- [ ] Tasks are ordered so each builds on the last
- [ ] The plan covers the full feature (nothing missing)
- [ ] Nothing in the plan contradicts existing code
If you find a gap, fix the plan first. Never start executing a plan you're not confident in.
Default batch size: 3 tasks.
For each task in the batch:
After each batch, stop and report:
Then: "Ready for feedback before continuing."
After feedback:
After all tasks:
Before executing any plan, run 3 questions in 30 seconds:
If question 2 reveals a genuinely simpler approach, update the plan before starting.
# Add Dark Mode Toggle
**Goal:** Users can switch between light and dark themes.
**Architecture:** CSS variables for theming, React context for state, localStorage for persistence.
**Files involved:** src/styles/theme.css, src/context/theme.tsx, src/components/theme-toggle.tsx
---
### Task 1: Theme CSS Variables
**Files:** Create: src/styles/theme.css
**Steps:** Define light/dark variable sets, add to global styles.
### Task 2: Theme Context
**Files:** Create: src/context/theme.tsx, Test: tests/theme.test.tsx
**Steps:** TDD - write test for toggle behavior, implement context with localStorage.
### Task 3: Toggle Component
**Files:** Create: src/components/theme-toggle.tsx, Modify: src/app/layout.tsx
**Steps:** TDD - write test for rendering, implement button, wire into layout.
During execution, you discover the CSS variables approach conflicts with the existing Tailwind setup.
Don't: Silently switch approaches and keep going.
Do: Stop the batch. Report:
Deviation: CSS variables conflict with Tailwind's dark mode utility classes.
Options:
A) Use Tailwind's built-in dark: prefix (simpler, less CSS)
B) Override Tailwind's config to use CSS variables (more control, more setup)
Recommendation: Option A - aligns with existing patterns.
Waiting for feedback before continuing.
Plans make delegation natural. Each task in your plan can become a delegation prompt:
See the smart-delegation skill for prompt templates and model routing.
| Pattern | Problem | Fix |
|---|---|---|
| "Just start coding" | No plan = rework 3 times | Write the plan first, even a 5-line one |
| Giant tasks | "Implement auth system" is 10 tasks, not 1 | Break down until each task is 2-5 minutes |
| Vague steps | "Add validation" without specifying what | Exact code, exact file paths, exact commands |
| No verification | Assuming code works without running it | Every task ends with a test or verification command |
| Silent deviations | Changing the approach without reporting | Stop, report deviation, wait for feedback |
| Planning everything | 2-day plan for a 10-minute task | Use Quick Start for small tasks |
| No tests in plan | "We'll test later" | TDD: write the test first, then the code |
When you hit a blocker during execution:
If the blocker is in your own code: use the systematic-debugging skill.
If you have the Starter System installed:
/handoff to save plan progress between sessions/remember to log plan patterns that work well for your projectWhen Kairn is configured, planning gains:
Without Kairn: plans are manual and each session starts fresh. The plan-and-execute cycle still works, you just build institutional knowledge manually.