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/alphaaiservice/cortex/backup-drgit clone --depth 1 https://github.com/alphaaiservice/cortexWhat 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.00033 | $0.08795 |
| Opus 5 | $0.00016 | $0.04398 |
| Sonnet 5 | $0.00007 | $0.01759 |
| Haiku 4.5 | $0.00003 | $0.00880 |
Grade C, and why
backup-dr 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 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf "${BACKUP_PATH}" Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s http://localhost:8000/health How it starts
The opening of the file, as written. The whole thing — 967 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Backup & Disaster Recovery
Action: $ARGUMENTS (default: setup)
Parse $ARGUMENTS:
setup— Configure automated backups for all detected databasestest-restore— Run a restore verification against the latest backuprunbook— Generate a disaster recovery runbookstatus— Show current backup health and last restore test results- No argument =
setup
Step 0: Detect Data Stores
Before anything, discover what needs backing up.
echo "=== Project Root ==="
pwd
echo "=== Docker Compose Services ==="
cat docker-compose*.yml docker/docker-compose*.yml 2>/dev/null | grep -E "^\s+\w+:" | head -30
echo "=== MySQL/MariaDB ==="
grep -rn "mysql\|mariadb\|DATABASE_URL.*mysql" .env* docker-compose*.yml docker/docker-compose*.yml 2>/dev/null | head -10
echo "=== MongoDB ==="
grep -rn "mongodb\|MONGO_URI\|MONGO_URL" .env* docker-compose*.yml docker/docker-compose*.yml 2>/dev/null | head -10
echo "=== Redis ==="
grep -rn "redis://\|REDIS_URL\|REDIS_HOST" .env* docker-compose*.yml docker/docker-compose*.yml 2>/dev/null | head -10
echo "=== S3/MinIO ==="
grep -rn "minio\|S3_BUCKET\|AWS_S3\|STORAGE_BUCKET" .env* docker-compose*.yml docker/docker-compose*.yml 2>/dev/null | head -10
echo "=== Existing Backup Scripts ==="
find . -maxdepth 3 -name "*backup*" -o -name "*restore*" -o -name "*dump*" 2>/dev/null | grep -v node_modules | grep -v .git
echo "=== Cron Jobs ==="
crontab -l 2>/dev/null || echo "No crontab"
ls /etc/cron.d/*backup* 2>/dev/null || echo "No backup cron jobs"
Build a list of data stores to back up:
- MySQL/MariaDB →
mysqldump - MongoDB →
mongodump - Redis →
redis-cli BGSAVE+ copy RDB - S3/MinIO →
mc mirror(MinIO Client) - File uploads →
tarorrsync
Step 1: Create Backup Directory Structure
backup/
├── scripts/
│ ├── backup-all.sh # Master backup orchestrator
│ ├── backup-mysql.sh # MySQL/MariaDB backup
│ ├── backup-mongodb.sh # MongoDB backup
│ ├── backup-redis.sh # Redis RDB snapshot
│ ├── backup-files.sh # File/upload storage backup
│ ├── restore-mysql.sh # MySQL restore
│ ├── restore-mongodb.sh # MongoDB restore
│ ├── restore-redis.sh # Redis restore
│ ├── restore-files.sh # File restore
│ ├── verify-backup.sh # Verify backup integrity
│ └── cleanup-old-backups.sh # Retention policy enforcement
├── config/
│ ├── backup.env # Backup configuration (encrypted)
│ └── retention-policy.yml # Retention rules
├── logs/
│ └── .gitkeep
└── DR_RUNBOOK.md # Disaster recovery procedures
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 · 967 lines · 33 tokens per session scan C 4bbd72c41012
backup-dr is a command published in the GitHub repository alphaaiservice/cortex (1 stars, last pushed 26d ago), licensed MIT. It adds 33 tokens to every session and 8,795 once invoked, about $0.0002 per session on Opus 5. 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-31.
Other commands, from other repositories
_composicion
Protocolo interno compartido para la composición dinámica del equipo de Alfred según tarea, stack y señales runtime.
feature
Ciclo completo de desarrollo: producto, arquitectura, desarrollo, QA, docs, entrega.
ajustes
Configura Alfred Dev: autonomía, proyecto, Lucius, memoria y personalidad. Antes /alfred-dev:config.
discuss
Refina una idea o feature antes de abrir un flujo completo de implementación.
lucius
Segunda opinión técnica externa vía Codex CLI — diagnóstico y prescripción por ítem.
map-codebase
Analiza un repositorio existente y crea un mapa persistente del codebase.