freeing-disk-space
Finds what fills a developer machine's disk and frees space by clearing caches, build outputs, and other regenerable files, running each deletion only after approval and never emptying the Trash. Use when the user says "free up disk space", or when a disk is full or nearly full, the user is running out of disk space, builds or containers fail for lack of space, or the user asks for a disk cleanup plan, to free a target amount of space, or to clean up, reclaim space, or delete caches, build outputs, or the Trash to make room.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- freeing-disk-space
- description
- Finds what fills a developer machine's disk and frees space by clearing caches, build outputs, and other regenerable files, running each deletion only after approval and never emptying the Trash. Use when the user says "free up disk space", or when a disk is full or nearly full, the user is running out of disk space, builds or containers fail for lack of space, or the user asks for a disk cleanup plan, to free a target amount of space, or to clean up, reclaim space, or delete caches, build outputs, or the Trash to make room.
02 资源文件 4
- 参考文档agents/openai.yaml280 B
- 参考文档references/cache-locations.md5.1 KB
- 脚本scripts/list-pinned-versions.sh3.2 KB
- 脚本scripts/measure-caches.sh8.9 KB
03 SKILL.md 正文
Freeing disk space
Find where the space went, then remove only what a tool can recreate.
Rules
- Approval first. Show the exact command and what it removes. Run nothing that deletes until the user approves that command.
- The owning tool cleans its own files. Prefer
brew cleanup,docker builder prune, orxcrun simctl delete unavailableoverrm. - Never propose user data. Documents, photos, mail, device backups, source trees with uncommitted or unpushed work, container volumes, VM disks, and databases are reported with their size and left to the user.
- Never empty the Trash. Report its size and tell the user to empty it.
- Keep pinned toolchain versions. Before removing a toolchain version, run
scripts/list-pinned-versions.sh <workspace>on each directory that holds the user's projects, and keep every version it prints. Exit 64 means the path is not a directory, and exit 69 means a required tool is missing: report its error. - Stop at the target. The user's number, otherwise the target
scripts/measure-caches.shprints. Stop once it is met and say which approved rows you skipped.
Find where the space went
- Run
scripts/measure-caches.shin the background;ducan take minutes. - It prints the volume line, with its target, then one row per known location.
- Take each row's class, recreated-by, command, and close-first as printed,
filling any
<placeholder>; report keep rows, never propose them. - On exit 1 or 69, report the error and measure with
df -handdu -xby hand. Exit 64 means an argument was given; run it with none.
Then descend with du -x from the home directory into trees the script did
not list, and check cache locations for each
toolchain present. Classify those yourself: a path does not say whether it
holds user data.
Compare what you found with the used space. When much is unexplained, size
the volume root, /private/var (or /var), other users' homes, and local
Time Machine snapshots (tmutil listlocalsnapshots /). Never present a plan
covering a small share of used space without saying where the rest is.
When less than 5 GB is free and work is blocked, skip the survey: propose the
script's regenerates rows without a <placeholder> as one batch for a single
approval, then survey if the target is still unmet.
Plan and run
Classify each candidate as regenerates (the tool refills it on demand), rebuildable (costs a rebuild or re-download), or keep (user data, state no tool recreates, or held open by a running process). Only regenerates and rebuildable candidates enter the plan.
Present one table, largest first, and stop for approval:
| Path | Size | Class | Recreated by | Command |
|---|
Mark rows that need something closed first and show the sum against the target.
Run approved commands one at a time, re-measuring with df after each. A
command that freed far less than its row's size usually left the space in a VM
disk or a snapshot; say which. Report free space before and after, and the
largest remaining keep items.
04 同仓库更多 Skills
writing-system-prompts
Writes and reviews system prompts for AI tools, agents, chatbots, and LLM products using a fixed section order and a quality checklist. Use when the user says "write a system prompt", or when drafting a system prompt or auditing one for missing stop criteria, tool rules, constraints, or examples. Not for compressing an existing prompt; use improving-prompts.
writing-prose
Writes and edits prose for people in a plain, conversational, short house style with no em dashes. Use when the user says "write this up", or when drafting or revising documentation, READMEs, explanations, blog posts, or other human-facing prose. Not for prompts written for agents; use writing-system-prompts or composing-agent-prompts.
writing-acceptance-criteria
Writes or rewrites acceptance criteria until each is provable: one observable outcome with a named check that can fail. Use when the user says "write acceptance criteria", or asks to write, rewrite, or tighten acceptance criteria or a definition of done. Not for proving work meets them; use proving-claims.
summarizing-shipped-work
Summarizes the user's merged GitHub PRs for a timeframe into a grouped, linked shipped-work report with highlights, and offers to update a brag document. Use when the user says "what shipped?", or when asked what the user shipped (this week, last month, a quarter, since a date), for a status update, or to update a brag doc.
running-retros
Mines a session transcript, past agent sessions, or named sources such as PR review comments for durable learnings, then proposes approval-gated edits to skills, AGENTS.md, or docs and tracker issues. Use when the user says "retro", or when the user explicitly asks for a retrospective. Never infer from session end or friction.
learning-from-mistakes
Codifies the latest correction or mistake in the conversation as a short imperative rule in the project or global CLAUDE.md or AGENTS.md, after the user approves it. Use when the user says "learn from this mistake", or when the user asks to learn from a mistake, remember a lesson for next time, add a rule to CLAUDE.md, or not repeat a behavior. Not for a whole session; use running-retros.