Skip to content

feat(cursor): discover filesystem skills - #7764

Open
djfbryant wants to merge 2 commits into
pingdotgg:mainfrom
djfbryant:research/cursor-skill-discovery
Open

feat(cursor): discover filesystem skills#7764
djfbryant wants to merge 2 commits into
pingdotgg:mainfrom
djfbryant:research/cursor-skill-discovery

Conversation

@djfbryant

@djfbryant djfbryant commented Aug 21, 2026

Copy link
Copy Markdown

Cursor threads can now discover local SKILL.md skills from the supported skill folders.

T3 keeps $skill in the composer. Before it sends a known selected skill to Cursor, it changes the token to Cursor’s /skill form.

Tests:

  • ./node_modules/.bin/vp test run apps/server/src/provider/Drivers/CursorSkills.test.ts apps/server/src/provider/Layers/CursorProvider.test.ts apps/server/src/provider/Layers/CursorAdapter.test.ts (47 passed)

Built with GPT-5.6 Terra in T3 Code.

Note

Add filesystem skill discovery for CursorDriver and translate $skill to /skill

  • Adds discoverCursorSkills in CursorSkills.ts which recursively reads SKILL.md files from user roots (~/.agents|.cursor|.claude|.codex/skills) and project roots (cwd/.agents|.cursor|.claude|.codex/skills), parses YAML frontmatter, and returns de-duplicated ServerProviderSkill entries with user or project scope.
  • Adds parseSkillFrontmatter which validates name (kebab-case) and non-empty description; files failing validation are silently skipped.
  • Adds renderCursorSkillInvocations which rewrites $name tokens to /name only for known skill names, preserving unknown tokens.
  • Threads cwd through CursorDriver.create, checkCursorProviderStatus, and CursorAdapter.makeCursorAdapter so skills are discovered at session start and prompts are rewritten before sending to Cursor.
  • Behavioral Change: session/prompt requests now send skill-translated input instead of raw text; skill discovery is best-effort and unreadable or malformed entries are skipped without failing.

Macroscope summarized 2d8b64c.


Note

Medium Risk
Reads user/project skill files and rewrites prompt text before ACP send. Discovery is best-effort and only known skill names are rewritten, but prompt mutation and filesystem scanning still warrant review.

Overview
Cursor threads can now surface on-disk skills in the shared $ composer picker. T3 scans the same user and project skill folders Cursor documents (.agents, .cursor, .claude, .codex) because ACP does not expose a catalogue.

Valid SKILL.md files (YAML name/description, name matching the parent directory) are published on the provider snapshot. Before a prompt is sent, known $skill tokens are rewritten to Cursor’s /skill form; unknown $ tokens are left alone. Built-in, marketplace, and plugin skills stay hidden.

Malformed or unreadable files are skipped so discovery cannot fail the provider check.

Reviewed by Cursor Bugbot for commit 2d8b64c. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 82cc9eb1-8749-4f9f-ae53-73cffdbe0796

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 21, 2026
Comment thread apps/server/src/provider/Drivers/CursorSkills.ts Outdated
Comment thread apps/server/src/provider/Layers/CursorProvider.ts
@djfbryant
djfbryant marked this pull request as ready for review August 21, 2026 08:06

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

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 for commit 2d8b64c. Configure here.

const textGeneration = yield* makeCursorTextGeneration(effectiveConfig, processEnv);

const checkProvider = checkCursorProviderStatus(effectiveConfig, processEnv).pipe(
const checkProvider = checkCursorProviderStatus(effectiveConfig, processEnv, cwd).pipe(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skill picker cwd mismatches session

Medium Severity

The composer $ picker publishes skills discovered from ServerConfig.cwd, while sendTurn rewrites $skill tokens using ctx.skillNames discovered from the thread workspace cwd (worktreePath or project workspaceRoot). When those roots differ—worktrees or another project than the process cwd—a skill chosen from the picker can be missing from the session set, so the $ token is left unchanged and Cursor never receives /skill.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2d8b64c. Configure here.

const effectiveCursorSettings = options?.resolveSettings
? yield* options.resolveSettings
: cursorSettings;
const skills = yield* discoverCursorSkills(cwd, options?.environment);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Session skill set goes stale

Low Severity

skillNames is captured once in startSession and reused for every sendTurn. Provider status can rediscover skills and refresh the composer picker without restarting the session, so a skill added on disk can appear in $ search while still being absent from ctx.skillNames, leaving the token untranslated until the session is recreated.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2d8b64c. Configure here.

@macroscopeapp

macroscopeapp Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces a new feature (filesystem skill discovery and skill picker integration) with new user-facing behavior and runtime text transformation. New capabilities warrant human review. A Medium severity finding about potential cwd mismatch between the skill picker and session also requires attention.

You can add or adjust custom eligibility rules. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant