Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(cursor): populate skill catalog and keep spaced names as one chip #8982

Closedmikeastock-bot(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/8982/headopened View on GitHub

Summary

  • Cursor snapshots left skills empty, so the $ picker and / skill rows never listed Cursor skills. After a successful agent about probe, discover SKILL.md trees from the same bundled, plugin, user, and project roots Cursor loads.
  • Skill titles with spaces were inserted as $Create Hook, so the tokenizer split them into a chip plus leftover text. Quote those tokens like file mentions, and keep Cursor catalog name token-safe with the title on displayName.

Test plan

  • On a Cursor provider, confirm the $ picker lists bundled, plugin, user, and project skills
  • Select a skill whose frontmatter title has a space and confirm the composer shows one chip
  • Confirm $kebab-case skills still insert and render as before
  • Confirm a /skill: row for the same skill still inserts the $ token

Made with Grok 4.6 (grok-4.6).

Made with Cursor

Note

Populate Cursor skill catalog and support quoted skill tokens as one chip

  • Adds filesystem-based Cursor skill discovery across bundled, plugin, user, and project roots in CursorSkills.ts, wired through checkCursorProviderStatus into provider snapshots without changing status/auth fields.
  • Introduces serializeComposerSkillToken in composerTrigger.ts to quote and escape names with spaces, used by the web and mobile composers and ComposerSkillNode.getTextContent.
  • Updates SKILL_TOKEN_REGEX and collectComposerInlineTokens in composerInlineTokens.ts and the native markdown parser in nativeMarkdownText.ts to recognize $"quoted name" tokens, unescape them, and compute correct source ranges.
  • Fixes cursor expand/collapse in composer-logic.ts and skill segment slicing in composer-editor-mentions.ts to use segment.source length so quoted tokens are handled.
  • Classifies Cursor plugin skill paths as app source kind in providerSkills.ts.
  • Risk: discoverCursorSkills reads the filesystem on every status check; projects with many skill roots may see slower provider probes. ComposerPromptSegment 'skill' variant gains a required source field — any out-of-tree consumers of that type must be updated.
📊 Macroscope summarized 6d15e97. 15 files reviewed, 2 issues evaluated, 0 issues filtered, 2 comments posted

🗂️ Filtered Issues

    1. Opened against the wrong repo; moving this to the fork.

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. @@ -96,4 +96,5 @@
      9696
      9797 By default, the `/` menu includes skills. To keep this menu command-only, turn off **Show skills in
      9898 slash menu** in **Settings → General**. Skill results use the `/skill:Skill Name` label and add the
      99-same `$name` skill token to your message. The original skill name remains searchable. If the provider
      99+same `$name` skill token to your message. Skill names that contain spaces are inserted as
      100+`` `$"Skill Name"` `` so they stay one chip. The original skill name remains searchable. If the provider
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟢 Low user/composer.md:100

      The example renders the inner backticks literally, so users enter `$"Skill Name"` instead of $"Skill Name"; that token does not match the syntax produced by serializeComposerSkillToken. Use a single Markdown code span for the inserted token.

      Suggested change
      100-`` `$"Skill Name"` `` so they stay one chip. The original skill name remains searchable. If the provider
      100+`Skill names that contain spaces are inserted as `$"Skill Name"` so they stay one chip. The original skill name remains searchable. If the provider
      🤖 Copy this AI Prompt to have your agent fix this:
      In file @docs/user/composer.md around line 100:
      
      The example renders the inner backticks literally, so users enter `` `$"Skill Name"` `` instead of `$"Skill Name"`; that token does not match the syntax produced by `serializeComposerSkillToken`. Use a single Markdown code span for the inserted token.
      @@ -0,0 +57,21 @@
      57+
      58+function isUserInvocable(record: Record<string, unknown>): boolean {
      59+ const value = record["user-invocable"] ?? record.userInvocable;
      60+ return value !== false;
      61+}
      62+
      63+function parseSkillFrontmatter(contents: string): SkillFrontmatter {
      64+ const match = FRONTMATTER_PATTERN.exec(contents);
      65+ if (!match) {
      66+ return { kind: "missing" };
      67+ }
      68+
      69+ let parsed: unknown;
      70+ try {
      71+ parsed = parseYamlDocument(match[1] ?? "");
      72+ } catch {
      73+ return { kind: "malformed" };
      74+ }
      75+ if (typeof parsed !== "object" || parsed === null) {
      76+ return { kind: "malformed" };
      77+ }
      macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      🟡 Medium Drivers/CursorSkills.ts:75

      A valid empty or comments-only frontmatter block is classified as malformed, so scanSkillRoot skips otherwise valid skills with ---\n---; removing the delimiters instead falls through as missing and discovers the skill. Treat the null result from parseYamlDocument as an empty mapping before validating the parsed value.

      Suggested change
      75- if (typeof parsed !== "object" || parsed === null) {
      76- return { kind: "malformed" };
      77- }
      75+ if (parsed === null) {
      76+ parsed = {};
      77+ }
      78+ if (typeof parsed !== "object") {
      79+ return { kind: "malformed" };
      80+ }
      🤖 Copy this AI Prompt to have your agent fix this:
      In file @apps/server/src/provider/Drivers/CursorSkills.ts around lines 75-77:
      
      A valid empty or comments-only frontmatter block is classified as `malformed`, so `scanSkillRoot` skips otherwise valid skills with `---\n---`; removing the delimiters instead falls through as `missing` and discovers the skill. Treat the `null` result from `parseYamlDocument` as an empty mapping before validating the parsed value.
    4. Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

      Fix All in Cursor ❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot).

      Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6d15e977dc850ddcdc69107d11af2888e9ddc683. Configure [here](https://www.cursor.com/dashboard/bugbot).
      @@ -44,4 +44,8 @@
      4444 skill: Pick<ServerProviderSkill, "path" | "scope">,
      4545 ): ProviderSkillSourceKind {
      4646 const normalizedPath = normalizePathSeparators(skill.path);
      47- if (normalizedPath.includes("/.codex/plugins/") || normalizedPath.includes("/.agents/plugins/")) {
      47+ if (
      48+ normalizedPath.includes("/.codex/plugins/") ||
      49+ normalizedPath.includes("/.agents/plugins/") ||
      50+ normalizedPath.includes("/.cursor/plugins/")
      51+ ) {

      Bundled skills show wrong source

      Low Severity

      Cursor discovery now emits scope: "bundled" for ~/.cursor/skills-cursor, but resolveProviderSkillSourceKind only special-cases /.cursor/plugins/ paths and has no bundled (or skills-cursor) mapping. Those rows fall through to other, so the $ and / pickers label first-party Cursor skills with the wrong source.

      Additional Locations (1)
      Fix in Cursor Fix in Web
      Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6d15e977dc850ddcdc69107d11af2888e9ddc683. Configure [here](https://www.cursor.com/dashboard/bugbot).
    5. Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This PR adds a filesystem-backed Cursor skill catalog and changes shared, web, and mobile token handling, making it a broad runtime capability rather than a self-contained fix. Unresolved findings include valid skills being omitted for empty frontmatter and bundled skills receiving the wrong source label, so the behavior merits human review.

      Not approved because:

      • 1 blocking correctness issue found at or above your repo's Minimum Blocking Severity
      Adjust the Minimum Blocking Severity for this repo — including turning it Off — in [Settings](https://app.macroscope.com/pingdotgg/settings#Repos). 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.