Borrowing it
Nothing to install: this file belongs to optave/ops-codegraph-tool. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/optave/ops-codegraph-tool/main/.claude/skills/housekeep/SKILL.mdgit clone --depth 1 https://github.com/optave/ops-codegraph-toolWrote 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/optave/ops-codegraph-tool/housekeep)<a href="https://agentmods.dev/skills/optave/ops-codegraph-tool/housekeep"><img src="https://agentmods.dev/badge/skills/optave/ops-codegraph-tool/housekeep/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/optave/ops-codegraph-tool/housekeep"><img src="https://agentmods.dev/badge/skills/optave/ops-codegraph-tool/housekeep.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.00031 | $0.06805 |
| Opus 5.5 | $0.00012 | $0.02722 |
| Sonnet 5.5 | $0.00006 | $0.01361 |
| Haiku 4.5 | $0.00003 | $0.00681 |
Grade C, and why
housekeep scanned grade C with 1 finding 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 2mo 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
> **Critical: orphaned directories may still contain uncommitted work.** A worktree's git registration can be dropped (failed `git worktree add`, manual `git worktree prune`, etc.) while the user's source edits remain on How it starts
The opening of the file, as written. The whole thing — 450 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/housekeep — Local Repository Maintenance
Clean up the local repo: remove stale worktrees, delete dirt/temp files, sync with main, update codegraph to latest, prune merged branches, and verify repo health. The "spring cleaning" routine.
Arguments
$ARGUMENTSmay contain:--full— run all phases (default behavior)--dry-run— show what would be cleaned without actually doing it--skip-update— skip the codegraph npm update phase- No arguments — full cleanup
Phase 0 — Pre-flight
- Confirm we're in the codegraph repo root (check
package.jsonwith"name": "@optave/codegraph") - Parse
$ARGUMENTS:DRY_RUN=trueif--dry-runSKIP_UPDATE=trueif--skip-update
- Record current branch:
git branch --show-current - Record current git status:
git status --short - Warn the user if there are uncommitted changes — housekeeping works best from a clean state
Exit condition: repo identity confirmed (@optave/codegraph); DRY_RUN/SKIP_UPDATE are known; current branch and status recorded.
Phase 1 — Audit & Clean Worktrees
Always report disk usage first. Worktree bloat (per-worktree
node_modules/,target/,dist/) is the single largest source of disk waste in this repo — a fresh worktree withnpm install+ a Rust build is ~3GB. Even when no worktree is technically "stale" by branch criteria, the disk footprint must be surfaced so the user can decide what to keep.
1a. Total worktree disk usage
Always print this, even on --dry-run. Use du -sk (kilobytes) so the pipeline is portable across BSD (macOS) and GNU (Linux) — sort -h is a GNU coreutils extension and is rejected by stock macOS sort.
# 2>/dev/null suppress: .claude/worktrees/ may not exist yet on a fresh repo — zero worktrees, not an error
du -sh .claude/worktrees 2>/dev/null
# Portable per-worktree sort: kilobytes through sort -n, then format back to human-readable.
du -sk .claude/worktrees/*/ 2>/dev/null | sort -n | awk '{
k=$1; $1=""; sub(/^ /, "");
if (k >= 1048576) printf "%.1fG\t%s\n", k/1048576, $0;
else if (k >= 1024) printf "%.1fM\t%s\n", k/1024, $0;
else printf "%dK\t%s\n", k, $0;
}'
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.
- 2mo ago First seen · 450 lines · 31 tokens per session scan C 5a9a005f7bad
housekeep is a skill published in the GitHub repository optave/ops-codegraph-tool (99 stars, last pushed 5d ago), licensed Apache-2.0. It adds 31 tokens to every session and 6,805 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
review
The definitive code review, for any codebase. Five-phase workflow: git context detection (worktree, branch, base, changed files), Pharaoh recon (architecture map, module context, blast radius in one call, with a fallback when the repo isn't mapped), parallel specialized agent dispatch (code quality, security against…
repo-hygiene
Use when the scheduled repo-hygiene workflow runs from GitHub Actions (or an operator dry-run) to scan the repository for small, certain docs/test/code hygiene issues and fix them as one batched branch.
gh-skill
Manage agent skills with gh skill. Use this skill to discover, preview, install, update, and publish Agent Skills so an agent can self-manage the skills available in its environment.
cw-gates
Use before claiming any Codewhale change is done, green, or ready to land: the focused-to-broad verification ladder, the budget checks CI enforces, and the rules for what counts as a passing test.
atmos-hooks
Atmos hooks: lifecycle events, hook kinds, command/store/git/security hooks, step/steps hooks, when: conditions, scoping and overrides, toolchain integration, --skip-hooks, and Atmos Pro/local output.
conventional-commit
Conventional Commit - Generate Conventional Commits 1.0.0 compliant messages. MANDATORY for all git commits. Invoke when user says 'commit', 'commit this', or asks to commit code.