From 82d7c797faccace88376505c1ae7d06cb84a549f Mon Sep 17 00:00:00 2001 From: Jason Ma Date: Tue, 24 Feb 2026 16:32:52 -0800 Subject: [PATCH] Default new plugins to ~/.cursor/plugins/local/ for immediate availability Co-authored-by: Cursor --- create-plugin/agents/plugin-architect.md | 2 +- create-plugin/rules/plugin-quality-gates.mdc | 1 + .../skills/create-plugin-scaffold/SKILL.md | 28 +++++++++++++++---- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/create-plugin/agents/plugin-architect.md b/create-plugin/agents/plugin-architect.md index 6cf08f2..de787f8 100644 --- a/create-plugin/agents/plugin-architect.md +++ b/create-plugin/agents/plugin-architect.md @@ -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//`. 4. Flag potential discoverability or metadata issues early. 5. Return a concrete implementation checklist. diff --git a/create-plugin/rules/plugin-quality-gates.mdc b/create-plugin/rules/plugin-quality-gates.mdc index 606e48d..fb50150 100644 --- a/create-plugin/rules/plugin-quality-gates.mdc +++ b/create-plugin/rules/plugin-quality-gates.mdc @@ -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//` by default so they are immediately available to Cursor. Only use a different location when the user explicitly requests it. diff --git a/create-plugin/skills/create-plugin-scaffold/SKILL.md b/create-plugin/skills/create-plugin-scaffold/SKILL.md index 7c9578c..f3986e8 100644 --- a/create-plugin/skills/create-plugin-scaffold/SKILL.md +++ b/create-plugin/skills/create-plugin-scaffold/SKILL.md @@ -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// +``` + +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//` + - 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.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//` 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