/snail:snail-planningfrom Snail
Draft a self-contained executable technical plan with atomic testable TODOs. Required context is inlined. Includes mandatory independent review. Use for planning rules, review of supplied plans, validation, splits, or any CreatePlan-style output.
Ships in Snail. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
When the user asks only to review an existing plan, read references/review.md and dispatch a readonly general-purpose Task subagent with the full contract and supplied text. Do not self-review, draft, rewrite, create a flow or advance gates. Triage its findings using that protocol and return the findings only. Reviewers never rewrite; edits require an explicit request. Draft mode below always includes the mandatory independent review loop.
From the project working directory, run node <skill-dir>/scripts/artifact-path.mjs using this skill's absolute installed path; store its output as <flow-root>. In every shell command double-quote expanded paths, e.g. init "$flow_root/snail-$slug"; for scans quote the root but leave the wildcard outside: "$flow_root"/snail-*/. It resolves project-specific $XDG_STATE_HOME/snail state (fallback ~/.local/state/snail). Discover and write all workflow artifacts there, including standalone use. Pass --in-repo only on an explicit user request, never because old files or policy exist. Leave old artifacts untouched; ask before moving, deleting or resuming them. On errors stop, never fall back to the repo.
<flow-root>/snail-<slug>/.1 - ALTERNATIVES.yaml exists and 2 - PLANNING*.yaml is missing. If one, suggest continuing it. If several, list them and ask. If none, derive a short kebab-case slug from the goal and confirm.<flow-root>/snail-<slug>/ if needed.node ../snail-flow/scripts/flow-state.mjs init <flow-root>/snail-<slug> --slug=<slug> --goal=<goal> --at=2. If slug review is requested while the standalone review artifact (<flow-root>/snail-review/4 - REVIEW.yaml, no runbook) exists, do not init over it and do not delete the file: surface the collision and let the user pick a different slug or explicitly approve moving or removing it.2 - PLANNING.yaml, then node ../snail-flow/scripts/flow-state.mjs advance <dir> --decision=proceed, and advance <dir> --valid=0 for row 2r once the review loop's latest pass is clean.A standalone install has no ../snail-flow/scripts/flow-state.mjs or templates — skip every init/advance/check call and work flow-less. For external artifacts no git ignore configuration is needed. With explicit --in-repo and no flow-state script, first check that git rev-parse --git-common-dir succeeds; outside git there is nothing to ignore. Inside git, add the flow root's repo-relative path on its own line to $(git rev-parse --git-common-dir)/info/exclude before writing (escape gitignore special characters); warn if artifacts are already tracked. Do not change .gitignore.
2 - PLANNING.yaml in its flow or PR directory, so later phases never guess from a glob.implementation_todos item is one focused, testable action.files key right after goal lists every path expected to change (repo-relative, no descriptions).Note meaningful chances for refactors, performance, or security — even if deferred, capture them in Risks or a short follow-up list.
node scripts/lint-plan.mjs <plan file> (bundled next to this SKILL.md, Node 24+ required), with --masterplan for the masterplan and --allow-draft for draft-only plans that omit branch_setup, delivery, and complexity_check. A plan that fails the lint is not ready for the review loop.context snippets are current code, not desired state.implementation_todos depth stays at 2 or less (one subtasks level).templates/plan.yaml.templates/masterplan.yaml as the decision record, then run each PR as its own normal flow (snail-<slug> per PR, one templates/plan.yaml each). Sub-plans repeat every fact they need from the masterplan.Use a masterplan + sub-plans (one per PR) if any of these hold:
implementation_todos, subtasks included).The complexity_check fields cross_deps and total counts inform a proceed or split decision; they do not force a split by themselves (multi-repo / multi-PR always does).
templates/plan.yaml in file order: goal, files, context, scope, risks, dependencies, priority, logging_observability, branch_setup, implementation_todos, delivery, docs, testing, verification, acceptance, fallback_plan, references, complexity_check (omit only if the user narrows scope).complexity_check with real counts and an explicit proceed or split decision.implementation_todos depth at 2 or less; flatten nested subtasks that are details, not independent TODOs.{{...}} placeholders left.After the plan matches the template and the pre-finalization pass is done, review every emitted document until the latest pass has zero valid findings. Dispatch, triage, false-positive carry-forward, exit rule, and stuck guard follow references/review.md, including its fallback when the shared core is absent.
references/review.md, then dispatch a new readonly general-purpose Task subagent with its full review contract and the full plan text (paste both; do not point at files). Include repo constraints, scope, masterplan/sub-plan linkage, validation gaps and earlier false-positive records. Do not self-review or skip this step.valid, false_positive, or unvalidated with a one-line reason; act on valid only.valid finding before the next review. Prefer minimal edits; fix root causes. Re-run the lint with the same flags as the self-audit (--masterplan for a masterplan, --allow-draft for a draft); a plan that fails is not ready for the next review.branch_setup, delivery, and complexity_check for draft-only or design-only plans (lint with --allow-draft).Planning covers what to build, how to sequence it, delivery shape, and plan review. Code review of the implementation is not part of this skill.
<flow-root>/snail-<slug>/2 - PLANNING.yamladvance <dir> --decision=proceed and advance <dir> --valid=0 (row 2r).<flow-root>/snail-<slug>/2 - PLANNING.yaml naming every PR and its slug.node ../snail-flow/scripts/flow-state.mjs init <flow-root>/snail-<pr-slug> --slug=<pr-slug> --goal=<goal> --at=2, then write that flow's 2 - PLANNING.yaml from templates/plan.yaml and advance it normally. PRs run one at a time, in masterplan order.2 - PLANNING-*.yaml files. Each flow has one unambiguous 2 - PLANNING.yaml.Do not commit or push unless requested.
Once the user approves the plan, hand off to snail-implement.
templates/plan.yamltemplates/masterplan.yamlIf the repo keeps copies under .cursor/templates/, update those in the same change.
references/review.md (opens in a new tab)scripts/artifact-path.mjs (opens in a new tab)scripts/lint-plan.mjs (opens in a new tab)scripts/node-guard.mjs (opens in a new tab)scripts/vendor/js-yaml.mjs (opens in a new tab)templates/masterplan.yaml (opens in a new tab)templates/plan.yaml (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub yoglib/snail --plugin snail11 skills in this plugin
/snailExperimental single-skill workflow from investigation to PR, with approval stops or explicit auto mode./snail-ai-toolbeltPointer to external AI tools and MCPs. Use when the user asks about the toolbelt, which tools are used, or how to install a recommended tool. This skill does not install tools./snail-alternativesSuggest up to 3 viable alternatives for a code or design decision. Includes mandatory independent review. Use when the user asks for alternatives, options, "better ways", or review of supplied options.