Skip to content

Optimize the security skill family #1344

Closed

Description

@potiuk

Part of #1342 — apply the setup-family optimization recipe to the security family.

15 skills, 145,121 body tokens in total; 11 over the 200-token always-on budget, 11 over the 5,000-token body budget.

skill body tokens (budget 5,000) always-on tokens, est. (budget 200) lines (cap 500)
security-issue-import 28,931 ⚠ ~280 ⚠ 2181 ⚠
security-issue-triage 13,159 ⚠ ~278 ⚠ 1138 ⚠
security-issue-invalidate 12,379 ⚠ ~251 ⚠ 1034 ⚠
security-issue-fix 11,910 ⚠ ~214 ⚠ 1084 ⚠
security-cve-allocate 11,198 ⚠ ~203 ⚠ 910 ⚠
security-issue-import-from-pr 10,050 ⚠ ~239 ⚠ 909 ⚠
security-issue-import-via-forwarder 7,955 ⚠ ~291 ⚠ 677 ⚠
security-model-verify 5,544 ⚠ ~293 ⚠ 457
security-model-update 4,845 ~323 ⚠ 355
security-issue-import-from-scan 4,506 ~237 ⚠ 334
security-model-prepare 3,658 ~251 ⚠ 308
security-issue-sync 9,944 ⚠ ~185 776 ⚠
security-issue-import-from-md 9,172 ⚠ ~125 862 ⚠
security-issue-deduplicate 8,051 ⚠ ~189 733 ⚠
security-tracker-stats-dashboard 3,819 ~107 339

Body tokens are from docs/mode-economics.md; always-on figures are a chars ÷ 4 estimate of description + when_to_use. ⚠ marks a budget exceeded. Line counts include the generated pre-flight block.

Order of work (per the umbrella):

  1. Trim the frontmatter of every skill marked ⚠ in the always-on column.
  2. Split any over-cap body, moving sub-action-specific rules into sibling files byte-for-byte.
  3. Wording pass on the rest, with headings, golden-rule headlines, code blocks and the pre-flight block kept byte-identical.
  4. Run each touched skill's eval suite before and after, outside the sandbox.

Record any inconsistencies found but not fixed (eval-coupled wording, stale headings) in the PR description.

Activity

  1. added
    enhancement
    family:security
    kind:perf
    on Sep 22, 2026
  2. self-assigned this
    on Sep 22, 2026
  3. potiuk commented on Oct 3, 2026

    @potiuk
    MemberAuthor

    The optimization of the security family is complete. Every pass has merged.

    Savings

    Measured across all 15 security skills, from just before the first PR (#1435) to the current main:

    Before Now Change
    SKILL.md bodies, read on every run (measured_tokens) 150,315 90,430 −40%
    Descriptions, loaded in every session ~3,600 ~1,900 −47%
    Sibling files, read only at the step that needs them ~61k ~105k +72%
    All text ~214k ~198k −7%

    Rows 2–4 are characters ÷ 4.

    • Per run: the SKILL.md body is what every invocation pays, and that is down 40%.
    • Siblings: they grew because the split pass moved large sections out of SKILL.md, so a run now pays for them only when it reaches that step. A second wording pass then cut them: about 6k tokens off a full sync run and about 2k off an import run.
    • Per session: the shorter descriptions cut what every session pays, whether or not a security skill runs.
    • Runtime: three passes cut runtime cost rather than text, so the table does not show them:
      • rollup and body-field writes no longer load the issue into context;
      • obvious no-ops are skipped before any per-item model work;
      • per-tracker reads are batched.

    What was done

    One leftover: security-issue-import-from-pr is still over the 500-line cap at 629 lines. Getting it under would mean splitting whole steps out, which saves no tokens because every run reads those steps.

  4. added
    family:issue
    capability:triage
    capability:resolve
    capability:stats
    capability:intake
    family:docs
    substrate:framework-dev
    substrate:analytics
    on Oct 5, 2026
  5. added
    family:ci
    on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

capability:intakecapability:resolvecapability:statscapability:triageenhancementfamily:cifamily:docsfamily:issuefamily:release-managementfamily:securityfamily:toolskind:perfsubstrate:analyticssubstrate:framework-dev

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions