@shibbirweb/split-plan-skill
v1.1.0
Published
Agent Skill that plans a task too big for one session as a README plus short part files, one fresh session per part. Installs into Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode.
Maintainers
Readme
split-plan-skill
An Agent Skill for any AI coding agent (Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode and others) that plans a task too big for one short session as a plan folder: a README plus one short part file per session. Each part runs in its own fresh session, reads only what it needs, writes its results into files and stops.
It is built for audits, multi-file features, migrations and research across many sources: work where one long session runs out of room, starts summarizing its own history, and quietly loses detail.
Why
A long session pays for its whole history on every step. Once the history gets too long the agent has to summarize or compact it, and the summary drops the facts that mattered. Splitting the work by hand helps, but only if each new session gets a precise brief instead of "carry on from before".
The skill turns that brief into files:
- Facts are verified once, against the live source, and written into the plan with
path:line, commit ids and dates, so no later session builds on a stale checkout. - Every session starts small: the README, its own part file, and only the files that part lists.
- Results live in shared files with fixed formats and stable ids, so parts written by different sessions match.
- Every session ends with a Handoff: what is done, what is left, decisions, files touched and open questions, so the next one starts where this one stopped.
How it saves context
The diagrams show the idea; only the token counts are measured (by tests/budget.test.js, at about four characters per token).
One long session vs split sessions
flowchart LR
subgraph long["One long session"]
direction TB
L1["Step 1"] --> L2["Step 2"] --> L3["Step 3 and on"]
L3 --> L4["History too long, summarized"]
L4 --> L5["Detail lost"]
end
subgraph split["With split-plan-skill"]
direction TB
A["Advisor, stays small"]
P["Part N session, starts fresh"]
F[("Plan files")]
A -->|"starts part N"| P
F -->|"README, part file, listed files"| P
P -->|"results and Handoff"| F
F -->|"checks"| A
end
long ~~~ splitIn one long session the history grows with every step until it is summarized and detail is lost; with split-plan-skill each part starts a fresh session from the plan files, ends by writing its results back, and the advisor only reads those files.
What each session loads
flowchart LR
E(["Every session"]) --> ED["description<br/>about 97 tokens"]
P(["Part session"]) --> PS["SKILL.md<br/>about 1,350"] --> PR["running-a-part.md<br/>about 1,300"]
A(["Advisor"]) --> AS["SKILL.md<br/>about 1,350"] --> AR["advisor.md<br/>about 1,900"]
N(["Planner"]) --> NS["SKILL.md<br/>about 1,350"] --> NR["planning.md<br/>about 2,600"]Every session of your agent pays only for the description (about 97 tokens); a part session reads SKILL.md and running-a-part.md (about 2,650 tokens) instead of all the skill text (about 11,000 tokens for SKILL.md and every reference).
The advisor loop
sequenceDiagram
actor You
participant A as Advisor
participant P as Part N session
participant F as Plan files
You->>A: Run every part
loop Each part
A->>P: Start part N in a fresh session
P->>F: Read README, part file, listed files
P->>F: Write results, tick Status, rewrite Handoff
P-->>A: Part N done, one fact
A->>F: Check the result in the files
alt Check passes and nothing needs you
A->>You: Part N done. Starting part N+1.
else Approval, commit, blocked or open question
A->>You: Pause and ask
end
endThe advisor starts each part in a fresh session, checks its result in the plan files rather than trusting the report, and then starts the next part or pauses to ask you.
Small until it is used
Only the skill's short description (under 400 characters) loads into every session. SKILL.md is a router of under 100 lines that loads when the skill is used and sends each role to one reference file: the planner reads references/planning.md, a part session reads only references/running-a-part.md, the advisor reads references/advisor.md. Delivery mode costs a plan that does not use it one row in SKILL.md. tests/budget.test.js keeps these limits.
Two ways to run a plan
Advisor mode. When your agent can start a new session with a brief and is told when that session ends, the session you talk to becomes the advisor. It starts part 1 in a fresh session, waits for it to finish, checks the result from the plan files (not from the report), says Part 1 done: <one fact>. Starting part 2., and carries on until the plan is done. It pauses and asks you only when a part needs an approval, a commit or a push, ends blocked, leaves open questions, or fails its check twice. To you it feels like one conversation; each part still gets its own small session.
Manual mode. When your agent cannot start sessions, it gives you one line per part to paste into a new session:
Continue multi-currency part 1 from docs/plan/multi-currency/README.md.Agents that can start sessions but are not told when they end sit in between: they start each part and ask you to say "next" when it has finished.
Either way, each part session ends its last message with Part <id> done: <one fact> or Part <id> blocked: <reason>, and never starts the next part itself.
Delivery mode, for code shipped on one branch
When a plan's output is code, delivery mode (references/delivery-mode.md) adds what keeps parts small and the main line clean. It works with both ways of running a plan above.
- One branch per plan. Every part commits to it. You approve the branch once, when the plan is written; merging still asks.
- A Model for each part. A cheaper model runs the mechanical parts (tests from listed steps, renames, wiring), the strongest model the subtle ones and the advisor.
- A Code section in each part file: the files, the new names, pseudocode and the pattern to copy with
path:line, written by the advisor just before the part starts, so the part session decides nothing about naming or structure. - Finished plans are archived, not deleted, so their Decisions stay on record.
Only if you want the plan kept in sync with your code host and tracker (for example GitHub), it also opens one draft pull request per plan that the last part marks ready, runs CI as often as you choose (by default only once, when the last part pushes, since CI minutes can cost money on private repositories; or on every part, which then fixes what it broke in its own session), and each part can be an issue under the task's issue, closed by the advisor once it has checked the part. Without sync, everything stays on your local branch.
A README that names references/delivery-mode.md is a delivery plan; the validator then also checks the Branch row, the Model column (and an Issue column, if there is one), a Code section in every part file, and that the next part's Code has been written.
The shape of a plan
docs/plan/<task-id>/
README.md goal, how to start a part, base, rules, result formats,
parts table, status, decisions, handoff
part-01-<slug>.md goal, read first, known facts, steps, done when, review
part-02-<slug>.md
<results>.md shared result files the parts fill inThe plan changes without breaking: finished parts are never renumbered, a new part between 3 and 4 is 3b, a dropped part stays with the reason, and every change is a dated Decision.
examples/sample-plan/ is a complete made-up plan (moving a bookstore to multi-currency prices) with part 1 already finished, so you can see Status, Handoff and a shared result file mid-way.
Install
The skill follows the open Agent Skills format, so it installs the same way in every agent that supports it. The installed folder must be named split-plan-skill.
With npx (recommended)
With Node 18 or newer, run this in your project folder:
npx @shibbirweb/split-plan-skillThe installer asks two questions:
- Which agents should get split-plan-skill? A checkbox list of Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode. Move with the arrow keys (or j and k), toggle with space,
apicks all, enter confirms. Pick every agent you use. - This project or your user account? Project puts the skill in this folder (committed with the repo, so teammates get it too); user puts it in your home folder for every project.
It then shows the folders it will write and asks Install?. Codex, Cursor, GitHub Copilot, Gemini CLI and OpenCode share one copy in .agents/skills/split-plan-skill/. Claude Code reads only .claude/skills/, so it gets its own copy when it is the only agent picked, and a link to the .agents copy otherwise. The user scope uses the same folders inside your home folder.
To install without questions, for a script or an agent, give both --agents and --scope:
npx @shibbirweb/split-plan-skill --agents codex,claude-code --scope project --yes| Flag | What it does |
|---|---|
| --agents <list> | comma-separated ids: claude-code, codex, cursor, github-copilot, gemini-cli, opencode, or all |
| --scope <scope> | project (the folder from --dir) or user (your home folder) |
| --dir <folder> | project folder for --scope project (default: the current folder) |
| --yes, -y | ask nothing; needs --agents and --scope |
| --dry-run | print what would be written and write nothing |
| --force | replace an existing install that differs from this version |
| --help, --version | usage and version |
Running it again with the same version keeps what is there. An existing folder that differs stops the install before anything is written, unless you pass --force.
Let your AI agent install it
Paste this into your agent:
Install the skill from https://github.com/shibbirweb/split-plan-skill by following its INSTALL.md, then verify it.The agent works out which skills folder it reads, asks whether you want the skill for this project only or for every project, installs it there (with the npx installer when Node is available, by copying the folder otherwise) and runs the checks. INSTALL.md has the full steps and the folder for each agent.
Install by hand
Codex, Gemini CLI, Cursor, GitHub Copilot, OpenCode and most other agents read .agents/skills/:
git clone https://github.com/shibbirweb/split-plan-skill .agents/skills/split-plan-skill # this project
git clone https://github.com/shibbirweb/split-plan-skill ~/.agents/skills/split-plan-skill # every projectClaude Code reads .claude/skills/:
git clone https://github.com/shibbirweb/split-plan-skill .claude/skills/split-plan-skill # this project
git clone https://github.com/shibbirweb/split-plan-skill ~/.claude/skills/split-plan-skill # every projectFor the Claude desktop app or claude.ai, upload the .skill file from the latest release. Most agents pick the skill up on the next session.
Quick start
Ask in plain words:
- "plan this migration so each part runs in a new session"
- "split this into parts, the context keeps blowing up"
- "run all the parts until the plan is done"
- "continue multi-currency part 3 from docs/plan/multi-currency/README.md"
Or invoke it by name where your agent supports that (for example /split-plan-skill). The agent asks about scope when it is unclear, writes the plan folder, checks it with the validator, and then either starts part 1 as the advisor or gives you the line to start it.
Validate a plan by hand
node scripts/validate_plan.js docs/plan/<task-id>It checks the required headings in the README and every part file, that the Parts table, the part files and the Status checklist agree, that Steps and Done when are filled, that Handoff has its fields, that the start line is present, that no Decision id is used twice, and that no file uses an em-dash. Node 18 or newer, no dependencies.
Files
split-plan-skill/
├── SKILL.md a short router: roles, which file to read, shared rules
├── references/planning.md the planner: facts, parts, README, part files, hand over
├── assets/readme-template.md the plan README every plan starts from
├── assets/part-template.md the part file every part starts from
├── references/sizing.md how to tell a part is too big, with a worked example
├── references/running-a-part.md checklist for a part session, good and bad Handoff
├── references/advisor.md the advisor loop, a sample brief and the pause list
├── references/changing-a-plan.md inserting 3b, dropping a part, recording the change
├── references/delivery-mode.md delivery mode: one branch, Model, Code, optional sync
├── assets/delivery-*-additions.md what delivery mode adds to the two templates
├── scripts/validate_plan.js checks a plan folder
├── examples/sample-plan/ a made-up 5-part plan with part 1 finished
├── bin/split-plan-skill.js the npx installer
├── package.json the npm package @shibbirweb/split-plan-skill
├── tests/run-tests.js validator tests against the sample and broken copies
├── tests/installer.test.js installer tests in temp folders
├── tests/changelog.test.js changelog script tests
├── tests/budget.test.js context budget: description, SKILL.md, references, delivery mode
├── CHANGELOG.md Features and Fixes for every version
├── .github/scripts/ changelog-section.js: a version's changelog section for its release
└── evals/evals.json example prompts and expectations for testing the skillAn install holds SKILL.md, assets/, references/, scripts/, examples/, LICENSE and README.md. The installer, package.json, CHANGELOG.md, tests/ and evals/ are for working on the skill itself; a git clone has them too, and they do no harm there.
What changed in each version is in CHANGELOG.md. A merge into main with a new package.json version publishes it to npm and creates its GitHub release from that changelog section.
Rules for changing this repository, for people and agents alike, are in AGENTS.md. Its Releasing section has the steps.
License
MIT. See LICENSE.
