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.
npx agentmods add commands/martybonacci/specswarm/fixgit clone --depth 1 https://github.com/MartyBonacci/specswarmWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00018 | $0.05768 |
| Opus 5 | $0.00009 | $0.02884 |
| Sonnet 5 | $0.00004 | $0.01154 |
| Haiku 4.5 | $0.00002 | $0.00577 |
Grade A, and why
fix 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.
How it starts
The opening of the file, as written. The whole thing — 745 lines — stays where its author put it; the contents beside it link to each section on GitHub.
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Goal
Fix bugs using a test-driven approach with automatic retry logic for failed fixes.
Purpose: Streamline bug fixing by combining bugfix workflow with retry logic and optional regression testing.
Workflow:
- Standard: Bugfix → Verify → (Retry if needed)
- With --regression-test: Create Test → Verify Fails → Bugfix → Verify Passes
- With --hotfix: Expedited workflow for production issues
User Experience:
- Single command instead of manual bugfix + validation
- Automatic retry if fix doesn't work
- Test-first approach ensures regression prevention
- Ready for final merge with
/ss:ship
Pre-Flight Checks
# Parse arguments
BUG_DESC=""
REGRESSION_TEST=false
HOTFIX=false
MAX_RETRIES=2
BACKGROUND_MODE=false
NOTIFY_ON_COMPLETE=false
COORDINATE_MODE=false
# Extract bug description (first non-flag argument)
for arg in $ARGUMENTS; do
if [ "${arg:0:2}" != "--" ] && [ -z "$BUG_DESC" ]; then
BUG_DESC="$arg"
elif [ "$arg" = "--regression-test" ]; then
REGRESSION_TEST=true
elif [ "$arg" = "--hotfix" ]; then
HOTFIX=true
elif [ "$arg" = "--max-retries" ]; then
shift
MAX_RETRIES="$1"
elif [ "$arg" = "--background" ]; then
BACKGROUND_MODE=true
elif [ "$arg" = "--notify" ]; then
NOTIFY_ON_COMPLETE=true
elif [ "$arg" = "--coordinate" ]; then
COORDINATE_MODE=true
fi
done
# Validate bug description
if [ -z "$BUG_DESC" ]; then
echo "❌ Error: Bug description required"
echo ""
echo "Usage: /ss:fix \"bug description\" [options]"
echo ""
echo "Options:"
echo " --regression-test Create failing test first (TDD approach)"
echo " --hotfix Expedited workflow for production issues"
echo " --max-retries N Maximum fix retry attempts (default 2)"
echo " --coordinate Multi-bug orchestrated debugging"
echo " --background Run fix in background mode"
echo ""
echo "Examples:"
echo " /ss:fix \"Login fails with special characters in password\""
echo " /ss:fix \"Cart total incorrect with discounts\" --regression-test"
echo " /ss:fix \"Production API timeout\" --hotfix"
echo " /ss:fix \"Memory leak in dashboard\" --regression-test --max-retries 3"
echo " /ss:fix \"navbar broken, sign-out fails, like button error\" --coordinate"
exit 1
fi
# Get project root
if ! git rev-parse --git-dir > /dev/null 2>&1; then
echo "❌ Error: Not in a git repository"
exit 1
fi
REPO_ROOT=$(git rev-parse --show-toplevel)
cd "$REPO_ROOT"
# Create session tracking for background mode
mkdir -p .specswarm/sessions
# Prune old sessions (keep last 20)
SESSION_COUNT=$(find .specswarm/sessions -name "*.json" -type f 2>/dev/null | wc -l)
if [ "$SESSION_COUNT" -gt 20 ]; then
find .specswarm/sessions -name "*.json" -type f -printf '%T@ %p\n' | \
sort -n | head -n $(( SESSION_COUNT - 20 )) | cut -d' ' -f2- | \
xargs rm -f 2>/dev/null
fi
SESSION_ID="fix-$(date +%Y%m%d-%H%M%S)"
cat > ".specswarm/sessions/${SESSION_ID}.json" << EOF
{
"type": "fix",
"session_id": "$SESSION_ID",
"bug_description": "$BUG_DESC",
"started_at": "$(date -Iseconds 2>/dev/null || date -u +"%Y-%m-%dT%H:%M:%S%z")",
"status": "running",
"regression_test": $REGRESSION_TEST,
"hotfix": $HOTFIX,
"max_retries": $MAX_RETRIES,
"current_retry": 0,
"background_mode": $BACKGROUND_MODE,
"notify_on_complete": $NOTIFY_ON_COMPLETE,
"coordinate_mode": $COORDINATE_MODE
}
EOF
# If background mode, show session info
if [ "$BACKGROUND_MODE" = true ]; then
echo ""
echo "🔄 Fix started in background mode"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Session ID: $SESSION_ID"
echo "Bug: $BUG_DESC"
echo ""
echo "Track progress with:"
echo " /ss:status $SESSION_ID"
echo ""
if [ "$NOTIFY_ON_COMPLETE" = true ]; then
echo "You will be notified when complete."
fi
echo ""
fi
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.
- 2d ago First seen · 745 lines · 18 tokens per session scan A 3afc76606e5e
fix is a command published in the GitHub repository MartyBonacci/specswarm (65 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 5,768 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-08-30.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.