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/completegit 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.00011 | $0.06335 |
| Opus 5 | $0.00005 | $0.03168 |
| Sonnet 5 | $0.00002 | $0.01267 |
| Haiku 4.5 | $0.00001 | $0.00634 |
Grade A, and why
complete 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 — 781 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
Complete feature or bugfix workflow by cleaning up, validating, committing, and merging to parent branch.
Purpose: Provide a clean, guided completion process for features and bugfixes developed with SpecSwarm workflows.
Scope: Handles cleanup → validation → commit → merge → branch deletion
NEW: Supports individual feature branches with auto-merge to parent branch (not just main)
Pre-Flight Checks
# Ensure we're in a git repository
if ! git rev-parse --git-dir > /dev/null 2>&1; then
echo "❌ Error: Not in a git repository"
echo ""
echo "This command must be run from within a git repository."
exit 1
fi
# Get repository root
REPO_ROOT=$(git rev-parse --show-toplevel)
cd "$REPO_ROOT"
Execution Steps
Step 1: Detect Workflow Context
echo "🎯 Feature Completion Workflow"
echo "══════════════════════════════════════════"
echo ""
# Detect current branch
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
# Extract feature/bug number from branch name
# Patterns: NNN-*, feature/NNN-*, bugfix/NNN-*, fix/NNN-*
FEATURE_NUM=$(echo "$CURRENT_BRANCH" | grep -oE '^[0-9]{3}' || \
echo "$CURRENT_BRANCH" | grep -oE '(feature|bugfix|fix)/([0-9]{3})' | grep -oE '[0-9]{3}' || \
echo "")
# If no number found, check user arguments
if [ -z "$FEATURE_NUM" ] && [ -n "$ARGUMENTS" ]; then
# Try to extract number from arguments
FEATURE_NUM=$(echo "$ARGUMENTS" | grep -oE '\b[0-9]{3}\b' | head -1)
fi
# If still no number, ask user
if [ -z "$FEATURE_NUM" ]; then
echo "⚠️ Could not detect feature/bug number from branch: $CURRENT_BRANCH"
echo ""
read -p "Enter feature or bug number (e.g., 915): " FEATURE_NUM
if [ -z "$FEATURE_NUM" ]; then
echo "❌ Error: Feature number required"
exit 1
fi
# Pad to 3 digits
FEATURE_NUM=$(printf "%03d" $FEATURE_NUM)
fi
# Source features location helper
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PLUGIN_DIR="$(dirname "$SCRIPT_DIR")"
source "$PLUGIN_DIR/lib/features-location.sh"
# Initialize features directory
get_features_dir "$REPO_ROOT"
# Determine workflow type from branch or directory
if echo "$CURRENT_BRANCH" | grep -qE '^(bugfix|bug|fix)/'; then
WORKFLOW_TYPE="bugfix"
elif echo "$CURRENT_BRANCH" | grep -qE '^(feature|feat)/'; then
WORKFLOW_TYPE="feature"
else
# Check if feature directory exists
if find_feature_dir "$FEATURE_NUM" "$REPO_ROOT" 2>/dev/null; then
WORKFLOW_TYPE="feature"
else
# Ask user
read -p "Is this a feature or bugfix? (feature/bugfix): " WORKFLOW_TYPE
fi
fi
# Find feature directory (re-find since condition above may not have set it)
find_feature_dir "$FEATURE_NUM" "$REPO_ROOT" 2>/dev/null
if [ -z "$FEATURE_DIR" ]; then
echo "⚠️ Warning: Feature directory not found for ${WORKFLOW_TYPE} ${FEATURE_NUM}"
echo ""
echo "Continuing without feature artifacts..."
FEATURE_DIR=""
STORED_PARENT_BRANCH=""
else
# Get feature title from spec
if [ -f "$FEATURE_DIR/spec.md" ]; then
FEATURE_TITLE=$(grep -m1 '^# Feature' "$FEATURE_DIR/spec.md" | sed 's/^# Feature [0-9]*: //' || echo "Feature $FEATURE_NUM")
# Extract parent branch from YAML frontmatter (v2.1.1+)
STORED_PARENT_BRANCH=$(grep -A 10 '^---$' "$FEATURE_DIR/spec.md" 2>/dev/null | grep '^parent_branch:' | sed 's/^parent_branch: *//' | tr -d '\r' || echo "")
else
FEATURE_TITLE="Feature $FEATURE_NUM"
STORED_PARENT_BRANCH=""
fi
fi
# Display detected context
echo "Detected: $(echo "$WORKFLOW_TYPE" | sed 's/\b\(.\)/\u\1/') $FEATURE_NUM"
if [ -n "$FEATURE_TITLE" ]; then
echo "Title: $FEATURE_TITLE"
fi
echo "Branch: $CURRENT_BRANCH"
if [ -n "$FEATURE_DIR" ]; then
echo "Directory: $FEATURE_DIR"
fi
echo ""
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 · 781 lines · 11 tokens per session scan A 1fb8e0b1c9b5
complete is a command published in the GitHub repository MartyBonacci/specswarm (65 stars, last pushed 1mo ago), licensed MIT. It adds 11 tokens to every session and 6,335 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
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.
constitution
Create or update the project constitution from interactive or provided principle inputs.
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.