Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(claude): skills picked from the composer now run #9128

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/9128/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Picking a skill from the $ menu did nothing useful on Claude. The composer inserts $name for every provider. Codex reads that natively, but Claude Code treats it as prose, so the agent guessed at a skill it could see and sometimes ran a different one. One user picked $re-release-version and the agent cut a whole new release with release-version instead. Skills marked disable-model-invocation never ran at all, and skills switched off in Claude's settings still showed up in the picker.

Fix

Claude Code runs a skill only from a message whose last text block starts with /name. The Claude adapter now splits the outgoing message around the last $skill mention: the text before it stays as its own block, and the mention plus everything after becomes a trailing /name args block that the CLI expands itself. So ok, now $implement all the tickets goes to Claude as two blocks, ok, now and /implement all the tickets. The user's message and the timeline stay unchanged, and a skill runs from anywhere in the message, the same as on Codex. Skills marked disable-model-invocation work because you picked them, which is the user invocation Claude asks for. Earlier mentions in the same message are rewritten to /name inline so the model starts them through its Skill tool.

Discovery now reads disable-model-invocation, user-invocable, and the skillOverrides map from Claude's settings files, identifies skills by directory name, and lets the user scope win collisions, all matching the CLI. Skills switched off or reserved for the agent leave both pickers and are never dispatched.

Provider slash commands are only offered in the / menu where they open the message, since that is the only place a provider expands them. Skills are no longer position-gated there.

Behavior was verified against Claude Code 2.1.237 in stream-json mode: the last-text-block rule, the image ordering rule, and the one-skill-per-message limit (anthropics/claude-code#87113).

Supersedes #7673, #8336, and #9105. The discovery work is cherry-picked from #7673 with Rodrigo's authorship kept.

Fixes #7671 Fixes #8295

Verification

  • Server: 182 tests across skill discovery, skill dispatch, and the Claude adapter, including new cases for mid-prompt dispatch, image ordering, and disabled skills left as prose.
  • Clients: 26 tests across client-runtime, web skill search, slash menu position, and the mobile menu hook.
  • Typecheck clean for contracts, client-runtime, server, web, and mobile. Scoped lint and format clean.

Made by Claude Fable 5.1 via Claude Code.


Note

Medium Risk Changes Claude turn payload shaping and per-send filesystem/settings skill scans; wrong dispatch or override parsing could run the wrong skill or skip valid picks.

Overview Composer $skill picks on Claude now reach the CLI as /name blocks instead of inert prose. The adapter adds planClaudeSkillDispatch, which rewrites the last known skill mention into a trailing slash command (with images ordered before that block) and turns earlier mentions into inline /name text; disabled, unknown, or agent-only skills stay literal.

Claude skill discovery is realigned with Claude Code: scan user and .claude/skills only (drop .agents/skills), resolve names from directory names with user scope winning collisions, and merge skillOverrides from the same settings stack the CLI uses. Skills expose userInvocationOnly / userInvocable on the contract, and isProviderSkillUserInvocable filters composer search and slash menus.

Slash autocomplete now hides provider-native commands when the / trigger is not at message start; skills stay available on any line because the server dispatches them from any position. User docs describe the new behavior.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 8f27b8e1f58543d1924a182ef36c8290a98d3b7f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Fix composer-selected skills so they run and filter agent-only skills from autocomplete

Fixes the useComposerCommandMenu hook so skills chosen from the composer menu are user-invocable. It now filters skill results to enabled, non-agent-only skills and restricts provider slash commands to message position zero; built-in commands and skills remain available at other positions.

  • Risk: provider-native slash commands no longer appear once the prompt has non-whitespace content before the trigger; users relying on mid-message provider commands will lose that autocomplete.
Macroscope summarized 8f27b8e.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire13.3 KiB13.4 KiB+139 B (+1.0%)15.1 KiB✅
      CodexThread snapshot wire6.9 KiB6.9 KiB0 B (0.0%)7.3 KiB✅
      CodexLive turn WebSocket wire6.4 KiB6.5 KiB+139 B (+2.1%)7.8 KiB✅
      CodexLive turn WebSocket decoded55.6 KiB57.0 KiB+1.4 KiB (+2.6%)66.4 KiB✅
      CodexLive turn messages10100 (0.0%)21✅
      ClaudeTotal thread wire13.2 KiB13.2 KiB+97 B (+0.7%)15.1 KiB✅
      ClaudeThread snapshot wire6.9 KiB6.9 KiB−1 B (−0.0%)7.3 KiB✅
      ClaudeLive turn WebSocket wire6.3 KiB6.4 KiB+98 B (+1.5%)7.8 KiB✅
      ClaudeLive turn WebSocket decoded55.5 KiB56.3 KiB+840 B (+1.5%)66.4 KiB✅
      ClaudeLive turn messages880 (0.0%)21✅

      Baseline: 04efa79 · PR result: 8f27b8e · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 109.4 KiB
      • Claude decoded thread snapshot: 110.1 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This change introduces Claude-native skill execution, new settings and invocation-policy handling, and altered composer behavior across web, mobile, and server layers. Its runtime scope extends beyond a small isolated fix, particularly because existing Claude prompt and skill-resolution paths now behave differently.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).

Sign in to join this conversation.