Fixes #9235.
Providers discover skills such as 2spec, but T3's token patterns required a letter first. The composer and timeline left $2spec as text; Claude and Cursor invocation conversion missed it too.
Accept digit-leading names containing a letter across shared composer parsing, web/mobile timeline text, and both invocation adapters. Keep numeric amounts and compact monetary/exponent expressions such as $20, $20k, $100M, and $1e6 as prose. Known-skill validation and existing token boundaries remain unchanged.
Current verification#
On main 0dd5c64b, executing the shared tokenizer produces a skill for $fromSpec and no token for $2spec . Cursor's actual detection function returns false for use $2spec here, and its rewrite leaves the known skill unchanged.
After the fix:
- 142 focused tests passed across shared parsing, web composer segmentation, live ChatMarkdown updates, mobile markdown decoration, and Claude dispatch.
- Two focused Cursor invocation tests passed. Repeated detection works, known
$2spec becomes /2spec, unknown names remain unchanged, and currency text stays prose.
- Shared, web, mobile, and server package typechecks passed. Server reports unrelated existing suggestions, not errors.
- Targeted lint and
git diff --check passed.
The new web test mounts ChatMarkdown, adds discovered skill metadata, and removes it again. It verifies the digit-leading label appears and disappears without turning known currency-shaped names into badges.
All executed current-head CI and configured review checks pass; preview jobs skip. The root reviewer inspected the complete eleven-file change and all review threads. In the actual Linux Chromium client, the same unsent prompt renders only the FromSpec chip before the patch, then both FromSpec and 2spec afterward. The $20k control remains editable text. The after check integrated the exact production diff into main 2dca7a1e; the before check used main 2d5464af. No prompt was submitted.
Before:

After:

Mobile evidence is JavaScript markdown-run output, not native-device rendering. No real provider CLI was invoked for these tests.
Original fix by amiralibg, retained on the same branch. Latest-main integration, Cursor coverage and verification by GPT 6 Astra via Codex in T3 Code.
Original contributor screenshot, before this main refresh
Note
Medium Risk
Changes shared prompt-token parsing and provider skill dispatch/rewrite paths; incorrect regex behavior could chip prose or miss invocations, though currency exclusions are explicitly tested.
Overview
Skill references like $2spec were discovered by providers but stayed plain text because every $name matcher required an alphabetic first character.
This PR aligns the shared skill-token regex in composerInlineTokens, web/mobile rendering, Claude dispatch, and Cursor mention rewrite so names can start with a digit while still requiring at least one letter. It adds a negative lookahead so compact money-style tokens ($20, $20k, $100M, $1e6, $1_000) are not treated as skills even when a matching skill exists.
Cursor derives HAS_SKILL_MENTION_PATTERN from the same pattern source so repeated presence checks stay consistent. Regression tests cover composer segmentation, inline chips, markdown decoration, Claude/Cursor dispatch, and a ChatMarkdown case where $2spec chips but $20k does not.
Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6187c7a4f87dda9d8a6d90bf743f69bd0c0115d7. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).
Note
Support digit-leading skill names in token matchers#
- Updates
SKILL_TOKEN_REGEX and SKILL_MENTION_PATTERN across mobile, web, server, and shared packages to accept digit-leading skill names like $2spec when they contain at least one letter.
- Excludes numeric dollar amounts and compact numeric expressions (
$20, $20k, $100M, $1e6, $1_000) from matching, leaving them as prose.
- Behavioral Change: The updated regex matchers in composerInlineTokens.ts and ClaudeSkillDispatch.ts change token boundary rules; digit-leading words with letters are now dispatched as skills while purely numeric forms are not.
Macroscope summarized 6187c7a.
macroscopeapp[bot](GitHub profile, opens in a new tab) reviewed