audit-skill-hygiene
Use to produce a content-safe, reproducible measurement-only audit of cataloged skill usage from Claude Code and Codex. Emits an aggregate decision matrix; it never changes catalogs or recommends direct archival. Triggers: "audit skill usage", "which skills are actually used", "is our skill catalog bloated".
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- audit-skill-hygiene
- metadata
- { "owner": "tze", "status": "active", "authors": [ "tze", "Claude Fable 5", "OpenAI Codex" ], "last_reviewed": "2026-08-14" }
- description
- Use to produce a content-safe, reproducible measurement-only audit of cataloged skill usage from Claude Code and Codex. Emits an aggregate decision matrix; it never changes catalogs or recommends direct archival. Triggers: "audit skill usage", "which skills are actually used", "is our skill catalog bloated".
- compatibility
- Requires uv (Python 3.9+), git, and the canonical ai-bootstrap repository; reads configured Claude and Codex transcript sources without modifying them.
02 资源文件 4
- 脚本scripts/skill_usage_audit.py57.2 KB
- 其他tests/fixtures/claude-events.jsonl1.4 KB
- 其他tests/fixtures/codex-events.jsonl1.2 KB
- 脚本tests/test_skill_usage_audit.py43.2 KB
03 SKILL.md 正文
Audit Skill Hygiene
Every cataloged skill adds recurring frontmatter context. This subskill measures usage conservatively so an owner can make a later, reversible catalog decision with evidence. It is measurement-only: it does not exclude, relink, mirror, archive, bootstrap, or otherwise alter any skill surface.
Reproducible workflow
-
Choose a fixed UTC observation point and run
scripts/skill_usage_audit.pyfrom the canonical repository:uv run skills/personal/th-tooling/subskills/audit-skill-hygiene/scripts/skill_usage_audit.py \ --repo-root . \ --as-of 2026-08-14T00:00:00ZThe primary window is 90 days, with a 30-day sensitivity window. Override either only when the report records the fixed
--as-ofvalue alongside it. Add--jsononly when a machine-readable aggregate matrix is needed. -
The audit invokes the linker's read-only catalog-manifest mode. That mode reuses the installer's exclusions, prune list, shallowest-path selection, lexical tiebreaker, ownership detection, and managed-surface definitions; it creates no tool-home entries. Manifest sources are repository-relative and identify repository versus submodule ownership. The canonical surface is
skills/; the managed mirror surfaces are.claude/skills,.codex/skills,.gemini/skills, and.gemini/antigravity/skills. -
Read the 13-row decision matrix as an evidence ledger, not an execution plan. It records aggregate Claude/Codex counts for both windows, coverage, catalog token cost, freshness, ownership, trigger and overlap rationale, and a conservative disposition.
What counts as usage
- Claude Skill: an
assistantrecord whose assistant message contains atool_useblock namedSkillwith a stringinput.skill. - Claude slash: a
userrecord whose user-message string has the complete command-message, command-name, and optional command-args event shape. - Codex: a
response_itemwhosefunction_callpayload is theread_filefunction and whose JSONarguments.pathis aSKILL.mdpath.
Raw catalog mentions, prose tags, command arguments, and unrelated record values never count.
Transcript records are streamed only to aggregate counters. Reports retain no transcript body, identifier, filename, project label, or absolute path. The report exposes source availability and coverage counts so a zero is never mistaken for complete retention history.
Interpretation rules
- Incomplete history makes zero-use rows
insufficient-evidence. - Newly added and unknown-age skills remain protected (
retain). - With complete coverage and established age: three or more uses is
retain, one or two ismarginal-review, and zero iscandidate-follow-uponly. using-superpowersremainsmeasurement-limited: native catalog injection can satisfy its session-start role without a readable call.dispatching-parallel-agentsandsubagent-driven-developmentretain their separate contracts: independent parallel dispatch versus plan execution and review checkpoints.
Hard stops
- Do not treat any disposition as authorization for a catalog change.
- Do not inspect or quote raw transcript content to override a result.
- Any exclusion, deduplication, relink, mirror, submodule, or tool-home change is a separate reversible follow-up with its own relink verification.
- This audit has no catalog rollout to roll back. A later owner-approved catalog change must define its rollback and verify the canonical surface and every managed mirror before and after the change.
04 同仓库更多 Skills
user-run
Use when a step needs privileges this session lacks (docker, sudo, another user's checkout or secrets, host access) and the owner must run it as tze. Writes a reviewable /home/orca/.tmp/<slug>/run.sh that impersonates tze (USER_TO_IMPERSONATE overrides), tees timestamped logs plus latest.log and collects artifacts there; Claude presents it with a risk and time brief, then continues from the logs. Triggers: "I'll run it for you", "permission denied on docker.sock", "needs sudo", "sudo: a password is required", "run as tze", "/user-run".
requesting-code-review
Use when completing tasks, implementing major features, or before merging to verify work meets requirements
receiving-code-review
Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
finishing-a-development-branch
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
executing-plans
Use when you have a written implementation plan to execute in a separate session with review checkpoints
dispatching-parallel-agents
Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies