gsd:remove-phase

gsd:remove-phase is a command for Claude Code from Jamie-BitFlight/git-project-xray-mcp. It costs 17 tokens per session (2,485 once invoked), scanned C, a copy of gsd:remove-phase, MIT.

A command for deleting a future phase from a project roadmap and renumbering the phases that follow it. A roadmap is a planned sequence of project work.

In plain words
What is it for?
Use it with a future phase number to delete that phase, update the roadmap numbering, and record the change in Git.
Why use it?
It removes cancelled future work cleanly instead of leaving outdated entries or cancellation notes in the plan.

Command for Claude Code

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 commands/jamie-bitflight/git-project-xray-mcp/remove-phase
Clone the repo
git clone --depth 1 https://github.com/Jamie-BitFlight/git-project-xray-mcp

Made for: Claude Code.

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 gsd:remove-phase

README.md
[![agentmods](https://agentmods.dev/badge/commands/jamie-bitflight/git-project-xray-mcp/remove-phase.svg)](https://agentmods.dev/commands/jamie-bitflight/git-project-xray-mcp/remove-phase)
Your own site
<a href="https://agentmods.dev/commands/jamie-bitflight/git-project-xray-mcp/remove-phase"><img src="https://agentmods.dev/badge/commands/jamie-bitflight/git-project-xray-mcp/remove-phase.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,485 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00017 $0.02485
Opus 5 $0.00009 $0.01242
Sonnet 5 $0.00003 $0.00497
Haiku 4.5 $0.00002 $0.00248

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

Security

Grade C, and why

gsd:remove-phase scanned grade C with 1 finding 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 4d 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ".planning/phases/{target}-{slug}"
Origin

This is a copy

100% identical to gsd:remove-phase — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/gsd/remove-phase.md · 350 lines

How it starts

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

Purpose: Clean removal of work you've decided not to do, without polluting context with cancelled/deferred markers. Output: Phase deleted, all subsequent phases renumbered, git commit as historical record.

<execution_context> @.planning/ROADMAP.md @.planning/STATE.md </execution_context>

If no argument provided:

ERROR: Phase number required
Usage: /gsd:remove-phase <phase-number>
Example: /gsd:remove-phase 17

Exit.

cat .planning/STATE.md 2>/dev/null
cat .planning/ROADMAP.md 2>/dev/null

Parse current phase number from STATE.md "Current Position" section.

  1. Search for ### Phase {target}: heading

  2. If not found:

    ERROR: Phase {target} not found in roadmap
    Available phases: [list phase numbers]
    

    Exit.

  1. Compare target phase to current phase from STATE.md
  2. Target must be > current phase number

If target <= current phase:

ERROR: Cannot remove Phase {target}

Only future phases can be removed:
- Current phase: {current}
- Phase {target} is current or completed

To abandon current work, use /gsd:pause-work instead.

Exit.

  1. Check for SUMMARY.md files in phase directory:
ls .planning/phases/{target}-*/*-SUMMARY.md 2>/dev/null

If any SUMMARY.md files exist:

ERROR: Phase {target} has completed work

Found executed plans:
- {list of SUMMARY.md files}

Cannot remove phases with completed work.

Exit.

  1. Extract phase name from ROADMAP.md heading: ### Phase {target}: {Name}
  2. Find phase directory: .planning/phases/{target}-{slug}/
  3. Find all subsequent phases (integer and decimal) that need renumbering

Subsequent phase detection:

For integer phase removal (e.g., 17):

  • Find all phases > 17 (integers: 18, 19, 20...)
  • Find all decimal phases >= 17.0 and < 18.0 (17.1, 17.2...) → these become 16.x
  • Find all decimal phases for subsequent integers (18.1, 19.1...) → renumber with their parent

For decimal phase removal (e.g., 17.1):

  • Find all decimal phases > 17.1 and < 18 (17.2, 17.3...) → renumber down
  • Integer phases unchanged

List all phases that will be renumbered.

Removing Phase {target}: {Name}

This will:
- Delete: .planning/phases/{target}-{slug}/
- Renumber {N} subsequent phases:
  - Phase 18 → Phase 17
  - Phase 18.1 → Phase 17.1
  - Phase 19 → Phase 18
  [etc.]

Proceed? (y/n)

Wait for confirmation.

if [ -d ".planning/phases/{target}-{slug}" ]; then
  rm -rf ".planning/phases/{target}-{slug}"
  echo "Deleted: .planning/phases/{target}-{slug}/"
fi

If directory doesn't exist, note: "No directory to delete (phase not yet created)"

For each phase directory that needs renumbering (in reverse order to avoid conflicts):

# Example: renaming 18-dashboard to 17-dashboard
mv ".planning/phases/18-dashboard" ".planning/phases/17-dashboard"

Process in descending order (20→19, then 19→18, then 18→17) to avoid overwriting.

Also rename decimal phase directories:

  • 17.1-fix-bug16.1-fix-bug (if removing integer 17)
  • 17.2-hotfix17.1-hotfix (if removing decimal 17.1)

Read the full file on GitHub · 350 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. 4d ago First seen · 350 lines · 17 tokens per session scan C ac02a4efc7ff

Subscribe to this mod's changes

gsd:remove-phase is a command published in the GitHub repository Jamie-BitFlight/git-project-xray-mcp (0 stars, last pushed 6mo ago), licensed MIT. It adds 17 tokens to every session and 2,485 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). It is 100% identical to gsd:remove-phase, differing in 0 lines, and is treated as a copy.