Borrowing it
Nothing to install: this file belongs to swarm-ai-research/swarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/swarm-ai-research/swarm/main/.claude/commands/stage.mdgit clone --depth 1 https://github.com/swarm-ai-research/swarmWrote 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.
[](https://agentmods.dev/commands/swarm-ai-research/swarm/stage)<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/stage"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/stage.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00884 |
| Opus 5 | $0.00000 | $0.00442 |
| Sonnet 5 | $0.00000 | $0.00177 |
| Haiku 4.5 | $0.00000 | $0.00088 |
Grade A, and why
stage 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 7d 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 — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/stage
Smart git staging with pre-flight validation. Prevents the add-verify-reset-readd cycle.
Usage
/stage <files...> or /stage --all or /stage --interactive
Examples:
/stage .claude/commands/status.md .claude/commands/stage.md/stage swarm/core/proxy.py tests/test_proxy.py/stage --all(stage all modified + untracked, with safety checks)
Behavior
Step 1: Pre-validate files
Before running git add, check each file for problems:
a) Gitignore check: run git check-ignore <file> for each file. If any are ignored, warn and skip them:
SKIPPED (gitignored): swarm/bridges/__init__.py
b) Secrets scan: run the secret patterns from .claude/hooks/pre-commit on each file's diff. If any match, warn and skip:
BLOCKED (potential secret): config/api_keys.yaml
c) Large file check: warn if any file is >1MB (likely binary/artifact):
WARNING (large file, 2.3MB): data/model_weights.bin
d) Runtime artifact check: warn if file matches common artifact patterns (*.db, *.log, .DS_Store, __pycache__/, node_modules/):
WARNING (runtime artifact): sqlite_mcp_server.db
Step 2: Clear stale staging
Check if there are already-staged files from a prior attempt. If so, report them:
Previously staged (from prior attempt):
.claude/commands/pr.md
.claude/commands/sync.md
Options:
- Keep: add new files on top of existing staging
- Reset: clear staging and start fresh with only the requested files
Default to Keep unless the user says otherwise.
Step 3: Stage validated files
Run git add only on files that passed validation.
Step 4: Report
Print a summary of what happened:
Staging Summary
────────────────────────────────
Staged: 4 files (+128 / -23)
.claude/commands/status.md (new)
.claude/commands/stage.md (new)
.claude/hooks/post_write_check.sh (new)
.claude/settings.json (modified)
Skipped: 1 file
swarm/bridges/__init__.py (gitignored)
Warnings: 0
────────────────────────────────
Ready for: /preflight → commit
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.
- 7d ago First seen · 110 lines · 0 tokens per session scan A 33210aec6c99
stage is a command published in the GitHub repository swarm-ai-research/swarm (41 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 884 tokens. 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
eval-merge
Use the Read tool to load .skill-compass/{skill-name}/manifest.json. Verify.
speckit.git.feature
Create a feature branch with sequential or timestamp numbering.
speckit.git.commit
Auto-commit changes after a Spec Kit command completes.
speckit.git.validate
Validate current branch follows feature branch naming conventions.
speckit.git.initialize
Initialize a Git repository with an initial commit.
speckit.git.remote
Detect Git remote URL for GitHub integration.