You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(claude-ops): skill-usage-audit.sh spawns ~5x the processes of its sibling at the same budget #3550
skill-usage-audit.sh spawns roughly five times as many external processes as its sibling in the same event family, at the same declared 5s budget.
hook
external processes
declared timeout
skill-usage-audit.sh
25 to 26
5s
tool-failure-audit.sh
5
5s
Breakdown for skill-usage-audit.sh: 3 git, 6 jq, 5 realpath, 5 dirname, 2 mkdir, and one each of sha1sum, date, basename, grep, cut. Steady state is 25; the 26th is a mkdir from ensure_git_exclude on a fresh fixture, which is skipped once the exclude line exists.
tool-failure-audit.sh reaches the same telemetry envelope with 4 jq and 1 dirname.
The durable headline is the ratio, not either absolute number.
Why this is filable when the timing numbers were not
The count is a property of the code path, not the host. It comes from static trace-line counting over a deterministic input, so a rerun on any machine at any load yields the same number and no averaging is needed.
This is deliberately separated from the wall-clock figures gathered in the same investigation (#3549), which swung 22 to 28s against 5.8 to 9.1s under 38 concurrent bash.exe processes. Those are load-contaminated and were not filed. This is not.
Measurement, rerunnable
Against a throwaway git init fixture, synthetic payload on stdin, HOOK_TELEMETRY_SINK unset:
Run against the installed cache copy
(~/.claude/plugins/cache/melodic-software/claude-ops/<version>/hooks), not the
worktree, so it reflects what actually dispatches. printf is excluded as a
shell builtin.
Scope caveats
The count is for the default repo scope. The user and data-dir scopes differ slightly.
This is a per-tool-call hook, so the cost is paid on every Skill dispatch.
5b5c676bf (perf(disk-hygiene): cut the destructive guard's per-call spawns 4 to 1, and stop its watchdog blocking commands it never judged) is the same shape of fix on a per-call hook, so the pattern and its rationale are already established here.
The likely candidates are the repeated jq invocations, which 5b5c676bf and an
earlier hook-failure-audit change both addressed by consolidating field reads,
and the five realpath plus five dirname calls in path resolution.
Verification note: the counts in this issue are single-source. A post-merge verifier attempted to re-run the bash -x trace independently and could not: the worktree-isolation guard blocks the git init the recipe needs for its throwaway fixture. Treat the 25-26 vs 5 figures as measured once, not independently confirmed.
What IS independently confirmed is the premise the numbers rest on: skill-usage-audit.sh, tool-failure-audit.sh and hooks.json are unchanged since 3813cdea (2026-08-26), which predates this issue, so the code the counts were taken against is byte-identical on merged main. Anyone re-running the recipe should do it outside a worktree-isolated session.
Evidence: current plugins/claude-ops/hooks/skill-usage-audit.sh (68 lines) has no realpath/dirname/mkdir/sha1sum calls the issue's breakdown named — BASH_SOURCE param expansion replaces dirname, a bash regex extracts session_id instead of jq; commits 5101f5a25, 912d6b3ec landed after the 2026-09-01 filing
Activity
kyle-sexton commentedon Sep 1, 2026
Verification note: the counts in this issue are single-source. A post-merge verifier attempted to re-run the
bash -xtrace independently and could not: the worktree-isolation guard blocks thegit initthe recipe needs for its throwaway fixture. Treat the 25-26 vs 5 figures as measured once, not independently confirmed.What IS independently confirmed is the premise the numbers rest on:
skill-usage-audit.sh,tool-failure-audit.shandhooks.jsonare unchanged since3813cdea(2026-08-26), which predates this issue, so the code the counts were taken against is byte-identical on merged main. Anyone re-running the recipe should do it outside a worktree-isolated session.kyle-sexton commentedon Sep 23, 2026
This was generated by AI during triage.
Closing as already fixed on main.
Evidence: current
plugins/claude-ops/hooks/skill-usage-audit.sh(68 lines) has norealpath/dirname/mkdir/sha1sumcalls the issue's breakdown named —BASH_SOURCEparam expansion replacesdirname, a bash regex extractssession_idinstead ofjq; commits5101f5a25,912d6b3eclanded after the 2026-09-01 filing