perf(pairing): trim always-on frontmatter and dedupe body prose - #1475
Open
liwenjie200543 wants to merge 1 commit into
Open
liwenjie200543 wants to merge 1 commit into
liwenjie200543 wants to merge 1 commit into
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)
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.