Repository navigation
Description
Context
Claude Code enforces a per-skill metadata budget of 1,536 characters for
description + when_to_use combined. Skills that exceed this budget get
their frontmatter truncated at routing time, weakening discovery.
#103 trimmed pr-management-code-review from 1,708 → 944 chars using
this principle:
Compress depth, preserve surface.
Frontmatter is the routing layer — keep only trigger phrases, short task
descriptions, and routing cues. Rationale, implementation notes, long
examples, criteria source paths, and sub-step descriptions belong in the
body.
This meta-issue tracks applying the same audit to every other skill.
Trimming rules
Keep in frontmatter
- Concise trigger phrases (every literal phrase a user might type)
- Routing cues (
use when …,skip when …) - High-signal task descriptions
Move to body
- Rationale / "why"
- Implementation notes
- Long examples
- "Distinct from X" explanations
- Criteria source paths
- Sub-step descriptions
Non-negotiable: every literal trigger phrase from the original
when_to_use must survive verbatim — including niche ones. Routing recall
must not regress.
Per-PR checklist
- PR description shows before/after char counts (
description,when_to_use, total, budget margin) - PR description lists where moved content now lives
- Trigger phrases preserved verbatim (call this out explicitly)
Skills to audit
-
pr-management-mentor— 1,514 / 1,536 (margin: 22) skills/pr-management-mentor: trim frontmatter to fit metadata budget #119 -
security-issue-triage— 1,405 / 1,536 skills/security-issue-triage: trim frontmatter to fit metadata budget #120 -
setup-isolated-setup-install— 1,292 skills/setup-isolated-setup-install: trim frontmatter to fit metadata budget #121 -
security-issue-fix— 1,249 skills/security-issue-fix: trim frontmatter to fit metadata budget #122 -
setup-steward— 1,231 skills/setup-steward: trim frontmatter to fit metadata budget #123 -
security-cve-allocate— 1,197 skills/security-cve-allocate: trim frontmatter to fit metadata budget #124 -
pr-management-triage— 1,183 skills/pr-management-triage: trim frontmatter to fit metadata budget #125 -
security-issue-import-from-md— 1,149 # 126 -
setup-shared-config-sync— 1,138 skills/setup-shared-config-sync: trim frontmatter to fit metadata budget #127 -
setup-override-upstream— 1,096 skills/setup-override-upstream: trim frontmatter to fit metadata budget #128 -
security-issue-import— 1,073 -
security-issue-import-from-pr— 1,036 -
write-skill— 1,036 -
security-issue-invalidate— 1,025 -
setup-isolated-setup-verify— 1,024 -
setup-isolated-setup-update— 996 -
pr-management-code-review— 944 (already trimmed in skills/pr-management-code-review: trim frontmatter to fit metadata budget #103) -
security-issue-deduplicate— 849 -
security-issue-sync— 739 -
pr-management-stats— 604
Next
Once most of these audits are complete, it would be a good time to introduce
#80 on top of the slimmer frontmatter baseline.
References
- skills/pr-management-code-review: trim frontmatter to fit metadata budget #103 — pattern PR (
pr-management-code-review) - Prevent silent SKILL.md routing degradation from frontmatter truncation #92 — earlier related work
Activity
choo121600 commentedon May 11, 2026
I think it would be good to move to #80 at this point :)
Claude also seems to recommend only going up to Tier 2 and then applying #80
skills/setup-override-upstream: trim frontmatter to fit metadata budg…
skills/setup-shared-config-sync: trim frontmatter to fit metadata bud…
skills/setup-isolated-setup-install: trim frontmatter to fit metadata…
skills/security-issue-triage: trim frontmatter to fit metadata budget (…
skills/security-issue-import-from-md: trim frontmatter to fit metadat…
skills/pr-management-triage: trim frontmatter to fit metadata budget (#…
skills/security-cve-allocate: trim frontmatter to fit metadata budget (…
skills/security-issue-fix: trim frontmatter to fit metadata budget (#122
skills/pr-management-mentor: trim frontmatter to fit metadata budget (#…
skills/setup-steward: trim frontmatter to fit metadata budget (#123)
choo121600 commentedon May 12, 2026
Follow-up audit: principle adherence after the trim wave
I ran the audit principles from this issue against
main(HEADee0fa4c) after the trim PRs (#119–#126, plus the earlier #127/#128) landed. Two takeaways:description + when_to_useis now 1,233 chars (was 1,514), well under the 1,536 budget.Methodology
tiktoken cl100k_baseas a proxy for Claude's tokenizer (±5–10% on English text).description + when_to_useblock-scalar bodies.Current state (HEAD
ee0fa4c)Tokens & budget — all under budget
Full table (20 skills, sorted by frontmatter tokens desc)
Headroom is comfortable — the principle, not the budget, is the binding constraint from here on.
Principle adherence audit
CLEAN — 8 skills:
pr-management-mentor(#119),pr-management-stats(baseline-clean),pr-management-triage(#125),security-cve-allocate(#124, one minor(process step 6)paren),security-issue-fix(#122, one minorprocess step 9 of README.mdref),security-issue-sync,security-issue-triage(#120 — exemplary "Skip when … invoke/Xdirectly" routing block),setup-isolated-setup-install(#121).MODERATE — 12 skills with at least one residual violation:
pr-management-code-reviewpr-management-triage(which decides whether to engage); this skill runs after …"security-issue-deduplicatesecurity-issue-importsecurity-issue-import-from-mdsecurity-issue-import(Gmail) andsecurity-issue-import-from-pr(public PR), there is no inbound reporter …" / "Typical sources: AI security review output, third-party SAST report …"security-issue-import-from-prsecurity-cve-allocateto take over."security-issue-invalidateinvalidlabel, remove the scope label, post a short closing comment, archive …" / "(a separate Vulnogram REJECT flow is required first)"setup-isolated-setup-updatesetup-isolated-setup-verifydocs/setup/secure-agent-setup.md" / "(the "did a denial silently turn into an allow?" canary)"setup-override-upstreamsetup-shared-config-syncgit pull --rebasefirst if the local checkout is behind, so a push never overwrites concurrent work from another machine."setup-stewardargument-hint/setup-steward— …,/setup-steward upgrade— …" vsargument-hint: "[adopt|upgrade|verify|override skill-name|unadopt]"write-skillFive reusable violation patterns
The residuals cluster into 5 patterns. Codifying these in
write-skillwould make new skills land principle-compliant by construction:security-issue-triageafter skills/security-issue-triage: trim frontmatter to fit metadata budget #120 shows the right shape:Skip when team consensus … has already landed — invoke /X (VALID), /Y (INFO-ONLY) directly— a routing redirect, not a comparison.docs/setup/secure-agent-setup.md", "Step 2a". The router doesn't open the doc.Proposed follow-up
With this issue closed, treating this as a retrospective — happy to file a fresh issue if that's the cleaner home.
write-skill— its own frontmatter currently violates patterns 1 and 5 (the YAML/resources/placeholder/preamble/injection/Privacy-LLM enum and the validator path), so it's a natural first PR: dogfood the rule and ship the doc together.when_to_usebefore/after a trim PR; the set must be equal-or-superset ofmain. Could live as atools/skill-validatorSOFT warning (matching the existing progressive-disclosure precedent).tools/skill-validator— surface them in CI as advisory, not blocking; reviewer keeps the final say on borderline cases (scope statements, action enums that are the contract).Audit scripts (
measure_frontmatter.py,budget_check.py, frontmatter dumper) are local; happy to PR them undertools/skill-validator/if useful as ongoing CI.potiuk commentedon May 12, 2026
Sounds good to me ! Great to have the non-regression checks and soft warnings - we might have regular main scheduled check "failing" actually and monitor (later we might turn it into notification - similar to what we have in Airflow.