Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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…

indigokarasuот 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
  • /root needs 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-snapshots is a different, usually-empty path)
  • <hermes-home>/migrations/*/backups/*
  • profile DB .bak-* files under <hermes-home>/profiles/*/commons/db/

Default behavior:

  1. local full state.db backup copies are invalid unless explicitly requested
  2. keep the newest valid historical backup
  3. mark older or invalid historical backups as reclaimable
  4. do not create an additional local historical backup unless replacing the retained one
  5. after a replacement backup is verified, remove the superseded backup
  6. 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.

  1. Locate the script — check these paths in order:

    • <hermes-home>/profiles/indigo/skills/ocas-genie/scripts/genie.py (profile — note ocas- 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/, not genie/. A literal read of the old path will fail with ENOENT.
  2. Assess — run --assess to identify targets

  3. Execute — run --clean (or --clean --dry-run to preview)

  4. Report & verify — df -h / after cleanup, then MANDATORY post-clean checks: confirm the state-snapshots/ dir still holds the most-recent snapshot (do NOT trust a 0.0 B snapshots line as proof), and run PRAGMA integrity_check on 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

Полный SKILL.md на ClawHub

Установить 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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить Genie с