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/deploy_demo.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/deploy_demo)<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/deploy_demo"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/deploy_demo/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/deploy_demo"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/deploy_demo.svg" alt="Reviewed on agentmods" width="80" 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.02185 |
| Opus 5 | $0.00000 | $0.01092 |
| Sonnet 5 | $0.00000 | $0.00437 |
| Haiku 4.5 | $0.00000 | $0.00218 |
Grade C, and why
deploy_demo scanned grade C with 2 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 9d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
find "$STAGE" -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s -o /dev/null -w "%{http_code}" https://Swarm-AI-Research-swarm-sandbox.hf.space/_stcore/health 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.
/deploy_demo
Deploy (or update) the Streamlit interactive demo to Hugging Face Spaces.
Usage
/deploy_demo — full rebuild and push
/deploy_demo --check — just check if the Space is running and on the latest code
Context
The demo app lives at examples/demo/ in the main repo but the HF Space at Swarm-AI-Research/swarm-sandbox uses a flat layout (/app/ root). This command handles the path rewriting that breaks every time you push manually.
Space URL: https://Swarm-AI-Research-swarm-sandbox.hf.space Space repo: https://huggingface.co/spaces/Swarm-AI-Research/swarm-sandbox
Behavior
--check mode
-
Check health endpoint:
curl -s -o /dev/null -w "%{http_code}" https://Swarm-AI-Research-swarm-sandbox.hf.space/_stcore/health -
Check runtime status and deployed SHA:
curl -s -H "Authorization: Bearer $(cat ~/.cache/huggingface/token)" \ "https://huggingface.co/api/spaces/Swarm-AI-Research/swarm-sandbox/runtime" -
Report: stage (RUNNING/BUILDING/ERROR), deployed SHA, health status.
Full deploy (default)
Step 1: Prepare staging directory
STAGE=$(mktemp -d)
Copy the required files from the main repo:
cp examples/demo/app.py "$STAGE/app.py"
cp -r examples/demo/pages "$STAGE/pages"
cp -r examples/demo/utils "$STAGE/utils"
cp -r swarm "$STAGE/swarm"
cp -r scenarios "$STAGE/scenarios"
cp pyproject.toml "$STAGE/pyproject.toml"
mkdir -p "$STAGE/.streamlit"
cp .streamlit/config.toml "$STAGE/.streamlit/config.toml"
Clean pycache:
find "$STAGE" -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null
find "$STAGE" -name "*.pyc" -delete 2>/dev/null
Step 2: Rewrite paths for flat layout
The main repo has examples/demo/app.py (3 levels deep) but the Space has app.py at root. Fix PROJECT_ROOT in all files:
app.py: Path(__file__).resolve().parent (1 parent — app.py is at Space root)
utils/simulation.py: Path(__file__).resolve().parent.parent (2 parents — utils/ is one level down)
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.
- 9d ago First seen · 217 lines · 0 tokens per session scan C 95e579bec8c8
deploy_demo is a command published in the GitHub repository swarm-ai-research/swarm (42 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,185 tokens. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
deploy
Deploy a frontend (React, Next.js, or static HTML) to a live URL on Butterbase.
migration
Generate Prisma database migration.
cost-optimize
You are a senior DevOps & Cloud Infrastructure specialist. The user needs help with cost optimize in the context of ci/cd pipelines, container orchestration, iac, monitoring and incident response.
terraform-scaffold
You are a senior DevOps & Cloud Infrastructure specialist. The user needs help with terraform scaffold in the context of ci/cd pipelines, container orchestration, iac, monitoring and incident response.
setup
Set up terraform-ls LSP integration and install all Terraform tools required by the hooks in this project.
checklist
Generate a custom checklist for the current feature based on user requirements.