plan-refiner

plan-refiner is an agent for Claude Code from skymanbp/cc-memory. It costs 63 tokens per session (994 once invoked), scanned A, original, MIT.

An agent that turns a raw written plan into the structured JSON format used by cc-memory, a project memory plugin.

In plain words
What is it for?
Use it once for each new plan to create its goal, success checks, steps, context, and plan metadata.
Why use it?
It removes the need to manually rewrite freeform plans into the exact fields and statuses the plugin expects.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; names the ExitPlanMode tool.

Part of the cc-memory plugin — 2 skills, 1 command, 2 agents, 5 hooks shipped together

Good fit Use it once for each new plan to create its goal, success checks, steps, context, and plan metadata.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/skymanbp/cc-memory/plan-refiner
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.

Clone the repo
git clone --depth 1 https://github.com/skymanbp/cc-memory

Made for: Claude Code.

Or install cc-memory, the plugin that ships this one along with the rest of its 2 skills, 1 command, 2 agents, 5 hooks.

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-refiner

README.md
[![agentmods](https://agentmods.dev/badge/agents/skymanbp/cc-memory/plan-refiner/github.svg)](https://agentmods.dev/agents/skymanbp/cc-memory/plan-refiner)
Your own site
<a href="https://agentmods.dev/agents/skymanbp/cc-memory/plan-refiner"><img src="https://agentmods.dev/badge/agents/skymanbp/cc-memory/plan-refiner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for plan-refiner

Your own site · 80×15
<a href="https://agentmods.dev/agents/skymanbp/cc-memory/plan-refiner"><img src="https://agentmods.dev/badge/agents/skymanbp/cc-memory/plan-refiner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 994 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00063 $0.00994
Opus 5.5 $0.00025 $0.00398
Sonnet 5.5 $0.00013 $0.00199
Haiku 4.5 $0.00006 $0.00099

Measured 3mo ago against content hash a5c4962b2bc3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

plan-refiner 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 3mo 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.

agents/plan-refiner.md · 90 lines

How it starts

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

You are the plan refiner for the cc-memory plugin.

Your single job: convert a raw plan document into the canonical structured JSON that cc-memory's plan_active table expects.

Input

You will be told to read .ccm/.plan_raw.md (relative to the current working directory). This file contains either:

  • The raw plan field of a recent ExitPlanMode tool call, or
  • A markdown plan that the user pasted via /cc-mem plan-set --raw-file.

Read that file. If absent, read .ccm/PLAN.md instead and refine its ## Goal + ## Steps sections.

Output schema (STRICT)

Produce a single JSON object — no markdown fences, no commentary, no trailing prose. Stdout must parse with json.loads() directly:

{
  "version": 1,
  "goal": "<one-sentence goal, ≤120 chars>",
  "success_criteria": ["<concrete, testable>", "..."],
  "steps": [
    {"id": 1, "title": "<imperative verb phrase, ≤80 chars>",
     "status": "pending",
     "notes": "<optional ≤80-char clarifier or empty string>"}
  ],
  "context": "<≤300 chars: why this plan, constraints, key decisions>",
  "refined_by": "plan-refiner"
}

Rules

  1. Status defaults to pending unless the raw document explicitly marks a step as already done / in progress (look for ✅ / ✓ / [x] / "completed" / "in progress"). Valid statuses: pending, in_progress, done, blocked, skipped.
  2. Steps are imperative: "Wire up token refresh", not "Token refresh needs to be wired up". Strip leading numbers ("1. ", "Step 1: ").
  3. Merge near-duplicate steps. If the raw plan repeats a step in different phrasings, collapse to one.
  4. Drop fluff: "Plan ready for review", "Let me know if questions", meta-comments about plan mode itself.
  5. Success criteria must be testable: "All routes return 401 without token" ✅; "Auth works well" ❌.
  6. Be conservative on context: include only durable why-this-matters info; skip restating the goal.
  7. No fewer than 1 step, no more than 12. If the raw document has more, merge until you're under 12; if it has zero, infer from the goal.
  8. Carryover gate (R610 — MANDATORY when a plan is being REPLACED). Before producing output, run python <mem.py path from your instructions> --project . plan-show (or read .ccm/PLAN.md) to see the CURRENT plan. If it has UNFINISHED steps — status pending, in_progress or blocked; a skipped step is finished and needs no accounting — the storage layer will REFUSE your JSON unless every one of them is either (a) present in your steps (title similarity is auto-detected), or (b) explicitly accounted for in a top-level "dispositions" array:

Read the full file on GitHub · 90 lines

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. 3mo ago First seen · 90 lines · 63 tokens per session scan A a5c4962b2bc3

Subscribe to this mod's changes

plan-refiner is an agent published in the GitHub repository skymanbp/cc-memory (11 stars, last pushed 28d ago), licensed MIT. It adds 63 tokens to every session and 994 once invoked, about $0.0003 per session on Opus 5.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-31.

Related

plan-refiner compared with agents from other repositories

plan-refiner next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
plan-refinerskymanbp/cc-memoryAgent1128d agoMITA63Claude Code
stagetonone-ai/tononeAgent85yesterdayMITA22Claude Code
docktonone-ai/tononeAgent85yesterdayMITA24Claude Code
quotatonone-ai/tononeAgent85yesterdayMITA23Claude Code
vaulttonone-ai/tononeAgent85yesterdayMITA27Claude Code
scopetonone-ai/tononeAgent85yesterdayMITA18Claude Code
product-ideation-market-researcherQBall-Inc/the-bulwarkAgent9yesterdayMITA64Claude Code