Repository navigation
perf(pairing): trim always-on frontmatter and dedupe body prose - #1475
Merged
Merged
Conversation
Why: both pairing skills were over the 200-token always-on budget (apache#1352, umbrella apache#1342) — description and when_to_use are paid in every session for every skill. Body prose repeated the frontmatter description, the per-pass scopes, and golden-rule bodies; dedupe it keeping headings, golden-rule headlines, code blocks, and the pre-flight block byte-identical. Always-on (chars/4 estimate): pairing-multi-agent-review ~230 -> 172, pairing-self-review ~209 -> 170. Measured body tokens (pre-flight excluded): 3,686 -> 3,467 and 3,437 -> 3,377. surface_hash unchanged; skill-and-tool-validate green. Generated-by: ZCode (GLM-5.3-Flash)
Kaap10
reviewed
Sep 30, 2026
Kaap10
left a comment
Contributor
There was a problem hiding this comment.
Thanks @liwenjie200543!
Trimming frontmatter on skills is always tricky because it's easy to accidentally drop subtle trigger phrases or prompt context, but this is done really cleanly.
Checked the changes across both multi-agent-review and self-review:
- Both frontmatters are comfortably under the 200-token budget now without losing any of the
when_to_usetrigger keywords. - The prose deduping in the body keeps the 3-axis isolation model, Step 1–4 pipeline, and Golden Rules completely intact.
- Measured token counts match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
description+when_to_useare paid in every session, for every skill, invoked or not.when_to_useare preserved.Test plan
uv run --project tools/skill-token-count skill-token-count— stamps current, exit 0 (restamped via--writein the same PR).uv run --project tools/skill-and-tool-validator --group dev skill-and-tool-validate— exit 0. The only warnings (override-contract,no-telemetry-import) are pre-existing on files this PR does not touch.python tools/dev/skill-surface-hash.py— reports "surface_hash in sync across 78 skills", i.e. all structural anchors are unchanged.claude -pand were not run in my environment — noted here per the Optimize skill token cost across all families (setup-family recipe) #1342 recipe's "run evals before and after" step. Happy to run them locally on request, or maintainer run appreciated before merge.Gen-AI disclosure
Prepared with AI coding assistance (ZCode); changes reviewed, tested, and committed by me.