Repository navigation
fix(skills): keep recovery-skill triggers inside Claude Code's listing budget - #7558
Conversation
…g budget (kunchenguid#7545) Claude Code lists skill descriptions within a budget of 1% of the context window and drops the least-invoked skills' descriptions first, which are the rarely-loaded recovery skills whose descriptions AGENTS.md section 13 uses as the trigger index. - Remove the decision-hold-lifecycle redirect stub; nothing on main points briefs at it any more (captain-hold-lifecycle owns the policy and docs/captain-hold-lifecycle.md still documents the fm-decision-hold.sh shim). - Tighten the longest skill descriptions to their load triggers, keeping every trigger. Total description size drops from 11312 to 6142 characters across the listing. - Document /doctor, /skill-doctor, skillListingBudgetFraction, and skillOverrides "name-only" in the Claude harness adapter notes as opt-in, home-local vendor settings. No session-start budget warning or other default-on surface is added.
|
Speaking as Kun's firstmate: thank you, @mhaney93. This is a focused, well-measured fix for the issue you filed, and it stays inside the scope marked ready-for-pr on #7545. Cutting description text from 11,312 to 6,142 characters while keeping the load triggers is exactly what was needed. First look on head
Contract-class: restore (my own read). The trimmed listing and stub removal bring back the trigger index AGENTS.md section 13 already relies on. The adapter-notes settings are opt-in and change nothing unless a home sets them. No default-on surface is added. One thing I'd love from you (waiting on you): the PR says no live Claude Code session was run, so the budget fit is an estimate from parsed frontmatter. Could you open a real Claude Code session on this branch, run VISION.md, rule by rule
|
|
Live numbers from Claude Code 2.1.304, captured in interactive sessions on this branch (
Firstmate's listing drops from about 4.0k to about 2.3k tokens per One adapter-notes nit from testing: in 2.1.304, |
|
Speaking as Kun's firstmate: this is merged. Thank you @mhaney93 — really appreciate you taking the time on this. |
Intent
Closes #7545.
Claude Code caps its skill listing at about 1% of the context window, and when the listing overflows it drops descriptions from the least-invoked skills first. AGENTS.md section 13 relies on those descriptions as the trigger index, so firstmate's rarely-invoked recovery skills are the first to lose their triggers.
This PR covers the scope the triage marked ready-for-pr:
decision-hold-lifecycleredirect stub (nothing on main still points at it) and tighten the longest descriptions to their load triggers.skillListingBudgetFraction,skillOverrides: "name-only",/skill-doctor) in the Claude Code harness adapter notes, as opt-in per-home settings rather than part of the shared contract.No session-start warning or other default-on surface is added.
What Changed
decision-hold-lifecycleredirect stub skill and its entry indocs/documentation-audiences.json..agents/skills/so each one keeps its load triggers. Preamble sentences such as "Agent-only reference/policy for…", harness lists, and restated procedure summaries are gone, which shrinks firstmate's share of Claude Code's skill listing.harness-adapters/references/harness/claude.md). It explains the 1% budget and how descriptions get dropped, covers/doctorand/skill-doctor, and documentsskillListingBudgetFractionandskillOverrides: "name-only"as opt-in settings for each home. These go in user settings or.claude/settings.local.json, never the tracked project settings.🤖 Generated with Claude Code
Risk Assessment
✅ Low: This change only touches documentation and skill frontmatter, and it stays within the scope the maintainer marked ready-for-pr. The removed decision-hold-lifecycle stub has no remaining references, and its documentation-audiences.json entry was removed too. Every load trigger in the shortened descriptions survives, and the shortened descriptions match AGENTS.md §13 and the agent-skill-trigger-index skill. The Claude Code settings are documented only in the Claude harness adapter notes as opt-in, per-home settings. No default-on warning or other new surface is added.
Testing
I ran three targeted tests (documentation-audiences, harness-adapter-references, brief) and all passed. I then parsed every skill's YAML frontmatter at the base and target commits. Every skill still parses with a matching name and a non-empty description. Only decision-hold-lifecycle was removed, and nothing still references it. Total description text fell from 11,312 to 6,142 characters, which fits a rough 8,000-character budget for a 200k-context model (1% of context at about 4 characters per token) that the old listing went over. Side-by-side comparison shows the trimmed descriptions keep their load triggers; what was cut is procedure text and the "Agent-only ..." preambles. The adapter notes document the Claude Code settings as opt-in and home-local, and no default-on warning was added. I did not run a live Claude Code /doctor session, so the budget check is an estimate from the parsed listing. This is a docs-only change, so there is no screenshot. The measurement is saved as a text artifact, and the temporary files have been removed.
Evidence: Skill listing size, base vs target (YAML frontmatter parse)
Source: Skill listing size, base vs target (YAML frontmatter parse)
skills: base=29 target=28; removed=['decision-hold-lifecycle'] added=[] total description chars: base=11312 target=6142 (46% smaller) approx budget @200k ctx (1% * ~4 chars/token) = 8000 chars: base fits=False target fits=TruePipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
✅ **Test** - passed
✅ No issues found.
bash tests/fm-documentation-audiences.test.sh(audience manifest without the removed stub; owner pointers and local links still resolve)bash tests/fm-harness-adapter-references.test.sh(harness adapter routing, including the edited claude.md reference, is readable)bash tests/fm-brief.test.sh(brief scaffolds that consume skill paths)grep -rn decision-hold-lifecycleacross the worktree: no references left after the stub was removedParsed every.agents/skills/*/SKILL.mdfrontmatter as YAML at base a65dcee and target 8f35f68: checked that name matches the directory, descriptions are non-empty, the skill set changed, and per-skill and total description sizesCompared base and target descriptions for the most heavily trimmed skills against the trigger list inagent-skill-trigger-indexand AGENTS.md section 13, including whether any backticked trigger tokens were lostReviewed the claude.md diff: the vendor settings are described as opt-in and kept out of the tracked.claude/settings.json✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.