Genie
БесплатноЗапускает вложенные скриптыНе проверенSafely audits and reclaims VPS/Linux disk space, investigates root-filesystem growth, and enforces backup retention when disk usage is high or maintenance is…
от indigokarasu391 установка в других каталогахОб этом скилле
Genie — VPS Disk Cleanup
Safely reclaims disk space on Linux VPS and workstations by deleting or compressing stale state snapshots, logs, cron output, temp files, and package caches. Also owns /root disk-spike investigation, duplicate repo detection, and backup-retention audits formerly covered by util-vps-cleanup. Does not touch live databases, auth files, or active sessions.
When to Use
- VPS disk usage is high (above 50%)
- User asks to "clean up disk space" or "check disk usage"
- User asks why disk usage grew or where space went
/rootneeds a safe audit/classification pass- Backup directories, snapshots, or
.bak-*files may violate retention - Weekly maintenance cron fires
- Before/after large operations (backups, migrations)
When NOT to Use
- Database maintenance tasks (genie does not manage databases)
- Real-time monitoring or alerting
- Log rotation configuration (genie handles specific files, not system-wide logrotate)
Prerequisites
No external dependencies — uses only Python 3.11+ stdlib.
Configuration lives in config.yaml under skills.config.genie.* (see Configuration below). Behavioral settings are never read from environment variables.
How to Run
# Assess disk usage and identify cleanup targets
python3 <hermes-home>/profiles/indigo/skills/ocas-genie/scripts/genie.py --assess
# Execute cleanup (Tier 1 + Tier 2)
python3 <hermes-home>/profiles/indigo/skills/ocas-genie/scripts/genie.py --clean
# Dry run — preview without deleting
python3 <hermes-home>/profiles/indigo/skills/ocas-genie/scripts/genie.py --clean --dry-run
# Map filesystem and generate FILESYSTEM.md manifest
python3 <hermes-home>/profiles/indigo/skills/ocas-genie/scripts/genie.py --discover
For large file counts (>2,000), run in background: terminal(background=True, notify_on_complete=True).
Quick Reference
| Flag | Action |
|---|---|
--assess |
Report disk usage and cleanup targets |
--clean |
Execute Tier 1 + Tier 2 cleanup |
--clean --tier 1 |
Only Tier 1 (zero risk) |
--dry-run |
Preview without modifying anything |
--discover |
Map filesystem, create/update FILESYSTEM.md |
--analyze |
Tier 3 analysis only (read-only) |
--json |
Output as JSON |
Backup Retention Rule
The VPS should keep only one historical backup at a time, plus current live data. Genie owns detecting and reporting violations.
Historical backup candidates include:
<fs-root>/backup/*<fs-root>/backups/*<hermes-home>/profiles/<profile>/state-snapshots/*(profile-scoped — the bare<hermes-home>/state-snapshotsis a different, usually-empty path)<hermes-home>/migrations/*/backups/*- profile DB
.bak-*files under<hermes-home>/profiles/*/commons/db/
Default behavior:
- local full
state.dbbackup copies are invalid unless explicitly requested - keep the newest valid historical backup
- mark older or invalid historical backups as reclaimable
- do not create an additional local historical backup unless replacing the retained one
- after a replacement backup is verified, remove the superseded backup
- report path, size, timestamp, and reclaimed/expected space
For the full audit workflow, see references/root-audit-and-backup-retention.md.
Procedure
Use this checklist so destructive cleanup is preceded by assessment and followed by independent verification:
- Locate the live script and confirm the intended Hermes home/profile paths.
- Run
--assess(or--clean --dry-run) and capture the report before changing files. - Review retention candidates and confirm the newest snapshot/backup is protected.
- Run the smallest authorized cleanup tier.
- Verify
df, snapshot survival, and relevant database integrity after cleanup.
The sequence matters because an aggregate cleanup total cannot prove which backup survived, and a nearly-full disk can make a later verification command fail.
Locate the script — check these paths in order:
<hermes-home>/profiles/indigo/skills/ocas-genie/scripts/genie.py(profile — noteocas-prefix)<hermes-home>/profiles/indigo/scripts/genie.py(profile scripts dir — alternate location)<hermes-home>/skills/ocas-genie/scripts/genie.py(skill-bundled)- Use absolute paths only — never
~in cron context - Gotcha: the skill folder is
ocas-genie/, notgenie/. A literal read of the old path will fail with ENOENT.
Assess — run
--assessto identify targetsExecute — run
--clean(or--clean --dry-runto preview)Report & verify —
df -h /after cleanup, then MANDATORY post-clean checks: confirm thestate-snapshots/dir still holds the most-recent snapshot (do NOT trust a0.0 B snapshotsline as proof), and runPRAGMA integrity_checkon live DBs the user cares about (e.g.styx.db,transactions.db). See Verification. Note genie logs no per-file manifest, so capture pre-clean dir listings if an audit trail is n
Установить Genie в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Genie?
Safely audits and reclaims VPS/Linux disk space, investigates root-filesystem growth, and enforces backup retention when disk usage is high or maintenance is requested; use keywords disk cleanup, disk full, disk usage, snapshots, backups, stale repos, or disk spike. NOT for database maintenance beyond read-only analysis, logrotate configuration, or real-time monitoring.
Как установить скилл Genie?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Genie запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic