Agent skill

Code Plan

by initializ in initializ/forge

Turn a task description and repository into a structured implementation plan (files to create, files to modify, tests to add, risks).

Apache-2.0Auto-check passedAgent Workflows

Install Code Plan

skills CLI
$ npx skills add initializ/forge --skill code-plan -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install initializ/forge code-plan --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/initializ/forge.git skills-src && mkdir -p .claude/skills && cp -r skills-src/forge-skills/local/embedded/code-plan .claude/skills/code-plan && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-plan
GitHub stars
223
Token cost
~1.9k tokens
SKILL.md length
675 words
Files
4 (incl. scripts)
Skills in repo
15
Repo updated
First seen
Licence
Apache-2.0

At a glance

Turn a task description and repository into a structured implementation plan (files to create, files to modify, tests to add, risks).

  • Works in 3 steps: The top entries of git ls-files (the… → The contents of detected manifest files:… → The first ~4 KB of README.md if present.
  • Tasks that involve Planning
  • SKILL.md covers When to use this skill, When NOT to use this skill, Plan-then-execute discipline and Workflow integration, plus 4 more sections
  • Runs Shell scripts from its folder; calls git

What it does

Code Plan is an agent skill from initializ/forge. Turn a task description and repository into a structured implementation plan (files to create, files to modify, tests to add, risks).

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `scripts/code-plan-create.sh`, `scripts/code-plan-validate.sh` and `scripts/common.sh`).

It sits in Agent Workflows, covering Planning. The repository describes itself as: Forge is the open-source runtime for Anthropic's Agent Skills standard — built for the agent that runs next to a service, in your environment, on infrastructure you already… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Planning

Example prompts

  • “/code-plan”

Requirements

  • A Bash shell
  • A credential in ANTHROPIC_API_KEY
  • A credential in OPENAI_API_KEY

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  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.

What it can do on your machine

Read from SKILL.md and the folder at commit 3c608d8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Plan loads about 1.9k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 675 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from initializ/forge at commit 3c608d8, republished under its Apache-2.0 licence (© initializ). 675 words, ~1,866 tokens.

Download SKILL.mdSave it as .claude/skills/code-plan/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
code-plan
description
Turn a task description and repository into a structured implementation plan (files to create, files to modify, tests to add, risks).
icon
🗺️
category
developer
tags
planning, code-generation, ticket-to-pr, llm-powered

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.

The total signal is size-bounded (default 256 KB, override via PLAN_MAX_REPO_SIGNAL_BYTES). If the repo is too large to fit, the tool returns status: "repo_too_large" rather than truncating silently — pass context_files to scope the plan to the relevant files, or call from a subdirectory.

Just pass repo_path. Do not pre-read the repo with grep_search before calling this tool.

Show full SKILL.md (349 more words)Show less

Tool: code_plan_create

Generate a structured implementation plan for a task in a repository. One LLM call, one plan.

Input:

ParameterTypeRequiredDescription
repo_pathstringyesAbsolute or ~-prefixed path to the repo. Required because scripts run in the agent's working directory, not the user's project.
taskstringyesTask description — Linear ticket body verbatim, or a free-form ask. Markdown ok.
context_filesstring[]noRepo-relative paths to include in full as additional context (e.g. ["src/auth/login.go"]). Capped at 5 files, 50 KB total.
target_branchstringnoBranch name being worked on (informational, helps the LLM pick consistent naming).
ticket_idstringnoLinear identifier or GitHub issue number. Echoed back in the output for traceability.

Output — success:

json
{
  "status": "ok",
  "ticket_id": "ENG-123",
  "stack_detected": "go",
  "summary": "One-paragraph plain-English description of the planned change.",
  "approach": "Higher-level reasoning: why this approach, what alternatives were considered.",
  "files_to_create": [
    { "path": "src/billing/invoice.go", "purpose": "New domain type and constructor for Invoice." }
  ],
  "files_to_modify": [
    { "path": "src/api/routes.go", "change": "Register /invoices route group, wire to handler." }
  ],
  "tests_to_add": [
    { "path": "src/billing/invoice_test.go", "covers": "Construction, validation, JSON round-trip." }
  ],
  "risks": [
    { "severity": "medium", "risk": "Existing customers will see a 422 on legacy payloads.", "mitigation": "Add a feature flag and default to the new behavior only for accounts created after launch date." }
  ],
  "complexity": "medium",
  "estimated_file_count": 3,
  "open_questions": [
    "Should invoice numbers be globally unique or per-customer?"
  ]
}

complexity is one of low, medium, high. risks[].severity is one of low, medium, high.

Output — repo too large:

json
{
  "status": "repo_too_large",
  "tree_bytes": 524288,
  "limit_bytes": 262144,
  "suggestion": "Pass context_files explicitly to scope the plan, or run from a subdirectory."
}

Output — no recognizable stack:

If no manifest (package.json, go.mod, etc.) is found, the plan is still attempted but stack_detected: "unknown" is set and an explicit risk is added noting that the stack could not be inferred.

Tool: code_plan_validate

Filesystem-only audit of a previously-generated plan against the current repo state. No LLM call. Cheap and idempotent — call it any time a plan was generated more than a few minutes ago, after pulling from remote, or before committing.

Input:

ParameterTypeRequiredDescription
repo_pathstringyesPath to the repo.
planobjectyesA previously-generated plan object (or its files_to_create / files_to_modify subset).

Output:

json
{
  "status": "ok",
  "files_to_modify_exist": [
    { "path": "src/api/routes.go", "exists": true }
  ],
  "files_to_create_collisions": [
    { "path": "src/billing/invoice.go", "exists": false }
  ],
  "warnings": [
    "files_to_modify[2] (src/legacy/old.go) does not exist in the repo; the plan may be stale."
  ]
}

A files_to_modify entry whose path does not exist becomes a warning. A files_to_create entry whose path already exists becomes a warning too — the plan would clobber existing code. Empty warnings means the plan still matches the repo.

Safety constraints

  • This skill never writes to the filesystem (writes_files: false). It returns JSON; downstream skills consume it.
  • Repo content is sent to the configured LLM provider; egress is restricted to api.anthropic.com and api.openai.com.
  • API keys are read from env vars, never logged. guardrails.deny_output redacts any key that leaks through an error payload.
  • Repo signal is size-bounded. Over budget → repo_too_large, never silent truncation.
  • One LLM call per code_plan_create invocation (plus one retry if the response fails schema validation).

© initializ, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts) in forge-skills/local/embedded/code-plan of initializ/forge.

  • SKILL.md
  • scripts/code-plan-create.sh
  • scripts/code-plan-validate.sh
  • scripts/common.sh

Open the folder on GitHubat commit 3c608d8

Compare with similar skills

Code Plan next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Plan compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Plan this skillinitializ/forge223—~1.9kAutomated safety check: PassApache-2.0
Executing Plans Inlineobra/superpowers296k2 repos~5.1kAutomated safety check: PassMIT
Interview Meaddyosmani/agent-skills102k6 repos~3.8kAutomated safety check: PassMIT
OpenSpec Guided OnboardingFission-AI/OpenSpec71k1 repos~4.5kAutomated safety check: PassMIT
Writing Plansgeeksblabla/stateofdev.ma16356 repos~661Automated safety check: PassNone
Subagent Driven DevelopmentAsvarox/allkaraoke26137 repos~1.2kAutomated safety check: PassNone

Similar skills

  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    296k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Interview Me

    addyosmani/agent-skills

    Asks one question at a time, each with a best guess attached, until the agent is about 95 percent sure what you really want, before any plan, spec or code.

    102k GitHub starsUsed in 6 repos~3.8k tokens
    Agent WorkflowsAuto-check passed
  • OpenSpec Guided Onboarding

    Fission-AI/OpenSpec

    Walks you through a complete OpenSpec workflow cycle with narration while doing real work in your codebase.

    71k GitHub starsUsed in 1 repo~4.5k tokens
    Agent WorkflowsAuto-check passed
  • Writing Plans

    geeksblabla/stateofdev.ma

    A skill your agent uses when design is complete and you need detailed implementation tasks for engineers with zero codebase context - creates comprehensive implementation plans with exact file…

    163 GitHub starsUsed in 56 repos~661 tokens
    Agent WorkflowsAuto-check passed
  • Subagent Driven Development

    Asvarox/allkaraoke

    A skill your agent uses when executing implementation plans with independent tasks in the current session

    261 GitHub starsUsed in 37 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • Planning With Files

    jd-opensource/JoySafeter

    Implements Manus-style file-based planning for complex tasks.

    313 GitHub starsUsed in 18 repos~1.8k tokens
    Agent WorkflowsAuto-check: notes

More from initializ/forge

All 15 skills in this repo
  • Code Review

    initializ/forge

    AI-powered code review for diffs and individual files using LLM analysis

    223 GitHub stars~3k tokensUpdated 6 days ago
    Auto-check passed
  • Codegen HTML

    initializ/forge

    Scaffold and iterate on standalone Preact + HTM applications with zero build dependencies

    223 GitHub stars~1.5k tokensUpdated 6 days ago
    Auto-check passed
  • Code Agent

    initializ/forge

    General-purpose coding agent that reads, writes, and edits code, and searches codebases.

    223 GitHub stars~2.5k tokensUpdated 6 days ago
    Auto-check: warnings
  • Codegen React

    initializ/forge

    Scaffold and iterate on Vite + React applications. An agent skill from initializ/forge.

    223 GitHub stars~1.8k tokensUpdated 6 days ago
    Auto-check passed
  • K8s Cost Visibility

    initializ/forge

    Estimate Kubernetes infrastructure costs by querying cluster node, pod, PVC/PV, and LoadBalancer data, applying cloud pricing models, and producing cost attribution reports with storage and…

    223 GitHub stars~2.7k tokensUpdated 6 days ago
    Auto-check passed
  • K8s Pod Rightsizer

    initializ/forge

    Analyze Kubernetes workload metrics and produce policy-constrained CPU/memory rightsizing recommendations with optional patch generation and rollback-safe apply.

    223 GitHub stars~4.3k tokensUpdated 6 days ago
    Auto-check passed

Categories

Questions about Code Plan

What does Code Plan do?

Turn a task description and repository into a structured implementation plan (files to create, files to modify, tests to add, risks). Code Plan is an agent skill from initializ/forge. Turn a task description and repository into a structured implementation plan (files to create, files to modify, tests to add, risks).

When should I use Code Plan?

Code Plan fits situations like: tasks that involve Planning.

How do I install Code Plan in Claude Code?

Run `npx skills add initializ/forge --skill code-plan -a claude-code`. Or copy the skill folder (forge-skills/local/embedded/code-plan in initializ/forge) into .claude/skills/code-plan in your project. Claude Code loads it when a task matches its description.

How do I install Code Plan in Codex?

Run `npx skills add initializ/forge --skill code-plan -a codex`. Or copy the skill folder (forge-skills/local/embedded/code-plan in initializ/forge) into .agents/skills/code-plan in your project. Codex loads it when a task matches its description.

Can I use Code Plan in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add initializ/forge --skill code-plan -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-plan, .gemini/skills/code-plan, .github/skills/code-plan and .opencode/skills/code-plan in your project.

What does Code Plan need to run?

Going by SKILL.md and its folder, Code Plan needs a shell for the scripts in its folder and the command-line tools its instructions call (git). Our summary lists: A Bash shell; A credential in ANTHROPIC_API_KEY; A credential in OPENAI_API_KEY.

Does Code Plan access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Code Plan safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Code Plan use?

Code Plan is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Plan use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Plan?

Skills that share tags, products or a category with Code Plan: Executing Plans Inline (obra/superpowers, 296k stars), Interview Me (addyosmani/agent-skills, 102k stars), OpenSpec Guided Onboarding (Fission-AI/OpenSpec, 71k stars) and Writing Plans (geeksblabla/stateofdev.ma, 163 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Plan?

initializ (a GitHub organization) maintains it in initializ/forge, which has 223 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 1, 2026.

Source: initializ/forge on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.