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 skills add xg-gh-25/SwarmAI --skill s_workspace-backupgit clone --depth 1 https://github.com/xg-gh-25/SwarmAIWrote 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/skills/xg-gh-25/swarmai/s_workspace-backup)<a href="https://agentmods.dev/skills/xg-gh-25/swarmai/s_workspace-backup"><img src="https://agentmods.dev/badge/skills/xg-gh-25/swarmai/s_workspace-backup/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/skills/xg-gh-25/swarmai/s_workspace-backup"><img src="https://agentmods.dev/badge/skills/xg-gh-25/swarmai/s_workspace-backup.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.00030 | $0.00741 |
| Opus 5 | $0.00015 | $0.00370 |
| Sonnet 5 | $0.00006 | $0.00148 |
| Haiku 4.5 | $0.00003 | $0.00074 |
Grade D, and why
workspace-backup scanned grade D with 3 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 8d 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.
Asks for rootmediumPrivilege escalation
A mod that escalates privileges can change anything on the machine, not only the project.
- **Linux/Hive**: `~/.swarm-ai/.backup-token` (chmod 600) Downloads and executes remote codehighSupply chain
curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.
curl -s "http://localhost:$(cat ~/.swarm-ai/backend.json | python3 -c 'import sys,json;print(json.load(sys.stdin)["port"])')/api/system/backup/status" | python3 -m json.tool Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s "http://localhost:$(cat ~/.swarm-ai/backend.json | python3 -c 'import sys,json;print(json.load(sys.stdin)["port"])')/api/system/backup/status" | python3 -m json.tool How it starts
The opening of the file, as written. The whole thing — 81 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Workspace Backup & Restore
Manage workspace backups to a private GitHub repository. Your memory, knowledge, projects, config, and conversation history are backed up daily and can be restored on a new machine.
TRIGGER: "backup workspace", "backup now", "restore workspace", "backup status", "configure backup", "when was last backup", "备份", "恢复workspace". DO NOT USE: for git operations on the swarmai codebase (use workspace-git), for file search (use workspace-finder), or for project CRUD (use ddd-manager).
Commands
Check Status
curl -s "http://localhost:$(cat ~/.swarm-ai/backend.json | python3 -c 'import sys,json;print(json.load(sys.stdin)["port"])')/api/system/backup/status" | python3 -m json.tool
Shows: last_backup timestamp, repo_url, schedule, enabled.
Run Backup Now
curl -s -X POST "http://localhost:$(cat ~/.swarm-ai/backend.json | python3 -c 'import sys,json;print(json.load(sys.stdin)["port"])')/api/system/backup" | python3 -m json.tool
Exports DB tables, copies config, commits and pushes to GitHub.
Configure Backup
curl -s -X PUT "http://localhost:$(cat ~/.swarm-ai/backend.json | python3 -c 'import sys,json;print(json.load(sys.stdin)["port"])')/api/system/backup/config" \
-H "Content-Type: application/json" \
-d '{"repo_url": "https://github.com/USER/REPO.git", "token": "ghp_..."}' | python3 -m json.tool
Alternative: Direct Python
When the API isn't available (e.g., daemon not running), use Python directly:
import asyncio
from core.backup_manager import BackupManager
# Backup
result = asyncio.run(BackupManager().backup())
print(result)
# Status
print(BackupManager().get_status())
# Restore (on a fresh machine)
async def restore():
mgr = BackupManager()
async for event in mgr.restore(repo_url="https://github.com/USER/REPO.git"):
print(event)
asyncio.run(restore())
What Gets Backed Up
| Layer | Content | Size |
|---|---|---|
| L1 (git) | .context/, Knowledge/, Projects/, config | ~240MB |
| L2 (DB dump) | messages, sessions, todos, token_usage, etc. | ~8MB gz |
| L3 (skip) | embeddings, FTS, knowledge_chunks | Rebuilt on restore |
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.
- 8d ago First seen · 81 lines · 30 tokens per session scan D 68fbb9d7ecc3
workspace-backup is a skill published in the GitHub repository xg-gh-25/SwarmAI (44 stars, last pushed 4d ago), licensed MIT. It adds 30 tokens to every session and 741 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
retrospect
Run a structured retrospective on a shipped commit range, release, deployment, PR, commit, or session. Per-fix validation enforcement, active evidence-sourcing pass (autonomous lookups + targeted user-asks for anything that could become objective), simpler-alternative discipline, re-diagnosis, action verdicts, and a…
land-and-deploy
Land and deploy workflow. (gstack).
agent-github-modes
Agent skill for github-modes - invoke with $agent-github-modes.
github-automation
GitHub workflow automation, PR management, issue tracking, and code review coordination. Integrates with GitHub Actions and repository management. Use when: PR creation, code review, issue management, release automation, workflow setup. Skip when: local-only changes, non-GitHub repositories.
changelog-scan
Scan merged PRs and commits since a given reference, extract titles, labels, types, and signals. Produces structured input for release notes drafting.
draft-release-notes
Turn changelog-scan output into polished, categorized release notes draft. Propose only.