Files
SyamsandClaude Opus 5 cacf40d959 refactor(performance-optimization): move Step 3 code patterns into a skill-local reference
SKILL.md loaded ~4.3k tokens on every activation at 496 lines, just
under the 500-line budget in docs/skill-anatomy.md, with Step 3 ("Fix
Common Anti-Patterns") alone at ~1,800 words of worked TypeScript, SQL,
HTML, and TSX that an agent only needs once Step 2 has named the
bottleneck.

Move Step 3's body verbatim into references/optimization-patterns.md
(same convention as constraint-driven-development/references/floor-guard.md
and #579), promoting its #### headings to ## so the file stands alone.
SKILL.md keeps the workflow and replaces Step 3 with a condensed list:
each anti-pattern's rule and recognizable signature, with a deep link to
its worked fix. Every rule the Red Flags, Rationalizations, and
Verification sections rely on (read the plan before indexing, cache key
includes the viewer, bigger pool is not faster, neutral is a revert) is
still stated in SKILL.md.

Lines 1-120 (frontmatter through the Step 2 tables) and Step 4 onward
are byte-identical to before, so the two hunks in #492 still apply.

SKILL.md: 496 -> 267 lines, 3314 -> 2488 words (~-25% tokens per load).
Routing unchanged: run-evals rank-1 stays 100%, no description edits.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 20:20:18 +08:00
..