Commit 27c320e
authored
feat: Cursor platform support - skills, commands, and rules (#269)
* fix: align marketplace.json with Claude Code plugin schema
Use object-form source {"source": "url", "url": "..."} instead of bare
URL strings, and remove unrecognized "requires"/"core" keys that cause
schema validation errors when loading the marketplace.
* feat(cross-platform): add Cursor platform constants
Add PLATFORMS.CURSOR, STATE_DIRS entry, detectPlatform branch,
and INSTRUCTION_FILES entry for Cursor support.
* feat(adapter-transforms): add transformForCursor function
Convert plugin content to Cursor MDC rule format with description,
globs, and alwaysApply frontmatter. Strips Claude-specific syntax
(Task calls, require statements, plugin namespacing) and replaces
PLUGIN_ROOT paths.
* feat(discovery): add getCursorRuleMappings function
Returns tuples with agentsys-prefixed rule names, plugin info,
description, type, and globs for Cursor MDC rule generation.
* feat(cli): wire Cursor platform into installer
Add 'cursor' to VALID_TOOLS, detectInstalledPlatforms, interactive
prompt, install subcommand, and main install flow. Add installForCursor
function that writes .mdc rules to .cursor/rules/ using discovery
mappings and the transformForCursor pipeline. Update help text.
* docs(checklists): add Cursor column to cross-platform compatibility
Add Cursor to all reference tables, add MDC rule format section,
installation location, and testing checklist entry.
* test: add Cursor platform tests
Add transformForCursor tests (frontmatter, description escaping,
PLUGIN_ROOT replacement, require stripping, plugin namespacing,
Task call stripping). Update VALID_TOOLS, PLATFORMS, STATE_DIRS,
and detectPlatform tests for Cursor.
* test: add missing Cursor test coverage
* fix: remove unused type destructuring in installForCursor
* fix: address review findings - YAML injection, path traversal, test gaps
* fix: remove unused ruleName destructuring in transformForCursor
* fix: escape $ patterns in replace and handle nested braces in Task regex
* feat(cursor): rewrite to install skills, commands, and rules separately
Cursor v2.4+ natively supports the Agent Skills standard (SKILL.md).
Instead of converting everything to .mdc rules, install content to
the correct locations:
- Skills -> .cursor/skills/<name>/SKILL.md (minimal transform)
- Commands -> .cursor/commands/<name>.md (light transform)
- Rules -> .cursor/rules/*.mdc (reserved for coding standards)
* fix: path traversal in skills, safer platform detection, scoped cleanup
- Validate skill directory names against [a-zA-Z0-9_-]+ to prevent path traversal
- Detect Cursor only when .cursor/rules, commands, or skills exist (not bare .cursor/)
- Scope command cleanup to only remove known command files, preserving user files
- Default description to empty string in transformRuleForCursor
- Add PLUGIN_ROOT substitution integration tests for skills and commands
* fix: scope skill cleanup to known names, preserve user-created skills
* docs: update changelog and readme for revised Cursor support
* docs: sync all documentation for 4-platform support
* fix: Restore marketplace.json plugin format and dependencies
Addresses Copilot review comments:
- Restore 'source' field from object format back to string (required by fetchPlugin function)
- Restore 'requires' array for each plugin (required for transitive dependency resolution)
- Restore 'core' version field for all plugins
These fields are essential for the installer to work correctly. The incorrect changes would have broken:
1. Plugin fetching (fetchPlugin expects string URL)
2. Dependency resolution (resolvePluginDeps checks plugin.requires)
3. Core compatibility validation
Reverts marketplace.json to match main branch format while preserving Cursor platform support.1 parent 061c2b0 commit 27c320e
File tree
17 files changed
+1096
-50
lines changed- __tests__
- bin
- checklists
- docs
- lib
- cross-platform
- discovery
17 files changed
+1096
-50
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | | - | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
57 | 254 | | |
58 | 255 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
919 | | - | |
| 919 | + | |
920 | 920 | | |
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
| 924 | + | |
924 | 925 | | |
925 | 926 | | |
926 | 927 | | |
| |||
971 | 972 | | |
972 | 973 | | |
973 | 974 | | |
974 | | - | |
| 975 | + | |
975 | 976 | | |
976 | 977 | | |
977 | 978 | | |
| |||
0 commit comments