Code Plan logo

Code Plan

Organization
initializ
code-plan

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

Overview

Publisherinitializ
Repositoryforge
Skill namecode-plan
Stars
242
Forks
14
Bundled files
3
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by initializ on GitHub. Read the source before you install it.

Installation

Install the Code Plan AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/initializ/forge/tree/main/forge-skills/local/embedded/code-plan
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/initializ/forge.git /tmp/forge
mkdir -p .claude/skills
cp -r /tmp/forge/forge-skills/local/embedded/code-plan .claude/skills/code-plan
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Code Plan in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Code Plan on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Code Plan is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

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).

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Code Plan AI skill do?

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

Why use Code Plan on TypingMind?

Because you install it once and use it with any model. Code Plan is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Code Plan in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/initializ/forge/tree/main/forge-skills/local/embedded/code-plan. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Code Plan?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Code Plan?

As many as you like. As long as a model supports skills, you can use Code Plan with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Code Plan AI skill free?

Yes. It is published on GitHub by initializ under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇