Cursor Plugins: Build a Team Bundle in 12 Steps, 80 Min A November 22 review of the Cursor editor details how Cursor plugins bundle rules, skills, subagents, slash commands, hooks and MCP servers into a single Git repository so teams can install identical guardrails on every developer machine. The tutorial walks through building a plugin called team-guardrails in 12 steps over 80 minutes, containing two rules, one skill, one subagent, one slash command, three hooks and a small MCP server, plus a validator and CI job to block broken bundles. The piece notes Cursor loads two plugin formats — the open Agent Plugins standard with plugin.json at the root, and Cursor's own .cursor-plugin/plugin.json, which adds rules, agents, commands, hooks and variables — and that secrets stay out of the repo because the manifest declares variable names supplied by an admin in the dashboard. Cursor’s setup now centers on project rules, hooks, MCP servers, plugins, skills, subagents, commands and AGENTS.md , according to a November 22 review https://codekithub.com/en/reviews/cursor/ of the editor. A Cursor plugin is the piece that packs most of those items into one Git repository, so a team can install the same guardrails on every laptop instead of copying a .cursor folder between repos and watching the copies drift. Drift is the real cost. One repo gets the updated secrets rule, three others keep the old one, and nobody can say which hook version blocked a bad command last week. Cursor’s plugins bundle MCP servers, skills, subagents, rules and hooks, which is what lets you ship them as one unit. If your instructions still live in another assistant, the Copilot to Cursor rules migration https://shattered.io/cursor-rules-migrate-github-copilot-2026/ gets the raw material into the right format first. Then you package it here. The plugin you will build is called team-guardrails . It carries two rules, one skill, one subagent, one slash command, three hooks a shell guard and two audit hooks , and a small MCP server, plus a validator and a CI job that stop a broken bundle from ever reaching your teammates. Don't miss new tech stories on Google Add Shattered once in the Google app and our stories show up in your news suggestions. Add now https://www.google.com/preferences/source?hl=en&q=https%3A%2F%2Fshattered.io%2F What Cursor Plugins Bundle and Why a Team Should Ship One A plugin is a directory with a manifest and a set of component folders. Cursor loads plugins in two formats, and the manifest location tells it which one it is looking at. The open Agent Plugins standard uses a plugin.json at the plugin root and covers skills and MCP servers. Cursor’s own format uses .cursor-plugin/plugin.json and adds rules, agents, commands, hooks and variables. A plugin that follows the open specification loads in Cursor too, which matters if part of your team also uses another agent. This tutorial uses the Cursor format because the guardrails need rules and hooks, and the open standard does not carry those. The table shows what each component is, where Cursor looks for it when the manifest does not name a path, and what it costs you at runtime. | Component | Default location | How Cursor discovers it | Runtime behavior | |---|---|---|---| | Rules | rules/ | Every .md , .mdc or .markdown file | Persistent guidance, always on or scoped by globs | | Skills | skills/ | Each subdirectory that holds a SKILL.md | Loaded on demand when the task matches the description | | Agents | agents/ | Every .md , .mdc or .markdown file | Custom subagent definitions with their own prompt | | Commands | commands/ | Every .md , .mdc , .markdown or .txt file | Slash-style actions the agent follows step by step | | Hooks | hooks/hooks.json | Parsed for hook event names | Scripts that observe or gate agent actions | | MCP servers | mcp.json at the plugin root | Parsed for server entries | External tools, shown with a plugin- prefix in approval prompts | Two rules in that table are easy to miss. First, if the manifest names a path for a component, that path replaces folder discovery for the component entirely, and the default folder is no longer scanned. Second, the plugin only declares what it needs. Secrets never live in the repo, because the manifest declares variable names and an admin supplies the values in the dashboard. The practical payoff is governance. A team can mark a plugin as required, refresh it from a branch, and keep a single reviewed source for the MCP servers developers are allowed to run. If MCP sprawl is your main worry, pair this build with the checks in the Cursor MCP server audit https://shattered.io/audit-cursor-mcp-servers-allowlist-hooks-12-steps-2026/ , which inventories what developers already have configured before you replace it with a vetted bundle. For a sense of what a finished plugin looks like, the Runlayer plugin in Cursor’s official marketplace is labeled verified by Cursor. Its listing shows two rules mcp-governance and secrets-hygiene , three hooks sessionStart , beforeMCPExecution and beforeReadFile , two commands and three skills. The shape is the same as the project here, with a security focus. Prerequisites and Project Layout for Cursor Plugins Nothing here needs a paid toolchain beyond the editor, and the validator uses only the Python standard library. Gather these before you start: - Cursor desktop app , a current build that shows a Plugins section under Customize. The November 3 release notes carry a date but no desktop version number, so check that the section exists instead of matching a version. - Python 3.10 or newer on your PATH as python3 . The examples were run on 3.12.3. - Git , any recent release. The examples were run on 2.43.0. - A GitHub repository you can push to. Auto Refresh needs the Cursor GitHub App installed on it. Cursor also imports from GitLab, Bitbucket and Azure DevOps, but its documentation describes Auto Refresh for GitHub imports, so use manual Refresh elsewhere. - A Teams or Enterprise plan if you want a private team marketplace. Without one you can still build and validate everything locally, and you can submit the plugin to the public marketplace for review. - About 80 minutes . Steps 1 to 6 take roughly 30 minutes, hooks and MCP another 30, and the marketplace and CI work the rest. The finished repository has 14 files. Keep this map open while you work, because several steps depend on exact paths. acme-cursor-plugins/ ├── .cursor-plugin/ │ └── marketplace.json ├── .github/workflows/validate.yml ├── tools/validate plugin.py └── team-guardrails/ ├── .cursor-plugin/plugin.json ├── rules/ │ ├── secrets-hygiene.mdc │ └── typescript-style.mdc ├── skills/release-notes/SKILL.md ├── agents/security-reviewer.md ├── commands/preflight.md ├── hooks/hooks.json ├── scripts/ │ ├── shell guard.py │ └── audit log.py ├── mcp.json └── mcp/team facts server.py One layout choice deserves a sentence. The repository root holds a marketplace manifest and the plugin sits one level down. That costs two extra lines now and saves a migration later, because adding a second plugin becomes a new folder and a new entry instead of a restructure. Steps 1 and 2: Create the Repository and Write the Manifest Step 1: Create the repo skeleton and pick a valid name Create the folders first so every later file has a home. The plugin name matters more than it looks. Cursor requires lowercase kebab-case made of alphanumerics, hyphens and periods, and the name must start and end with an alphanumeric character. team-guardrails passes. Team Guardrails does not, and the validator in Step 10 will say so. mkdir acme-cursor-plugins && cd acme-cursor-plugins git init mkdir -p .cursor-plugin tools .github/workflows mkdir -p team-guardrails/{.cursor-plugin,rules,skills/release-notes,agents,commands,hooks,scripts,mcp} Expected result: git init reports an empty repository and ls team-guardrails lists eight entries, including the hidden .cursor-plugin folder. Step 2: Write the plugin manifest and declare variables The manifest has one required field, name . Everything else is optional, but a marketplace reviewer expects a clear description, and a version string lets you tell teammates exactly what changed. The variables block is a JSON Schema fragment. It declares the names of settings an admin can fill in later, and it never holds values you would not publish. { "name": "team-guardrails", "version": "1.0.0", "description": "Shared rules, a shell guard hook, a security reviewer subagent and a team conventions MCP server", "author": { "name": "Acme Platform Team", "email": " email protected " }, "license": "MIT", "keywords": "guardrails", "security", "conventions" , "variables": { "type": "object", "properties": { "TEAM NAME": { "type": "string", "title": "Team name", "description": "Shown in answers from the team-facts MCP server", "default": "platform" } } } } Only a fixed set of JSON Schema keywords is accepted in that block: type , title , description , default , enum , const , properties , required , items and common length and numeric constraints. The top level has to be an object with properties . We declare a single non-secret variable, TEAM NAME , with a default, so the plugin works with zero configuration. Step 9 shows how a required secret variable would look. Notice what the manifest does not contain. There are no rules , skills or hooks fields. That is deliberate. With no explicit paths, Cursor falls back to folder discovery, which is the behavior you want until you have a reason to relocate a component. Steps 3 and 4: Ship Rules and a Skill That Load When Needed Step 3: Add two rules with different scopes Rules are .mdc files with YAML frontmatter. Each one needs a description . The alwaysApply flag decides whether the rule rides along on every request, and globs scopes it to matching files. For the frontmatter fields and glob behavior in more depth, the Cursor rules tutorial with a glob test harness https://shattered.io/cursor-rules-tutorial-mdc-globs-test-harness-12-steps-2026/ walks through a harness that proves each rule fires, and FreakyJolly’s rules guide https://freakyjolly.com/cursor-rules-guide/ covers the .mdc format and the AGENTS.md fallback. The first rule is always on, because a leaked credential is bad in any file: --- description: Keep credentials out of prompts, commits and generated code alwaysApply: true --- Secrets hygiene - Never read or print the contents of .env , .env. or any file under ~/.ssh . - Reference secrets by environment variable name only, for example process.env.API TOKEN . - If a command output contains something that looks like a token, stop and tell the user instead of repeating it. - Never paste a real key into a test fixture. Use test-key-0000 style placeholders. The second rule applies only when the agent touches TypeScript: --- description: TypeScript conventions for the platform monorepo globs: " / .ts", " / .tsx" alwaysApply: false --- TypeScript style - Prefer const . Use let only when the variable is reassigned. Never use var . - No any . Use unknown and narrow it, or write a type. - Export types from types.ts next to the module, not from the implementation file. - Throw Error subclasses from src/errors/ , never bare strings. The split is the point. An always-on rule costs context on every request, so keep that tier small and put language or folder conventions behind globs. Cursor recommends keeping a single rule under 500 lines and splitting larger instructions into composable files, and the validator enforces that ceiling. Cursor’s documentation reportedly describes rules as shaping Agent behavior, not Tab completions, so do not expect these two files to change inline suggestions. Once the rules exist, run them through a linter before you ship. The Cursor rules linter https://shattered.io/cursor-rules-linter-agents-md-cursorignore-12-steps-2026/ catches dead globs, duplicate instructions and conflicts with AGENTS.md , which is cheaper than finding out from a confused agent. Step 4: Add an on-demand skill A skill lives in its own folder under skills/ and must contain a SKILL.md with a name and a description . The description does the routing. Cursor shows it to the agent, and the agent pulls in the full body only when the task matches. That makes skills the right home for long procedures that would be wasteful as always-on rules. --- name: release-notes description: Draft customer-facing release notes from merged pull requests. Use when the user asks for release notes, a changelog entry or a ship summary. --- Release notes When to use - The user asks for release notes or a changelog entry. - A release branch is about to be tagged. Instructions 1. Run git log --merges --pretty=format:'%s'