Merge pull request #28 from jaysunmah/main

Default new plugins to ~/.cursor/plugins/local/ for immediate availab…
This commit is contained in:
Jason
2026-02-25 14:54:48 -08:00
committed by GitHub
3 changed files with 24 additions and 7 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ Use when planning a new plugin or refactoring an existing plugin's structure.
1. Clarify plugin goal, users, and expected outcomes.
2. Recommend component mix (`rules`, `skills`, `agents`, `commands`, `hooks`, `mcpServers`) based on need.
3. Propose directory layout and manifest shape.
3. Propose directory layout and manifest shape. The default output location for new plugins is `~/.cursor/plugins/local/<plugin-name>/`.
4. Flag potential discoverability or metadata issues early.
5. Return a concrete implementation checklist.
@@ -12,3 +12,4 @@ When creating or editing Cursor plugins:
3. Match declared component paths to real files and folders.
4. Include YAML frontmatter for rules, skills, agents, and commands with required metadata.
5. Keep plugin scope focused and document installation and usage in `README.md`.
6. Save new plugins to `~/.cursor/plugins/local/<plugin-name>/` by default so they are immediately available to Cursor. Only use a different location when the user explicitly requests it.
@@ -16,28 +16,42 @@ You need to create a new Cursor plugin from scratch and make it ready for local
- Component set to include (`rules`, `skills`, `agents`, `commands`, `hooks`, `mcpServers`)
- Repository style (`single-plugin` or `multi-plugin marketplace`)
## Output Location
By default, create the plugin inside the user's local plugin directory:
```
~/.cursor/plugins/local/<plugin-name>/
```
This path makes the plugin immediately available to Cursor without any install step. If the user explicitly asks to create the plugin elsewhere (e.g. inside an existing repo or a specific directory), respect that choice instead.
## Workflow
1. Validate plugin name format: lowercase kebab-case, starts and ends with an alphanumeric character.
2. Create base files:
2. Determine the target directory:
- Default: `~/.cursor/plugins/local/<plugin-name>/`
- Override: use the path the user specifies, if any.
- Create the directory (and parents) if it does not exist.
3. Create base files inside the target directory:
- `.cursor-plugin/plugin.json`
- `README.md`
- `LICENSE`
- optional `CHANGELOG.md`
3. Populate `plugin.json`:
4. Populate `plugin.json`:
- Required: `name`
- Recommended: `version`, `description`, `author`, `license`, `keywords`
- Add explicit component paths only when non-default discovery is needed.
4. Create component files with valid frontmatter:
5. Create component files with valid frontmatter:
- Rules: `.mdc` with `description`, `alwaysApply`, optional `globs`
- Skills: `skills/<skill-name>/SKILL.md` with `name`, `description`
- Agents: `agents/*.md` with `name`, `description`
- Commands: `commands/*.(md|txt)` with `name`, `description`
5. If repository uses `.cursor-plugin/marketplace.json`, add plugin entry:
6. If repository uses `.cursor-plugin/marketplace.json`, add plugin entry:
- `name`
- `source`
- optional metadata (`description`, `keywords`, `category`, `tags`)
6. Ensure all manifest paths are relative, valid, and do not use absolute paths or parent traversal.
7. Ensure all manifest paths are relative, valid, and do not use absolute paths or parent traversal.
## Guardrails
@@ -45,10 +59,12 @@ You need to create a new Cursor plugin from scratch and make it ready for local
- Prefer concise, actionable skill and rule text over long prose.
- Do not reference files that do not exist.
- Use folder discovery defaults unless custom paths are required.
- Always save to `~/.cursor/plugins/local/<plugin-name>/` unless the user provides a different path.
## Output
- Created file tree for the plugin
- Created file tree for the plugin (with full path to the output directory)
- Final `plugin.json`
- Marketplace entry (if applicable)
- Short validation report of required fields and component metadata
- Confirmation that the plugin is saved under `~/.cursor/plugins/local/` and ready for use