code-plan

A planning tool that turns a coding task and a specific code repository into a structured implementation plan. It lists files to create or change, tests to add, and possible risks before coding starts.

In plain words
What is it for?
Use it to plan work from a ticket, issue, or task description. It helps identify affected files, new tests, and risks before implementation.
Why use it?
It prevents developers from beginning with an incomplete understanding of the work. It also separates planning from code changes, making larger tasks easier to review first.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/initializ/forge/code-plan
Any agent
npx skills add initializ/forge --skill code-plan
Clone the repo
git clone --depth 1 https://github.com/initializ/forge

Made for: Claude Code, Codex.

Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,860 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00029 $0.01860
Opus 5 $0.00015 $0.00930
Sonnet 5 $0.00006 $0.00372
Haiku 4.5 $0.00003 $0.00186

Measured yesterday against content hash 35beb8cc9305, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-plan scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/code-plan-create.sh, scripts/code-plan-validate.sh, scripts/common.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- curl
forge-skills/local/embedded/code-plan/SKILL.md · 182 lines

How it starts

The opening of the file, as written. The whole thing — 182 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Plan Skill

Generate a structured plan for implementing a task in a specific repository. The plan is the bridge between "I have a ticket" and "let me start writing code" — it lists files to create, files to modify, tests to add, and risks before any code is written.

This skill produces JSON. It does not write code; that is code_agent_*'s job.

When to use this skill

  • The user provides a Linear ticket, GitHub issue, or free-form task description and asks you to implement it.
  • Before any code_agent_write, code_agent_edit, or github_commit tool call.
  • When the user explicitly asks for a plan.

When NOT to use this skill

  • Tiny single-file edits (1–3 lines). Just edit directly.
  • Pure exploration tasks. Use grep_search / directory_tree instead.
  • Pure scaffolding tasks (e.g. "create a new React app"). Use code_agent_scaffold instead.

Plan-then-execute discipline

Once a plan is generated, present its summary and files_to_modify / files_to_create lists to the user before writing code. Do NOT proceed to implementation if the plan returns complexity: "high" or non-empty risks without acknowledging them to the user. The plan is a contract: subsequent code-writing tool calls should match files listed in the plan. If the plan turns out to be wrong, regenerate it rather than silently drifting from it.

Workflow integration

Canonical sequence for a ticket-to-PR flow:

linear_get_issue
  → code_plan_create                  [present summary + risks to user]
  → code_agent_write / code_agent_edit
  → code_plan_validate                [optional sanity check before commit]
  → github_commit
  → github_create_pr

Repo signal extraction (informational)

code_plan_create automatically samples the repository so the LLM has enough context to plan without you pre-reading files. It collects:

  1. The top entries of git ls-files (the repo tree).
  2. The contents of detected manifest files: package.json, go.mod, pyproject.toml, Cargo.toml, pom.xml, build.gradle*.
  3. The first ~4 KB of README.md if present.

Read the full file on GitHub · 182 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 182 lines · 29 tokens per session scan A 35beb8cc9305

Subscribe to this mod's changes

code-plan is a skill published in the GitHub repository initializ/forge (156 stars, last pushed 4d ago), licensed Apache-2.0. It adds 29 tokens to every session and 1,860 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.