Repository navigation
perf(security): bring the remaining security skills under the always-on budget - #1447
Merged
Merged
Conversation
…on budget Eight security skills spent 203-291 tokens on `description` + `when_to_use`, which load in every session whether the skill runs or not. Each now states its purpose, its main trigger phrases and where to route instead, in about 100-130 tokens, leaving the procedure and the rationale to the body. security-issue-fix no longer says public PR content must not link back to the tracker, in its description or its golden rules: tracker identifiers are public-safe per AGENTS.md, as long as no security framing surrounds them, and the skill's own 5c rule already says so. The family's always-on total drops from ~1.6k to ~1.1k tokens (docs/setup/marketplace.md updated). Generated-by: Claude Code (Opus 5.5)
potiuk
added a commit
that referenced
this pull request
Sep 28, 2026
…on budget (#1447) Eight security skills spent 203-291 tokens on `description` + `when_to_use`, which load in every session whether the skill runs or not. Each now states its purpose, its main trigger phrases and where to route instead, in about 100-130 tokens, leaving the procedure and the rationale to the body. security-issue-fix no longer says public PR content must not link back to the tracker, in its description or its golden rules: tracker identifiers are public-safe per AGENTS.md, as long as no security framing surrounds them, and the skill's own 5c rule already says so. The family's always-on total drops from ~1.6k to ~1.1k tokens (docs/setup/marketplace.md updated). Generated-by: Claude Code (Opus 5.5)
potiuk
added a commit
that referenced
this pull request
Sep 28, 2026
* perf(security): fetch once per run instead of once per item The security skills re-ran the same reads per candidate, per tracker or per finding. They now fetch each shared set once and reuse it, without changing which items are processed or how each one is decided. Every batched list call keeps an explicit --limit and says what to do when the cap is hit. - security-issue-import: each mail thread is read in full once (Step 2a) and reused by Steps 3-4. Step 7 keeps one fresh read, because a draft or reporter reply can land between scan and apply (4 reads per candidate -> 2). The semantic-sweep list, the collaborator list and the rejections-ledger number are fetched once per run. Thread-id dedup searches run 6 ids per query. - security-issue-import-from-md sets labels at creation (one call per finding instead of two). security-issue-import-from-pr's two duplicate searches are one. security-issue-import-from-scan fetches the open-tracker list once for all findings. - security-issue-triage gathers body, comments and linked PRs for up to 20 trackers per GraphQL query instead of one `gh issue view` each. - security-issue-invalidate `invalidate proposed`: one GraphQL query per 20 matches replaces a reactions call plus an issue view per tracker. The list limit is aligned with triage (1000, stop when capped). - security-issue-sync reads each surface once per run: linked PRs in one query, PR authors from that result, and the hand-off comment and milestone bullet from the first issue read (3 calls -> 1 and 4 calls -> 0). - security-issue-fix: one collaborator list per run. security-issue-deduplicate: no redundant existence probes. security-cve-allocate: no title re-fetch. security-model-verify: one query for every repository's AGENTS.md and SECURITY.md. workflow-security-audit: zizmor runs over up to 50 repositories per invocation, and a failed batch is re-run per repository so a failure is never reported as clean. - security-tracker-stats-dashboard takes issue bodies and linked PRs from the one list call instead of one `gh issue view` per issue, and warns when the list hits its cap. Along the way, several `gh` calls wrapped in `$(…)` or piped were made plain commands, which the secure setup needs. import Step 2c also asked `gh search prs` for a `mergedAt` field that does not exist, and used GNU-only `date -d`. Generated-by: Claude Code (Opus 5.5) * perf(security): bring the remaining security skills under the always-on budget (#1447) Eight security skills spent 203-291 tokens on `description` + `when_to_use`, which load in every session whether the skill runs or not. Each now states its purpose, its main trigger phrases and where to route instead, in about 100-130 tokens, leaving the procedure and the rationale to the body. security-issue-fix no longer says public PR content must not link back to the tracker, in its description or its golden rules: tracker identifiers are public-safe per AGENTS.md, as long as no security framing surrounds them, and the skill's own 5c rule already says so. The family's always-on total drops from ~1.6k to ~1.1k tokens (docs/setup/marketplace.md updated). Generated-by: Claude Code (Opus 5.5)
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.
Stacked on the P6 batching PR. Part of the security family optimization (#1344).
Summary
description+when_to_useload in every session, for every installed skill, whether it runs or not. The budget is 200 tokens per skill. Eight security skills were over it. Each now states its purpose, its main trigger phrases and where to route instead, and leaves the procedure and rationale to the body.With #1438's three
security-model-*skills, every security skill is now within the always-on budget. The family's total drops from ~1.6k to ~1.1k tokens, anddocs/setup/marketplace.mdis updated to match.security-issue-fix's description and golden rules no longer say public PR content must not link back to the tracker. AGENTS.md makes tracker identifiers public-safe as long as no security framing surrounds them, and the skill's own 5c rule already said so.
Test plan
prek run --all-files, includingcheck-doc-syncskill-and-tool-validatePart of #1344.
Generated-by: Claude Code (Opus 5.5)
🤖 Generated with Claude Code