Plan Before Code logo

Plan Before Code

Community
andreaswasita
plan-before-code

Plans multi-step work before writing code.

Overview

Publisherandreaswasita
Repositorycopilot-agents-dojo
Skill nameplan-before-code
Stars
54
Forks
15
Bundled files
Instructions only
LicenseMIT
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.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

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

Installation

Install the Plan Before Code 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/andreaswasita/copilot-agents-dojo/tree/main/skills/plan-before-code
  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/andreaswasita/copilot-agents-dojo.git /tmp/copilot-agents-dojo
mkdir -p .claude/skills
cp -r /tmp/copilot-agents-dojo/skills/plan-before-code .claude/skills/plan-before-code
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Plan Before Code 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 Plan Before Code 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 Plan Before Code 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.

Plan Before Code Skill

Forces an explicit written plan in tasks/todo.md before the agent edits any file for non-trivial work. Does NOT apply to one-line fixes, typo corrections, or any task the agent can finish in a single edit — over-planning trivial work is its own failure mode.

When to Use

  • Any task that will touch 3+ files or require 3+ steps.
  • Before implementing unfamiliar features or architectural changes.
  • After a previous approach failed and a re-plan is needed.
  • When scope or requirements are ambiguous.
  • Before refactoring that crosses module boundaries.
  • NOT for: typos, comment-only edits, single-line bug fixes, formatting.

Prerequisites

  • A writable tasks/todo.md (created by scripts/init.sh if missing).
  • An approved problem statement from the user or brainstorming skill.
  • The repo cloned and the working tree clean enough to start (use powershell with git status).

How to Run

text
0. Recall prior memory for the topic (memory_recall MCP tool or scripts/memory-recall.sh) and fold it into Context.
1. Assess complexity (the 4 questions in Procedure §1).
2. If non-trivial → write plan to tasks/todo.md using the canonical block.
3. Validate the plan against the gap checklist.
4. Execute one step at a time, checking items off as you go.

Quick Reference

SituationActionTool
Before writing a planRecall prior memorymemory_recall MCP tool, or powershell → scripts/memory-recall.sh
Touch ≥3 filesEnter plan modeview tasks/todo.md then edit
Re-plan after wall hitAppend a ## Revision N blockedit tasks/todo.md
Check existing planRead current stateview tasks/todo.md
Mark step doneFlip - [ ] to - [x]edit tasks/todo.md
Resume across sessionsRe-read the plan firstview tasks/todo.md

Procedure

Step 0: Recall Prior Memory

Before assessing complexity, surface what the dojo already knows so the plan compounds past knowledge instead of re-deriving it. Use the memory_recall MCP tool with the work's topic (and language/fileType when known). If that tool is unavailable, use powershell to run scripts/memory-recall.sh --topic "<topic>".

Fold the returned active decisions, matching patterns, and recent sessions into the Context block of the plan. This step is advisory: an empty vault or a recall with no hits never blocks planning — just proceed to Step 1.

Step 1: Assess Complexity

Answer these four questions in order:

  1. How many files will this touch?
  2. Are there architectural decisions to make?
  3. Could this break existing functionality?
  4. Is the requirement ambiguous?

If any answer is "yes" or "maybe," enter plan mode. Otherwise, proceed without a plan (don't pretend a typo fix needs one).

Step 2: Write the Plan

Append to tasks/todo.md using the edit tool with this canonical block:

markdown
## Task: <brief description>

### Context
- What: <what we're building or fixing>
- Why: <the motivation>
- Risk: <what could go wrong>
- Prior memory: <decisions/patterns/sessions surfaced in Step 0, or "none">

### Steps
- [ ] Step 1: <specific action>
- [ ] Step 2: <specific action>
- [ ] Step 3: <specific action>

### Verification
- [ ] Tests pass (`scripts/verify.sh tests`)
- [ ] No regressions
- [ ] Diff reviewed

Step 3: Validate the Plan

Before executing, walk the plan once and ask:

  • Are step dependencies explicit?
  • Is the verification block concrete (specific commands, not vibes)?
  • Is any step large enough that it should be split?

Step 4: Execute with Checkpoints

Follow the plan one step at a time. Mark items complete only after the work for that step is done and locally verified. If something goes sideways:

  1. STOP immediately — don't keep editing on a broken plan.
  2. Log what went wrong in tasks/lessons.md.
  3. Append a ### Revision N block to the task in tasks/todo.md.
  4. Resume from the revised plan.

Pitfalls

  • DO NOT keep the plan only in memory. If it is not in tasks/todo.md, it does not exist.
  • DO NOT over-plan trivial work. A one-line fix doesn't need a 20-step plan.
  • DO NOT refuse to re-plan. The first plan is almost never perfect; revise when new information arrives.
  • DO NOT start editing files before the plan block is committed to tasks/todo.md.
  • DO NOT mark a step - [x] until its verification in §2 is satisfied.
  • DO NOT skip Step 0 recall on familiar-looking work — the whole point is to catch a prior decision or pitfall you've forgotten. A no-hit recall is cheap; a repeated mistake is not.

Verification

  • Step 0 recall was run (memory_recall or scripts/memory-recall.sh) and its findings folded into Context.
  • tasks/todo.md contains a ## Task: block for the current work.
  • Every step is concrete (a different agent could execute it).
  • Verification block lists specific commands, not just "tests pass".
  • scripts/verify.sh plan passes.

Frequently asked questions

What does the Plan Before Code AI skill do?

Plans multi-step work before writing code.

Why use Plan Before Code on TypingMind?

Because you install it once and use it with any model. Plan Before Code 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 Plan Before Code in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/andreaswasita/copilot-agents-dojo/tree/main/skills/plan-before-code. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Plan Before Code?

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 Plan Before Code?

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

Is the Plan Before Code AI skill free?

Yes. It is published on GitHub by andreaswasita under the MIT 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 👇