Skip to content

Commit 27c320e

Browse files
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

17 files changed

+1096
-50
lines changed

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Cannot skip in /next-task:
240240
- Use CHANGELOG.md for completion tracking (not summary files)
241241
- BEFORE starting → Read the relevant checklist (`checklists/*.md`)
242242
- BEFORE delivering any work, especially releases → Go through that checklist item by item
243-
- 3 platforms: Claude Code + OpenCode + Codex - ALL must work
243+
- 4 platforms: Claude Code + OpenCode + Codex + Cursor - ALL must work
244244
- Agent/Skill pattern: Agents invoke skills, skills have implementation
245245
- Create PRs for non-trivial changes
246246
</end-reminder>

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Added
1313

14+
- **Cursor platform support (#261)** — agentsys now installs to Cursor as a 4th platform alongside Claude Code, OpenCode, and Codex CLI. Use `agentsys --tool cursor` or `agentsys install <plugin> --tool cursor` to install. Skills are copied to `.cursor/skills/` (same SKILL.md format - no transform needed), commands to `.cursor/commands/` (light transform), and rules to `.cursor/rules/*.mdc` (MDC frontmatter). All content is project-scoped. Cursor v2.4+ natively supports the Agent Skills standard.
15+
1416
- **`/web-ctl` plugin** — New plugin for browser automation and web testing. Headless browser control via Playwright with persistent encrypted sessions, human-in-the-loop auth handoff (including CAPTCHA detection and checkpoint mode), anti-bot measures (webdriver spoofing, random delays), WSL detection with Windows Chrome fallback, and prompt injection defense via `[PAGE_CONTENT: ...]` delimiters. Includes `web-session` agent, `web-auth` and `web-browse` skills, and the `/web-ctl` command. Available at [agent-sh/web-ctl](https://github.com/agent-sh/web-ctl).
1517

1618
- **Plugin extraction to standalone repos (#250)** — All 13 plugins extracted from `plugins/` into standalone repos under the `agent-sh` org (`agent-sh/next-task`, `agent-sh/ship`, `agent-sh/deslop`, `agent-sh/audit-project`, `agent-sh/enhance`, `agent-sh/perf`, `agent-sh/drift-detect`, `agent-sh/sync-docs`, `agent-sh/repo-map`, `agent-sh/learn`, `agent-sh/consult`, `agent-sh/debate`, `agent-sh/agnix`). The `plugins/` directory has been removed from this repo. agentsys is now a marketplace + installer.

CLAUDE.md

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,202 @@ npm run validate # All validators
5454

5555
## References
5656

57+
<<<<<<< HEAD
58+
40 agents across 11 plugins. Key agents by model:
59+
60+
| Model | Agents | Use Case |
61+
|-------|--------|----------|
62+
| **opus** | planning, implementation, perf-orchestrator, debate-orchestrator | Complex reasoning, judgment |
63+
| **sonnet** | exploration, learn, task-discoverer, delivery-validator, ci-fixer, deslop-agent, reporters | Validation, pattern matching |
64+
| **haiku** | worktree-manager, ci-monitor, simple-fixer | Mechanical execution |
65+
66+
See [README.md](./README.md#command-details) and [docs/reference/AGENTS.md](./docs/reference/AGENTS.md) for full agent list.
67+
</agents>
68+
69+
<skills>
70+
## Skills
71+
72+
26 skills across plugins. Agents invoke skills for reusable implementation.
73+
74+
| Category | Key Skills |
75+
|----------|------------|
76+
| Workflow | `orchestrate-review`, `discover-tasks`, `validate-delivery` |
77+
| Enhancement | `enhance-*` (9 skills for plugins, agents, docs, prompts, hooks) |
78+
| Performance | `baseline`, `benchmark`, `profile`, `theory-tester` |
79+
| Cleanup | `deslop`, `sync-docs`, `drift-analysis`, `repo-mapping` |
80+
81+
See [README.md](./README.md#skills) for full skill list.
82+
</skills>
83+
84+
<state-files>
85+
## State Files
86+
87+
| File | Location | Purpose |
88+
|------|----------|---------|
89+
| `tasks.json` | `{stateDir}/` | Active task registry |
90+
| `flow.json` | `{stateDir}/` (worktree) | Workflow progress |
91+
| `preference.json` | `{stateDir}/sources/` | Cached task source |
92+
| `suppressions.json` | `~/.<claude\|opencode\|codex>/enhance/` | Auto-learned suppressions |
93+
94+
Platform-aware state directory:
95+
- Claude Code: `.claude/`
96+
- OpenCode: `config/.opencode/`
97+
- Codex: `.codex/`
98+
</state-files>
99+
100+
<workflow-agents>
101+
## Workflow Agents (MUST-CALL)
102+
103+
Cannot skip in /next-task:
104+
- `exploration-agent` → before planning
105+
- `planning-agent` → before implementation
106+
- **Phase 9 review loop** → MUST use orchestrate-review skill
107+
- `delivery-validator` → before sync-docs:sync-docs-agent
108+
- `sync-docs:sync-docs-agent` → before /ship
109+
</workflow-agents>
110+
111+
<pr-auto-review>
112+
## PR Auto-Review
113+
114+
4 reviewers: Copilot, Claude, Gemini, Codex
115+
116+
1. Wait 3 min after PR creation (initial auto-reviews)
117+
2. Claude-review may take 10+ min - wait for it
118+
3. Read ALL comments
119+
4. Address EVERY comment
120+
5. Iterate until zero unresolved
121+
</pr-auto-review>
122+
123+
<model-selection>
124+
## Model Selection
125+
126+
| Model | When to Use |
127+
|-------|-------------|
128+
| **Opus** | Complex reasoning, analysis where imperfection compounds |
129+
| **Sonnet** | Validation, pattern matching, most agents |
130+
| **Haiku** | Mechanical execution, no judgment needed |
131+
</model-selection>
132+
133+
<priorities>
134+
## Core Priorities
135+
136+
1. User DX (plugin users)
137+
2. Worry-free automation
138+
3. Token efficiency
139+
4. Quality output
140+
5. Simplicity
141+
</priorities>
142+
143+
<end-reminder>
144+
**REMEMBER**:
145+
- Use CHANGELOG.md for completion tracking (not summary files)
146+
- BEFORE starting → Read the relevant checklist (`checklists/*.md`)
147+
- BEFORE delivering any work, especially releases → Go through that checklist item by item
148+
- 4 platforms: Claude Code + OpenCode + Codex + Cursor - ALL must work
149+
- Agent/Skill pattern: Agents invoke skills, skills have implementation
150+
- Create PRs for non-trivial changes
151+
</end-reminder>
152+
153+
</project-memory>
154+
||||||| ddd8211
155+
40 agents across 11 plugins. Key agents by model:
156+
157+
| Model | Agents | Use Case |
158+
|-------|--------|----------|
159+
| **opus** | planning, implementation, perf-orchestrator, debate-orchestrator | Complex reasoning, judgment |
160+
| **sonnet** | exploration, learn, task-discoverer, delivery-validator, ci-fixer, deslop-agent, reporters | Validation, pattern matching |
161+
| **haiku** | worktree-manager, ci-monitor, simple-fixer | Mechanical execution |
162+
163+
See [README.md](./README.md#command-details) and [docs/reference/AGENTS.md](./docs/reference/AGENTS.md) for full agent list.
164+
</agents>
165+
166+
<skills>
167+
## Skills
168+
169+
26 skills across plugins. Agents invoke skills for reusable implementation.
170+
171+
| Category | Key Skills |
172+
|----------|------------|
173+
| Workflow | `orchestrate-review`, `discover-tasks`, `validate-delivery` |
174+
| Enhancement | `enhance-*` (9 skills for plugins, agents, docs, prompts, hooks) |
175+
| Performance | `baseline`, `benchmark`, `profile`, `theory-tester` |
176+
| Cleanup | `deslop`, `sync-docs`, `drift-analysis`, `repo-mapping` |
177+
178+
See [README.md](./README.md#skills) for full skill list.
179+
</skills>
180+
181+
<state-files>
182+
## State Files
183+
184+
| File | Location | Purpose |
185+
|------|----------|---------|
186+
| `tasks.json` | `{stateDir}/` | Active task registry |
187+
| `flow.json` | `{stateDir}/` (worktree) | Workflow progress |
188+
| `preference.json` | `{stateDir}/sources/` | Cached task source |
189+
| `suppressions.json` | `~/.<claude\|opencode\|codex>/enhance/` | Auto-learned suppressions |
190+
191+
Platform-aware state directory:
192+
- Claude Code: `.claude/`
193+
- OpenCode: `config/.opencode/`
194+
- Codex: `.codex/`
195+
</state-files>
196+
197+
<workflow-agents>
198+
## Workflow Agents (MUST-CALL)
199+
200+
Cannot skip in /next-task:
201+
- `exploration-agent` → before planning
202+
- `planning-agent` → before implementation
203+
- **Phase 9 review loop** → MUST use orchestrate-review skill
204+
- `delivery-validator` → before sync-docs:sync-docs-agent
205+
- `sync-docs:sync-docs-agent` → before /ship
206+
</workflow-agents>
207+
208+
<pr-auto-review>
209+
## PR Auto-Review
210+
211+
4 reviewers: Copilot, Claude, Gemini, Codex
212+
213+
1. Wait 3 min after PR creation (initial auto-reviews)
214+
2. Claude-review may take 10+ min - wait for it
215+
3. Read ALL comments
216+
4. Address EVERY comment
217+
5. Iterate until zero unresolved
218+
</pr-auto-review>
219+
220+
<model-selection>
221+
## Model Selection
222+
223+
| Model | When to Use |
224+
|-------|-------------|
225+
| **Opus** | Complex reasoning, analysis where imperfection compounds |
226+
| **Sonnet** | Validation, pattern matching, most agents |
227+
| **Haiku** | Mechanical execution, no judgment needed |
228+
</model-selection>
229+
230+
<priorities>
231+
## Core Priorities
232+
233+
1. User DX (plugin users)
234+
2. Worry-free automation
235+
3. Token efficiency
236+
4. Quality output
237+
5. Simplicity
238+
</priorities>
239+
240+
<end-reminder>
241+
**REMEMBER**:
242+
- Use CHANGELOG.md for completion tracking (not summary files)
243+
- BEFORE starting → Read the relevant checklist (`checklists/*.md`)
244+
- BEFORE delivering any work, especially releases → Go through that checklist item by item
245+
- 3 platforms: Claude Code + OpenCode + Codex - ALL must work
246+
- Agent/Skill pattern: Agents invoke skills, skills have implementation
247+
- Create PRs for non-trivial changes
248+
</end-reminder>
249+
250+
</project-memory>
251+
252+
## References
253+
57254
- Part of the [agentsys](https://github.com/agent-sh/agentsys) ecosystem
58255
- https://agentskills.io

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</p>
2222

2323
<p align="center">
24-
<b>14 plugins · 43 agents · 30 skills (across all repos) · 26k lines of lib code · 3,357 tests · 3 platforms</b><br>
24+
<b>14 plugins · 43 agents · 30 skills (across all repos) · 26k lines of lib code · 3,357 tests · 4 platforms</b><br>
2525
<em>Plugins distributed as standalone repos under <a href="https://github.com/agent-sh">agent-sh</a> org — agentsys is the marketplace &amp; installer</em>
2626
</p>
2727

@@ -30,7 +30,7 @@
3030
</p>
3131

3232
<p align="center">
33-
<b>Built for Claude Code · Codex CLI · OpenCode</b>
33+
<b>Built for Claude Code · Codex CLI · OpenCode · Cursor</b>
3434
</p>
3535

3636
<p align="center"><em>New skills, agents, and integrations ship constantly. Follow for real-time updates:</em></p>
@@ -51,7 +51,7 @@ An agent orchestration system — 14 plugins, 43 agents, and 30 skills that comp
5151

5252
Each agent has a single responsibility, a specific model assignment, and defined inputs/outputs. Pipelines enforce phase gates so agents can't skip steps. State persists across sessions so work survives interruptions.
5353

54-
The system runs on Claude Code, OpenCode, and Codex CLI. Install via the marketplace or the npm installer, and the plugins are fetched automatically from their repos.
54+
The system runs on Claude Code, OpenCode, Codex CLI, and Cursor. Install via the marketplace or the npm installer, and the plugins are fetched automatically from their repos.
5555

5656
---
5757

@@ -916,11 +916,12 @@ Every command works standalone. [`/deslop`](#deslop) cleans code without needing
916916
npm install -g agentsys && agentsys
917917
```
918918

919-
Interactive installer for Claude Code, OpenCode, and Codex CLI.
919+
Interactive installer for Claude Code, OpenCode, Codex CLI, and Cursor.
920920

921921
```bash
922922
# Non-interactive install
923923
agentsys --tool claude # Single tool
924+
agentsys --tool cursor # Cursor (project-scoped skills + commands)
924925
agentsys --tools "claude,opencode" # Multiple tools
925926
agentsys --development # Dev mode (bypasses marketplace)
926927
```
@@ -971,7 +972,7 @@ The system is built on research, not guesswork.
971972
- 1,818 tests passing
972973
- Drift-detect validated on 1,000+ repositories
973974
- E2E workflow testing across all commands
974-
- Cross-platform validation (Claude Code, OpenCode, Codex CLI)
975+
- Cross-platform validation (Claude Code, OpenCode, Codex CLI, Cursor)
975976

976977
**Methodology:**
977978
- `/perf` investigation phases based on recorded real performance investigation sessions

0 commit comments

Comments
 (0)