memory-gc
The memory-gc command inspects and manages append-only JSONL log files (audit.jsonl, patterns.jsonl, journal.jsonl) in the hunt-memory directory to prevent unbounded growth. Use it to report current file sizes, rotate files exceeding a configurable size cap (default 10 MB) while keeping numbered backups, or purge old rotated backups. Useful during active bug-hunting sessions where logs accumulate rapidly over months.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/elementalsouls/Claude-BugHunter/HEAD/commands/memory-gc.md -o ~/.claude/commands/memory-gc.mdmemory-gc.md
# /memory-gc Garbage-collect the autopilot ledger (`~/.claude/bughunter/memory/`). Reports current sizes, rotates oversized files past a configurable cap, or purges old backups. ## Usage ``` /memory-gc # report only /memory-gc --rotate # rotate files above 10 MB (default cap) /memory-gc --rotate --max-mb 5 # custom cap /memory-gc --purge-backups # delete all .1/.2/.3 backups /memory-gc --dir <path> # scan a non-default ledger dir ``` ## Implementation The agent shells out to, from the repo root: ```bash python3 engine/memory.py --gc [--rotate] [--purge-backups] [--dir PATH] [--max-mb N] ``` ## Defaults - **Rotation cap:** 10 MB per file · **Backups kept:** 3 (`<file>.1` newest → `<file>.3` oldest) - **Scope:** every `*.jsonl` under the ledger dir (`findings.jsonl`, `negatives.jsonl`) Rotation also fires automatically on append inside the ledger writer, so files stay bounded without any session-end hook.
Run autonomous hunt loop on a target — scope check → recon → rank surface → hunt → validate → report with configurable checkpoints. Usage: /autopilot target.com [--paranoid|--normal|--yolo]
Build an exploit chain — given bug A, finds B and C to combine for higher severity and payout. Knows common chain patterns: IDOR→ATO, SSRF→cloud metadata, XSS→ATO, open redirect→OAuth theft, S3→bundle→secret→OAuth. Usage: /chain
Active vulnerability hunting. Two-track dispatcher — asks Red Team vs WAPT, hands off to hunt-dispatch skill and sibling commands. Usage: /hunt target.com | /hunt *.target.com | /hunt targets.txt [--vuln-class X] [--source-code P] [--chrome]
On-demand intelligence fetch for a target — CVEs, disclosed reports, new features. Pulls NVD/GitHub-Advisory CVEs + bundled disclosed reports + hunt memory context. Usage: /intel target.com
Pick up a previous hunt on a target — shows hunt history and untested surface from the autopilot ledger. Usage: /pickup target.com
Run full recon pipeline on a target — subdomain enum (Chaos API + subfinder), live host discovery (dnsx + httpx), URL crawl (katana + waybackurls + gau), gf pattern classification, nuclei scan. Outputs to recon/<target>/ directory. Usage: /recon target.com
Optional manual note on a target or the last confirmed finding. Capture is automatic during autopilot; this is for extra context. Usage: /remember
Write a submission-ready bug bounty report. Generates H1/Bugcrowd/Intigriti/Immunefi format with CVSS 3.1 score, proof of concept, impact statement, and remediation. Run /validate first. Usage: /report