Audit
Read-only, audit-only scan of one directory tree for orphaned, temp, stale-lock, and empty leftovers as an evidence snapshot; removes nothing. Use when…
от melodic-software★ 34 звезды на GitHub
Установить Audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Disk hygiene audit
Arguments. [--max-depth <N>] [--sizes-only] [--policy <file>] <target-directory>. Full form: [--max-depth <N>] [--sizes-only] [--quiet] [--policy <file>] [--root-children [--root-child <name>]...] <target-directory>
Scan one directory tree and report what the snapshot shows. This skill runs the engine's scan
subcommand and nothing else, and it changes nothing in the target. A filename pattern is a
discovery hint, never proof that an entry is junk.
This skill carries no hooks of its own. Safety rests on the plugin-level engine-gate in
hooks/hooks.json, which checks every Bash or PowerShell call that names hygiene.py. Run
hygiene.py only through the Bash tool; the gate denies an engine call made through the PowerShell
tool. Run no engine subcommand other than scan, no shell command that writes, moves, or deletes
under the target, and no compound shell around an engine call. A subagent follows that contract
itself, from the worker brief in step 2.
1. Bootstrap
Run the argument-free probe first, before any engine call:
"<hook-python>" "${CLAUDE_PLUGIN_ROOT}/skills/setup/scripts/kill_switch_probe.py"
Take hook_python and data_root from its one-line JSON. Every engine call needs the absolute
<hook-python> and --data-root; a bare python3 is rejected. When hook_python is not yet
known, submit the probe once with bare python. The probe reports hook_python as the interpreter
it ran under, so that value is the guard's only if the guard's own interpreter ran it. The scan is
admitted only under the guard's interpreter: if it is denied for that reason, the denial names the
interpreter and ran nothing, so rerun the scan with the interpreter it names.
data_rootisnull: the install layout proved no data root and the guard denies every engine call. Report the audit as not run, submit no engine call, and stop.- The probe call is denied or left waiting for a person: report the audit as not run and stop. Do not scan without it.
- The guard's interpreter is older than
MIN_PYTHONinhygiene.py: stop with that declared prerequisite. An olderhook_pythonfrom a bare-pythonprobe is not that finding; the scan's admission settles it. effectiveisfalse(audit-only): the scan still runs. State the configured value, and leave out the removal handoff in step 4. Ondegraded: true, say the configured value could not be read.
2. Scan
Pick a unique run directory under <data_root>/runs/; the snapshot lives there, never in the
target. With no target, ask the person who invoked you once. Reject an OS-managed root, a missing
directory, a symlink, or a Windows reparse point.
"<hook-python>" "${CLAUDE_PLUGIN_ROOT}/skills/clean/scripts/hygiene.py" scan \
--target "<target>" --output "<run-dir>/snapshot.json" \
--data-root "<data_root>" [--project-dir "<project-dir>"] \
[--policy "<policy.json>"] [--user-policy "<policy_file>"] \
[--max-depth <N>] [--sizes-only] [--quiet] \
[--root-children [--root-child <name>]...]
--project-dir is optional; pass it, as a literal absolute path, when the consumer project has
standing policy files. --user-policy takes the policy_file option's value,
${user_config.policy_file}, only when it reads as a path. Pass literal values only: the guard rejects shell expansion, so never pass
an environment-variable reference. What each flag does, including the large-target and volume-root rules, is in
scan-flags.md. For a home directory or another large target,
start with --max-depth 1, then scan the subtrees the evidence justifies. Never pass
--confirmed-large-scan on your own: an unbounded walk needs a person's answer.
For a subtree worker, the brief to paste into the spawn prompt is
fan-out-worker-brief.md. Before spawning, replace every
${...} token and <placeholder> in it with the literal absolute value you hold from the probe
(hook_python, data_root) or from step 2: a worker cannot expand ${...} tokens, and its data
root is the probe's data_root. A worker returns scan evidence only.
3. Read and report the snapshot
Report from the snapshot and the scan's stdout, and nothing the run did not observe.
- Lead with
children_rollup.walked: truerows carry exact totals;walked: falserows carrynullaggregates andunwalked_reasons, so report them as coverage gaps, never as small or clean. - Rank on
reclaimable_local_bytes, notlogical_bytes. An entry whosesize_qualifiersis non-empty stays out of any reclaimable total; state its bytes and reasons separately. - Report
truncated_paths(a count under--quiet, the list in the snapshot) and every scan error as coverage gaps. Alarge-target-confirmation-requiredorroot-children-selection-requiredstatus names the next step, not a failure. - Quote hint coverage as a rate
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Audit?
Read-only, audit-only scan of one directory tree for orphaned, temp, stale-lock, and empty leftovers as an evidence snapshot; removes nothing. Use when: 'delegate a disk-hygiene audit', 'subagent scan for leftovers', 'disk-hygiene audit report'. Not for cleanup: /disk-hygiene:clean, repo caches: /repo-hygiene:clean, or OS-managed roots.
Как установить скилл Audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Audit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…