plan-first

plan-first is a skill for Claude Code, Codex from bearded-illirian/trailmark. It costs 75 tokens per session (1,275 once invoked), scanned A, original, MIT.

A planning workflow that creates and records a detailed plan before writing documents, code, tests, database changes, or performing Git operations.

In plain words
What is it for?
Use it to prepare a seven-to-fifteen-step implementation plan and produce progress and handover reports.
Why use it?
It makes the intended work explicit and requires confirmation before execution, helping prevent unclear or oversized changes.

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/bearded-illirian/trailmark/plan-first
Any agent
npx skills add bearded-illirian/trailmark --skill plan-first
Clone the repo
git clone --depth 1 https://github.com/bearded-illirian/trailmark

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for plan-first

README.md
[![agentmods](https://agentmods.dev/badge/skills/bearded-illirian/trailmark/plan-first.svg)](https://agentmods.dev/skills/bearded-illirian/trailmark/plan-first)
Your own site
<a href="https://agentmods.dev/skills/bearded-illirian/trailmark/plan-first"><img src="https://agentmods.dev/badge/skills/bearded-illirian/trailmark/plan-first.svg" alt="Measured on agentmods" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,275 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00075 $0.01275
Opus 5 $0.00037 $0.00638
Sonnet 5 $0.00015 $0.00255
Haiku 4.5 $0.00007 $0.00128

Measured 5d ago against content hash 1870576fa763, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

plan-first scanned grade A with 0 findings 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 5d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

adapters/codex/.agents/skills/plan-first/SKILL.md · 175 lines

How it starts

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

Plan-First Protocol

Mandatory protocol before any of the following:

  • Writing a document (spec, README, guide, architecture)
  • Writing new code (file, module, component)
  • Refactoring existing code
  • Database migration
  • Writing tests / test plan
  • Git operations (commit, PR, merge)

Input

The approved library-first-{N}.{R}.md with atomic rows the plan will execute.

Output

A 7-15 row plan table saved as plan-first-{N}.{R}.md; after execution — report-{N}.{R}.md and user-note-{N}.{R}.md.

Hands off to

ship-first — per-block mode closes the block and moves to next; task-level mode closes the task.


Step 0 — Task context

Ensure {log_dir} and {slug} are known.


Step 1 — Build the plan table

A table of 7–15 rows. Each row = one atomic step.

Columns:

  • # — sequential number
  • Step title — verb + object ("create X", "update Y", "delete Z")
  • Short summary — 1 sentence what this step actually does

Rules:

  • 7 to 15 rows — fewer means the block is too small (skip planning), more means it's too big (decompose)
  • Right column is a concrete summary, not "TBD" or empty
  • No research steps ("read X", "figure out Y") — those belong in flow-first / library-first, not plan-first

Step 2 — Show table + pick mode

Show the plan table to the user. Ask for one of three modes:

Mode:
1 — Autopilot: I execute every step without pauses, then a final report
2 — Step-by-step: I pause after each step, wait for "ok" to continue
3 — Draft only: I don't execute, just save the plan for later

Wait for the user's response.

Auto-execution context (e.g. dev-auto-first): mode = 1 (autopilot) chosen automatically.


Step 3 — Save the artifact

Write {log_dir}/plan-first-{N}.{R}.md where:

  • N = current block number
  • R = round (1 by default, 2+ on revision)

Structure:

> 🔗 Task: tasks/log/{slug}/task.md

# plan-first — plan for block {N}

**Date:** {date}
**Mode:** {chosen mode}

## Plan

| # | Step title | Short summary |
|:-:|---|---|
| 1 | ... | ... |
| ... | ... | ... |

## Risks

- {risk 1}
- ...

## Out of scope

- {what is deliberately not done in this block}

Read the full file on GitHub · 175 lines

Files

What ships with it

1 file 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. 5d ago First seen · 175 lines · 75 tokens per session scan A 1870576fa763

Subscribe to this mod's changes

plan-first is a skill published in the GitHub repository bearded-illirian/trailmark (19 stars, last pushed 3d ago), licensed MIT. It adds 75 tokens to every session and 1,275 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.