switch

A command for changing the active feature in a project that uses Spec Kit-style feature directories. It lists available features, checks the requested name, and records the selected feature for later commands.

In plain words
What is it for?
Use it to list available features, select one by name, switch between numbered feature folders, and update the project's active-feature record.
Why use it?
It prevents work from being applied to the wrong feature and makes the project's current focus explicit.

Command

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/tzachbon/smart-ralph/switch
Clone the repo
git clone --depth 1 https://github.com/tzachbon/smart-ralph
Per session 3 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 498 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.00003 $0.00498
Opus 5 $0.00002 $0.00249
Sonnet 5 $0.00001 $0.00100
Haiku 4.5 $0.00000 $0.00050

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

Security

Grade A, and why

switch 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 2d 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.

plugins/ralph-speckit/commands/switch.md · 77 lines

What it actually says

Switch Active Feature

You are switching the active feature.

Parse Arguments

From $ARGUMENTS:

  • name: The feature name to switch to (required)

Validate

  1. If no name provided, list available features and ask user to choose
  2. Check if .specify/specs/$name/ exists (supports both ###-name and plain name matching)
  3. If not, error: "Feature '$name' not found. Available features: "

List Available (if no argument)

If $ARGUMENTS is empty:

  1. List all directories in .specify/specs/
  2. Read current active feature from .specify/.current-feature
  3. Show list with current marked
Available features:
- 001-user-auth [ACTIVE]
- 002-payment-flow
- 003-dashboard

Run: /speckit:switch <feature-name>

Execute Switch

  1. Find matching feature directory (exact match or partial match on name portion):

    # Check for exact match first
    if [ -d ".specify/specs/$name" ]; then
      FEATURE="$name"
    else
      # Try matching by name suffix (e.g., "user-auth" matches "001-user-auth")
      FEATURE=$(ls -1 .specify/specs/ 2>/dev/null | grep -E "^[0-9]{3}-$name$" | head -1)
    fi
    
  2. Update .specify/.current-feature:

    echo "$FEATURE" > .specify/.current-feature
    
  3. Read the feature's state:

    • .speckit-state.json for phase and progress
    • .progress.md for context

Output

Switched to feature: $FEATURE

Current phase: <phase>
Progress: <taskIndex>/<totalTasks> tasks

Files present:
- [x/blank] spec.md
- [x/blank] plan.md
- [x/blank] tasks.md
- [x/blank] .progress.md

Next: Run /speckit:<appropriate-phase> to continue
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. 2d ago First seen · 77 lines · 3 tokens per session scan A 0074a5fc74c9

Subscribe to this mod's changes

switch is a command published in the GitHub repository tzachbon/smart-ralph (527 stars, last pushed 5d ago), licensed MIT. It adds 3 tokens to every session and 498 once invoked, about $0.0000 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.