Why this exists
The skill-listing measurement behind #1271 (evidence PR #1286, closed — its diff stays readable)
audited what skill-quality:check already enforces before proposing anything new. It found four
defects in the incumbent gate. They are recorded here because #1271 is being re-scoped to a decision
about which levers to pull, and these are code fixes that stand on their own regardless of how that
decision lands.
1. There is no check on the shared listing budget at all — the important one
plugins/skill-quality/scripts/check-skill.sh:219-234 (check 2) is a per-skill cap: it guards
the 1,536-character per-entry truncation limit. The skill's own description advertises a
listing-budget cap, which is a different limit — the shared budget across every listed skill,
documented as scaling with 1% of the model's context window.
Nothing checks that shared budget. That is how the listing came to overflow by a large multiple
with no gate reporting it. The measured per-entry maximum in this tree is 1,161 characters against
a 1,536 cap, so check 2 has never fired and never would; meanwhile the aggregate is multiples over.
A check here has to decide what to do about a machine-dependent budget (it scales with context
window, and the drop order is decayed local usage), so the honest form is probably a reported
aggregate with a repo-level ceiling rather than a pass/fail on live drop behavior.
2. Check 2 omits the entry joiner
check-skill.sh:227 computes DESC_LEN + WTU_LEN. The actual entry text the harness builds is
description + " - " + when_to_use — a literal three-character joiner, recovered from the
shipped binary rather than inferred. The check under-counts by 3 whenever when_to_use is populated.
Not currently binding, and it will not become binding at present lengths. It is wrong in exactly the
direction the listing work is about, and it is a two-character fix.
3. Check 12 penalizes the authoring model when_to_use exists to enable
check-skill.sh:440-448 warns unless the literal text use when appears in description or
when_to_use. A skill that puts bare quoted trigger phrases in when_to_use with no prose marker
warns — measured at 15 of 15 on a prepared rewrite block.
Two fixes, and they are not equivalent:
- Keep a literal
Use when: prefix inside when_to_use. No code change, but it costs roughly ten
characters per skill on top of the joiner's three — across 130 model-invocable skills, about
+1,700 characters, which is more than the entire recoverable mass the measurement found.
- Amend check 12 to accept a populated, single-quoted
when_to_use as satisfying the
trigger-spec requirement. This is the better fix: the warning text ("a description is a trigger
spec, not a summary") encodes the pre-when_to_use authoring model.
The second edits check-skill.sh, so it sequences behind #1096, which is already editing that
file and claims check 21.
4. skillListingBudgetFraction is not at its documented default on at least one machine
The measurement found the live value is 0.03, not the documented 0.01. Any proposal that reasons
from the default is reasoning from the wrong number on that machine. This is a consumer setting
rather than a repo artifact, so it belongs here as a caveat on any check built for item 1: a gate
that assumes 0.01 will disagree with /doctor on a machine that sets it otherwise.
One discrepancy worth resolving before building item 1
Two figures for the same budget are on #1271 and they differ by 4×:
- Derived from the shipped binary: the budget is
contextTokens × 4 × 0.01 characters — 40,000
at 1M context, 8,000 at 200k.
- Read directly from the docs' "1% of the model's context window": 10,000 at 1M, 2,000 at 200k.
The difference is whether the 1% applies to tokens (then multiplied to characters) or to characters
directly. It changes the reported overflow multiple from roughly 2× to roughly 8× at 1M context.
Settle this against the binary or against /doctor's reported listing cost before any check
asserts a number, since /doctor already reports the listing's context cost and its biggest
contributors, and overflow writes a warning to the debug log under --debug.
Related
Refs #1271 (the listing-budget issue these were found under, now status: needs-decision).
Refs #1096 (owns check-skill.sh today; item 3 sequences behind it).
Refs #1286 (closed evidence PR — the full measurement, per-plugin tables, and re-verification record
live in its diff).
Why this exists
The skill-listing measurement behind #1271 (evidence PR #1286, closed — its diff stays readable)
audited what
skill-quality:checkalready enforces before proposing anything new. It found fourdefects in the incumbent gate. They are recorded here because #1271 is being re-scoped to a decision
about which levers to pull, and these are code fixes that stand on their own regardless of how that
decision lands.
1. There is no check on the shared listing budget at all — the important one
plugins/skill-quality/scripts/check-skill.sh:219-234(check 2) is a per-skill cap: it guardsthe 1,536-character per-entry truncation limit. The skill's own description advertises a
listing-budget cap, which is a different limit — the shared budget across every listed skill,
documented as scaling with 1% of the model's context window.
Nothing checks that shared budget. That is how the listing came to overflow by a large multiple
with no gate reporting it. The measured per-entry maximum in this tree is 1,161 characters against
a 1,536 cap, so check 2 has never fired and never would; meanwhile the aggregate is multiples over.
A check here has to decide what to do about a machine-dependent budget (it scales with context
window, and the drop order is decayed local usage), so the honest form is probably a reported
aggregate with a repo-level ceiling rather than a pass/fail on live drop behavior.
2. Check 2 omits the entry joiner
check-skill.sh:227computesDESC_LEN + WTU_LEN. The actual entry text the harness builds isdescription+" - "+when_to_use— a literal three-character joiner, recovered from theshipped binary rather than inferred. The check under-counts by 3 whenever
when_to_useis populated.Not currently binding, and it will not become binding at present lengths. It is wrong in exactly the
direction the listing work is about, and it is a two-character fix.
3. Check 12 penalizes the authoring model
when_to_useexists to enablecheck-skill.sh:440-448warns unless the literal textuse whenappears indescriptionorwhen_to_use. A skill that puts bare quoted trigger phrases inwhen_to_usewith no prose markerwarns — measured at 15 of 15 on a prepared rewrite block.
Two fixes, and they are not equivalent:
Use when:prefix insidewhen_to_use. No code change, but it costs roughly tencharacters per skill on top of the joiner's three — across 130 model-invocable skills, about
+1,700 characters, which is more than the entire recoverable mass the measurement found.
when_to_useas satisfying thetrigger-spec requirement. This is the better fix: the warning text ("a description is a trigger
spec, not a summary") encodes the pre-
when_to_useauthoring model.The second edits
check-skill.sh, so it sequences behind #1096, which is already editing thatfile and claims check 21.
4.
skillListingBudgetFractionis not at its documented default on at least one machineThe measurement found the live value is
0.03, not the documented0.01. Any proposal that reasonsfrom the default is reasoning from the wrong number on that machine. This is a consumer setting
rather than a repo artifact, so it belongs here as a caveat on any check built for item 1: a gate
that assumes
0.01will disagree with/doctoron a machine that sets it otherwise.One discrepancy worth resolving before building item 1
Two figures for the same budget are on #1271 and they differ by 4×:
contextTokens × 4 × 0.01characters — 40,000at 1M context, 8,000 at 200k.
The difference is whether the 1% applies to tokens (then multiplied to characters) or to characters
directly. It changes the reported overflow multiple from roughly 2× to roughly 8× at 1M context.
Settle this against the binary or against
/doctor's reported listing cost before any checkasserts a number, since
/doctoralready reports the listing's context cost and its biggestcontributors, and overflow writes a warning to the debug log under
--debug.Related
Refs #1271 (the listing-budget issue these were found under, now
status: needs-decision).Refs #1096 (owns
check-skill.shtoday; item 3 sequences behind it).Refs #1286 (closed evidence PR — the full measurement, per-plugin tables, and re-verification record
live in its diff).