用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/whoabuddy/claude-knowledge --skill claude-hygiene命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | claude-hygiene |
| description | Manage ~/.claude/ data - report, archive, extract learnings, clean up |
| allowed-tools | Bash, Read, Write, Glob, Grep |
Manage and maintain ~/.claude/ data: audit sizes, archive old sessions, extract learnings, and clean up low-value files.
/claude-hygiene # Show help
/claude-hygiene report # Audit current state
/claude-hygiene archive # Archive old sessions (dry-run)
/claude-hygiene extract # Find high-value sessions
/claude-hygiene clean # Show cleanup targets
Run all commands via Bun from the skill directory:
SKILL_DIR=~/dev/whoabuddy/claude-knowledge/claude-config/skills/claude-hygiene
Audit all .claude data with size breakdown, session age distribution, and reclaimable space estimates.
bun run $SKILL_DIR/src/hygiene.ts report
bun run $SKILL_DIR/src/hygiene.ts report --json
bun run $SKILL_DIR/src/hygiene.ts report --threshold 14
Compress old session JSONL files with gzip and move to ~/logs/archive/claude/sessions/{YYYY-MM}/.
bun run /src/hygiene.ts archive
bun run /src/hygiene.ts archive --no-dry-run
bun run /src/hygiene.ts archive --threshold 14
bun run /src/hygiene.ts archive --no-dry-run --delete-originals
Score sessions by heuristics and generate a review file for manual knowledge curation.
bun run $SKILL_DIR/src/hygiene.ts extract # Last 90 days, score >= 3
bun run $SKILL_DIR/src/hygiene.ts extract --days 30 # Last 30 days only
bun run $SKILL_DIR/src/hygiene.ts extract --project ~/dev/aibtcdev/x402-api
bun run $SKILL_DIR/src/hygiene.ts extract --threshold 5 # Only high-value sessions
Output goes to ~/logs/archive/claude/extractions/.
Delete low-value files. Always preview first with dry-run (default).
bun run $SKILL_DIR/src/hygiene.ts clean # Show all targets
bun run $SKILL_DIR/src/hygiene.ts clean --todos # Dry-run empty todos
bun run $SKILL_DIR/src/hygiene.ts clean --todos --no-dry-run # Actually delete
bun run $SKILL_DIR/src/hygiene.ts clean --debug --no-dry-run # Delete debug logs
bun run $SKILL_DIR/src/hygiene.ts clean --delete-archived --confirm --no-dry-run # Delete archived originals
When the user invokes /claude-hygiene, determine the intent:
Always show dry-run results first before performing destructive operations.
Processing state is tracked at ~/.claude/.hygiene/state.json to avoid re-processing sessions.
Archive manifest is at ~/logs/archive/claude/manifest.jsonl.