|
| 1 | +# Cursor plugin template |
| 2 | + |
| 3 | +Build and publish Cursor Marketplace plugins from a single repo. |
| 4 | + |
| 5 | +Two starter plugins are included: |
| 6 | + |
| 7 | +- **starter-simple**: rules and skills only |
| 8 | +- **starter-advanced**: rules, skills, agents, commands, hooks, MCP, and scripts |
| 9 | + |
| 10 | +## Repository layout |
| 11 | + |
| 12 | +```text |
| 13 | +. |
| 14 | +├── .cursor-plugin/ |
| 15 | +│ └── marketplace.json |
| 16 | +├── plugins/ |
| 17 | +│ ├── starter-simple/ |
| 18 | +│ │ ├── .cursor-plugin/plugin.json |
| 19 | +│ │ ├── rules/ |
| 20 | +│ │ ├── skills/ |
| 21 | +│ │ └── assets/ |
| 22 | +│ └── starter-advanced/ |
| 23 | +│ ├── .cursor-plugin/plugin.json |
| 24 | +│ ├── rules/ |
| 25 | +│ ├── skills/ |
| 26 | +│ ├── agents/ |
| 27 | +│ ├── commands/ |
| 28 | +│ ├── hooks/ |
| 29 | +│ ├── mcp.json |
| 30 | +│ ├── scripts/ |
| 31 | +│ └── assets/ |
| 32 | +├── docs/add-a-plugin.md |
| 33 | +└── scripts/validate-template.mjs |
| 34 | +``` |
| 35 | + |
| 36 | +## Use this template |
| 37 | + |
| 38 | +1. Click **Use this template** > **Create a new repository** on GitHub. |
| 39 | +2. Choose owner, repo name, and visibility. |
| 40 | +3. Create the repository. Default branch only is recommended. |
| 41 | +4. Clone and customize. |
| 42 | + |
| 43 | +## Quick customization |
| 44 | + |
| 45 | +Update these files first: |
| 46 | + |
| 47 | +1. `.cursor-plugin/marketplace.json` |
| 48 | + - Set marketplace `name`, `owner`, and `metadata`. |
| 49 | + - `metadata.pluginRoot` is optional. Remove it if plugin `source` paths are explicit. |
| 50 | +2. `plugins/*/.cursor-plugin/plugin.json` |
| 51 | + - Rename `name` to a unique lowercase kebab-case value. |
| 52 | + - Replace `author`, `description`, `keywords`, `license`, and `version`. |
| 53 | + - Keep logo paths relative (e.g. `assets/logo.svg`). |
| 54 | +3. Replace placeholder content: |
| 55 | + - `plugins/*/assets/logo.svg` |
| 56 | + - Rules, skills, agents, commands, hooks, and scripts |
| 57 | + |
| 58 | +## Single plugin vs multi-plugin |
| 59 | + |
| 60 | +Use **multi-plugin** (current setup) when one repository publishes several related plugins. |
| 61 | + |
| 62 | +For a **single plugin**: |
| 63 | + |
| 64 | +1. Move your plugin folder contents to the repository root. |
| 65 | +2. Keep one `.cursor-plugin/plugin.json` at the root plugin directory. |
| 66 | +3. Remove `.cursor-plugin/marketplace.json`. |
| 67 | +4. Update all component paths accordingly. |
| 68 | + |
| 69 | +## Local validation |
| 70 | + |
| 71 | +```bash |
| 72 | +node scripts/validate-template.mjs |
| 73 | +``` |
| 74 | + |
| 75 | +This checks: |
| 76 | + |
| 77 | +- Marketplace and plugin manifest presence |
| 78 | +- Plugin naming format (kebab-case) |
| 79 | +- Referenced file paths in manifests |
| 80 | +- Frontmatter metadata on rules, skills, agents, and commands |
| 81 | + |
| 82 | +## Submission checklist |
| 83 | + |
| 84 | +- Each plugin has a valid `.cursor-plugin/plugin.json`. |
| 85 | +- Plugin names are unique, lowercase, and kebab-case. |
| 86 | +- `.cursor-plugin/marketplace.json` entries map to real plugin folders. |
| 87 | +- All frontmatter metadata is present in rule, skill, agent, and command files. |
| 88 | +- Logos are committed and referenced with relative paths. |
| 89 | +- `node scripts/validate-template.mjs` passes. |
| 90 | +- README and plugin docs describe behavior and required configuration. |
| 91 | +- Repository link is ready for submission to the Cursor team (Slack or `kniparko@anysphere.com`). |
| 92 | + |
| 93 | +## Next steps |
| 94 | + |
| 95 | +- Add or remove plugin folders under `plugins/`. |
| 96 | +- Follow `docs/add-a-plugin.md` for adding a new plugin entry. |
| 97 | + |
| 98 | +**Create a new repo from this template:** [Use this template](https://github.com/cursor/plugin-template/generate) or click **Use this template** on the repo page. |
0 commit comments