test-bar-remove

test-bar-remove is a command for Claude Code from axiomantic/spellbook. It costs 26 tokens per session (1,742 once invoked), scanned A, original, MIT.

A cleanup command that removes the temporary QA overlay and related files created by the test-bar command. It checks for later developer changes before restoring files.

In plain words
What is it for?
It helps clean up injected UI test controls, restore modified files, delete generated files, and check that the project still builds.
Why use it?
It prevents leftover testing code from remaining in the project and avoids overwriting work added after the overlay was installed.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md).

Good fit It helps clean up injected UI test controls, restore modified files, delete…

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/axiomantic/spellbook/test-bar-remove
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/axiomantic/spellbook

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 test-bar-remove

README.md
[![agentmods](https://agentmods.dev/badge/commands/axiomantic/spellbook/test-bar-remove.svg)](https://agentmods.dev/commands/axiomantic/spellbook/test-bar-remove)
Your own site
<a href="https://agentmods.dev/commands/axiomantic/spellbook/test-bar-remove"><img src="https://agentmods.dev/badge/commands/axiomantic/spellbook/test-bar-remove.svg" alt="Measured on agentmods" height="20"></a>
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,742 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.00026 $0.01742
Opus 5 $0.00013 $0.00871
Sonnet 5 $0.00005 $0.00348
Haiku 4.5 $0.00003 $0.00174

Measured 3d ago against content hash 4d499119d1a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

test-bar-remove 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 3d 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.

commands/test-bar-remove.md · 217 lines

How it starts

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

MISSION

Completely remove all test apparatus code injected by /test-bar. Restore every modified file to its pre-injection state. Delete every created file. Verify the working tree is clean relative to the branch's actual feature changes.

Invariant Principles

  1. Safety before speed - Check for user modifications before reverting. Never destroy work the developer added on top of the test bar injection.
  2. Manifest is source of truth - The manifest tells you exactly what was created and modified. Trust it over heuristics.
  3. Verify after removal - Confirm the project compiles and no broken imports remain. A partial removal is worse than no removal.
  4. Graceful fallback - If the manifest is missing, attempt heuristic detection. Report clearly and exit if detection fails.

Step 1: Read Manifest

cat $SPELLBOOK_CONFIG_DIR/test-bar-manifest.json 2>/dev/null

If manifest exists: Parse it and proceed to Step 2.

If manifest does NOT exist: Fall back to heuristic detection:

# Search for test bar artifacts
echo "=== COMPONENT FILES ==="
find src/ -name "TestScenarioBar*" -o -name "testScenarioData*" 2>/dev/null

echo "=== INJECTION POINTS ==="
grep -rn "TestScenarioBar\|test-scenario-bar\|Test Scenario Bar" src/ \
  --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null

echo "=== DEV-ONLY COMMENTS ==="
grep -rn "DEV-ONLY: Test scenario bar\|remove with /test-bar-remove" src/ \
  --include="*.ts" --include="*.tsx" --include="*.js" --include="*.jsx" 2>/dev/null
  • If artifacts found: Build a synthetic manifest from the search results and proceed with user confirmation.
  • If nothing found: Report "No test bar found to remove. No manifest at $SPELLBOOK_CONFIG_DIR/test-bar-manifest.json and no TestScenarioBar artifacts detected in source." and exit.

Read the full file on GitHub · 217 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. 3d ago First seen · 217 lines · 26 tokens per session scan A 4d499119d1a5

Subscribe to this mod's changes

test-bar-remove is a command published in the GitHub repository axiomantic/spellbook (10 stars, last pushed 3d ago), licensed MIT. It adds 26 tokens to every session and 1,742 once invoked, about $0.0001 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-09-03.

Related

Other commands, from other repositories