From scratchpad
Use when user explicitly requests planning with a scratchpad, or asks for persistent tracking of a complex task that the human can browse visually. Backs planning files with the `scratch` CLI so a pad's files are registered and viewable.
How this skill is triggered — by the user, by Claude, or both
Slash command
/scratchpad:planning-with-scratchpadThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use persistent markdown files as external memory for complex tasks. Files survive context limits and session boundaries. The files live in a **scratchpad** (a `_plans/` folder + manifest) so the human can browse the plan in the visual viewer.
Use persistent markdown files as external memory for complex tasks. Files survive context limits and session boundaries. The files live in a scratchpad (a _plans/ folder + manifest) so the human can browse the plan in the visual viewer.
Load the scratch skill first — it owns all CLI mechanics (new, add, ls, show, ui). This skill adds the planning conventions on top.
Use persistent files for planning, TaskCreate for tracking execution. Before closing session, use AskUserQuestion to confirm findings, decisions, and deliverables are satisfactory.
Read these when you need deeper guidance on a specific aspect:
One pad per task, created in _plans/ with a date-prefixed folder:
scratch new "<task-name>" --dir _plans --id "$SESSION_ID"
This creates _plans/YYYY-MM-DD-<slug>/. Write files into that folder with your normal tools, then register each with scratch add so it appears in the viewer:
_plans/
2026-01-08-dark-mode-toggle/
scratchpad.json # manifest (managed by scratch)
plan.md
research-css-strategies.md
decisions.md
2026-01-09-api-auth-refactor/
scratchpad.json
plan.md
research-auth-providers.md
research-token-storage.md
decision-oauth-vs-saml.md
decision-session-strategy.md
references.md
scratch-migration-steps.md
Naming: YYYY-MM-DD-task-name (kebab-case, concise description) — scratch new derives this from the task name + date.
Each file owns a single concern. Never merge concerns into one file — a 200-line plan.md that also contains research notes, decisions, and scratch work is hard to navigate and easy to lose track of. Split early; you can always cross-reference with relative links. Register each file with the matching scratch add --type.
| File | Concern | Create when | --type |
|---|---|---|---|
plan.md | Goal, phases, status, errors | Always — this is the index | note |
research-<topic>.md | Sources, findings for one topic | Any research needed. One file per distinct topic — e.g. research-auth-providers.md, research-perf-benchmarks.md | reference |
decisions.md | ADRs, options, rationale | Any non-obvious tradeoff. For large efforts, split per decision: decision-database-choice.md | note |
scratch-<label>.md | Drafts, working notes, exploratory code | Complex reasoning or prototyping. Disposable — can be deleted after use | snippet |
<deliverable>.md | Final outputs | Reports, summaries, documentation | artifact |
references.md | Links to external resources, docs, prior art | When multiple sources inform the work | reference |
Always pass --desc "why this file exists" — it's the most valuable metadata in the viewer.
## Research: or ## Decision: heading to an existing file, create a new file insteadplan.md should stay lean — it's the map, not the territory. Link to detail files:
## Research
- [Auth providers](research-auth-providers.md)
- [Performance](research-perf-benchmarks.md)
# Plan: [Brief Description]
## Goal
[One sentence describing the end state]
## Phases
- [ ] Phase 1: [Description]
- [ ] Phase 2: [Description]
- [ ] Phase 3: [Description]
## Status
**Current:** [What's happening now]
## Decisions
- [Decision]: [Rationale]
## Errors Encountered
- [Error]: [Resolution]
# Research: [Topic]
## Sources
- [Source]: [Key findings]
## Findings
### [Category]
- [Finding]
# Decisions: [Task]
## [Decision Title]
**Status:** Decided | Pending
**Options:**
1. [Option A] - [Pros/Cons]
2. [Option B] - [Pros/Cons]
**Choice:** [Selected option]
**Rationale:** [Why]
Planning files and tasks serve different stages:
| Stage | Tool | Purpose |
|---|---|---|
| Investigation | Planning Files | Research, decisions, rationale, error logs |
| Execution | TaskCreate/TaskList | Decomposed work items with dependencies |
1. scratch new "<task>" --dir _plans --id "$SESSION_ID" # create the pad + plan.md
2. Research and document in planning files; `scratch add` each one
3. Make decisions, document rationale
4. Outline ALL tasks in plan.md first — present to user for review
5. After user approves, batch-create all tasks via TaskCreate
6. Link tasks back to planning docs
7. scratch ui "<task>" --dir _plans # backgrounded, for the human
Do NOT create tasks one by one as you discover them. Instead:
plan.mdAskUserQuestion — they need to see the complete picture before committingThis matters because the user needs to evaluate scope, reorder priorities, and spot gaps — which is impossible when tasks trickle in one at a time.
Create tasks at two levels:
Example batch after outline approval:
TaskCreate: subject: "Phase 1: Research auth providers"
TaskCreate: subject: "Phase 1.1: Compare OAuth2 libraries"
TaskCreate: subject: "Phase 1.2: Evaluate token storage options"
TaskCreate: subject: "Phase 2: Implement auth flow"
TaskCreate: subject: "Phase 2.1: Add OAuth2 login endpoint"
TaskCreate: subject: "Phase 2.2: Add token refresh middleware"
Phase tasks give the user a progress overview; work-item tasks track actual execution.
When batch-creating, reference the pad dir in each task:
TaskCreate:
subject: "Add OAuth2 login endpoint"
description: |
Implement /auth/login endpoint.
References: _plans/2026-01-23-auth-api/plan.md
metadata:
planDir: "_plans/2026-01-23-auth-api"
Tasks can have dependencies on each other, and all link back to the same pad directory for context.
| Tool | When to Use |
|---|---|
| Explore subagent | Search codebase, find patterns, understand existing structure before planning |
| AskUserQuestion | Clarify requirements, validate assumptions, confirm decisions before proceeding |
| scratch ui | Open the pad in the visual viewer (backgrounded) so the human can browse the plan |
Use these proactively during investigation to avoid wrong assumptions and wasted effort.
Planning is complete when:
_plans/ with plan.md (clear goal and phases) registeredscratch add (visible in the viewer)AskUserQuestionAfter many tool calls (~20+), re-read plan.md before major decisions. This brings goals back into the attention window.
Large outputs go to files, not context. Keep paths in working memory, content in files.
Every error goes in plan.md under "Errors Encountered". This builds knowledge and shows recovery.
Don't just record what you decided - record WHY. Future-you needs this context.
Mark phases complete as soon as they're done. Don't batch status updates.
| Don't | Do Instead |
|---|---|
| Create files in project root | Use a pad under _plans/YYYY-MM-DD-name/ |
| Write files but forget to register them | scratch add each file so it shows in the viewer |
| State goals once and forget | Re-read plan.md when context is long |
| Hide errors and retry silently | Log errors with resolution |
| Stuff everything in context | Store large content in files |
| Start executing immediately | Create plan.md first for complex tasks |
| Put research + decisions + notes in one big file | One file per concern — split by topic |
| Let plan.md grow past ~80 lines | Extract sections into dedicated files, link from plan.md |
npx claudepluginhub nikiforovall/scratchpad --plugin scratchpadCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.