Cursor has no reliable global rules file. cursor-prime does not ask you to paste one. The current release, v0.4.1, is a local plugin. Install it once. Its rules load in every project.
install.ps1 writes that plugin to ~/.cursor/plugins/local/cursor-prime/. The rules set alwaysApply: true. Cursor loads them in every workspace. If an older cursor-prime rule is still pasted under Customize → Rules → User, delete it. A paste plus the plugin loads the rules twice.
You use it by typing sentences. Each slash name is the same skill. You do not have to type the slash.
On a non-trivial task the agent prints a markdown plan headed ## Plan and waits for the literal word GO. The task ends with a Delta Report of what changed.
install.ps1 does not reload Cursor. The open window keeps the plugin list it had at launch. Run Developer: Reload Window, then open a new chat, before you try the rules. A chat that is already open does not gain them.
The rules start from Andrej Karpathy's LLM coding guidance. Later versions kept only the pieces that fit from other skill repos. When the Cloudflare security-audit skill is missing, install.ps1 installs it. It runs only when you ask for a security audit. Uninstall leaves that skill in place. See Karpathy is the starting point.
- On Windows, clone this repo and run
.\install.ps1. That installs the plugin.
Run Developer: Reload Window. Cursor reads plugins when the window loads. The installer does not do this for you. Do it even when you have nothing to delete.
Open a new chat. The one already open started before the rules loaded. It stays on the old context. Try the rules there.
- If a cursor-prime rule is still pasted under Customize → Rules → User, delete it. A paste plus the plugin loads the rules twice.
- In the new chat, type a sentence such as "Plan this first." You do not type
/plan. Pass: a heading## Plan, then a wait forGO.
Pasting text into User Rules was the old delivery. The plugin is the one Cursor loads in every project.
- Every project, one install. The plugin at
~/.cursor/plugins/local/cursor-prime/carries the rules and one skill per command. They are on after you reload the window and open a new chat. - The paste is the leftover. Delete a cursor-prime rule still sitting under Customize → Rules → User. The plugin is the copy that stays.
- Save credits. The agent plans before it edits, so a wrong direction stops at
GO, before tokens go into the wrong implementation. - A report you can check. Every non-trivial task ends with a Delta Report: files changed, anything outside the plan, and the verify output.
- Handoff-ready, tiered. The same plugin includes maintainability rules, so new code is documented for the next human and the next AI. A one-line fix stays cheap.
- A loop with a cap. After
GO, fix and re-run the verifier (test, lint, or build) up to the iteration cap./iterateis the same loop. It stays in this session. It does not run overnight. - Edits stay on the request. Simplicity first, a verifiable goal, and a short report. The agent does not wander off into a refactor you did not ask for.
- Submission-ready (opt-in). Templates for Handover / Reflection / Appendix live under
payload/submission/. Not auto-created; use/submission-initor ask explicitly. Day-to-day: prefer inline why-comments. - Uninstall.
uninstall.ps1removes the files it listed in the manifest, including the plugin, and restorescore.excludesfile. Delete a leftover pasted rule yourself. The Cloudflare security-audit skill stays; it is not in the manifest.
cursor-prime/
├── install.ps1 / uninstall.ps1
├── payload/ # ONLY originals
│ ├── behavior.mdc / maintainability.mdc
│ ├── gitignore_global
│ ├── commands/ # sources for the skills; not copied to ~/.cursor/commands/
│ ├── plugin/ # plugin.json, skill descriptions, and the wish skill
│ ├── hooks/ # optional -WithHooks
│ └── submission/ # Handover, Reflection, Appendix
├── tests/check.ps1 # repo consistency checks (not installed)
├── README.md / AGENTS.md / LICENSE
Deploy: git clone → install.ps1. That builds the plugin from payload/. If you pasted the rules before, delete that paste.
Cursor has no reliable global rules file. That is a known limitation. A local plugin's always-on rule does load in every project. cursor-prime uses that:
| Mechanism | Scope | Set by | Reliability |
|---|---|---|---|
Local plugin ~/.cursor/plugins/local/cursor-prime/ |
global | install.ps1 |
✅ rules load in every project |
| Slash commands, one skill each | global | install.ps1 |
✅ the skill is also the /command |
~/.gitignore_global |
global | install.ps1 |
✅ reliable |
Security audit skill ~/.agents/skills/security-audit/ |
global | install.ps1 via npx when missing |
✅ on demand (does not run an audit by itself) |
Recommended setup: git clone → run install.ps1 once → Developer: Reload Window → open a new chat. If a cursor-prime rule is still pasted under Customize → Rules → User, delete it, or the rules load twice. The installer also ensures the global security-audit skill. Optional: say you want the Handover / Reflection / Appendix trio.
With the plugin installed you get:
Discipline (what the AI is told not to do):
- Plan Gate — the agent outputs a markdown plan headed
## Planand waits for yourGObefore writing code on non-trivial tasks. The plan includes up to 3 Stretch lines; anything taggedofferedwaits for you to name it. - Wish — "Polish the whole project", "look at the whole approach again", or "find every edge and hole" runs a read-only audit. You pick which items become a plan. Nothing is rewritten until you say
GO. - Sentences, not slashes. "Hand this over" runs handoff. "Why is this wrong" runs debug. "Polish the whole project" runs the wish audit and waits for you to pick items. It does not rewrite the project. The slash names still work. You do not need them. See You type sentences.
- Design check (optional) — for fuzzy / greenfield / large work, refine design in short chunks (optional grill) before the implementation plan.
- Shared language (optional) — long-lived repos may keep
CONTEXT.mdfor domain jargon;AGENTS.md/@projectstay layout and stack. - Task class — trivial tasks skip ceremony; workflow-scale tasks need a bite-sized task breakdown with per-step verify.
- Explore cheap — search-first, read-minimal; after
GO, the pre-flight file list bounds reads and writes. - Surgical Changes — don't touch adjacent code, comments, or formatting; every changed line traces to the request.
- Simplicity / least new code — from ponytail, the ladder only: reuse this codebase, then the platform, then an installed dependency, then one readable line, then the minimum that works. Do not cut trust-boundary validation, data-loss handling, security, accessibility, or anything asked for. A small test only when the project already has tests. Ponytail's hooks and
/ponytailcommands are not installed. - Systematic debugging — reproduce → minimise → hypothesize → evidence → fix → regression check (also
/debug).
Honest reporting (what the AI is told to produce):
- Pre-flight File List — every file the plan will touch is named; touching anything else mid-task forces a stop.
- Verify Receipt — exact command and exact output, not "tested and works".
- Hard verifier — run plan verify commands before declaring done; no self-grade when test/lint/build exists.
- Loop discipline (light loop) — after
GO, iterate fix → verify until PASS or max iterations (default 8); credit guard; loop-worthiness check on workflow-scale tasks. - Edge Case Checklist — empty / malformed / large input behavior for every public function or CLI.
- Delta Report — at the end of every non-trivial task.
- Session handoff —
progress.mdHandoff and Loop State when pausing mid-task or mid-loop.
Cursor extras:
/plan— force the Plan Gate on the current request./verify— on-demand audit against the plan and pre-flight list./iterate— afterGO, fix-and-retry until verify passes or iteration cap. The same failure twice becomes a check (test, lint, types, or one line inAGENTS.md) before another reminder./debug— systematic debugging: reproduce → minimise → evidence → fix → regression check./grill— alignment grilling before planning; optionalCONTEXT.mdterms./handoff— raise the bar to tier D: public API docs, module headers, truthfulAGENTS.md/README/@project./delta— produce a Delta Report for work just done./submission-init— opt-in scaffold forsubmission/Handover / Reflection / Appendix (off by default).- Security audit skill — from cloudflare/security-audit-skill.
install.ps1runsnpxwhen both~/.agents/skills/security-audit/SKILL.mdand~/.cursor/skills/security-audit/SKILL.mdare missing. The CLI writes the first path; Cursor loads it for every local project. Ask for a security audit to run it. The installer does not audit the repo, andpayload/does not contain the skill. - Optional hooks —
-WithHookson install asks before destructive shell commands (off by default). The guard is merged into an existing~/.cursor/hooks.json, so other tools' hooks stay. When it matches, Cursor shows its normal run approval; the guard's message text is not displayed. - Global gitignore —
__pycache__,node_modules,.venv, IDE/OS noise, Cursor caches.
The normal way in is a sentence. The slash name is the same skill, for people who want to type it. A fresh chat after reload is what loads the plugin. Typing the slash in an old chat does not.
| You can say | Same skill |
|---|---|
| Plan this first. Don't edit yet. | /plan |
| Did this drift from the plan? | /verify |
| Keep fixing until the tests pass. | /iterate |
| Why is this wrong? | /debug |
| Help me think this through before we plan. | /grill |
| Hand this over so someone else can pick it up. | /handoff |
| What changed? | /delta |
| Write the handover, reflection, and appendix. | /submission-init |
| Polish the whole project. Find every edge and hole. | wish (read-only until you pick items and say GO) |
The base is Andrej Karpathy's LLM coding guidance: surgical changes, simplicity first, and verifiable goals. Later versions read other skill repos and kept only the pieces that fit. Those repos were not vendored. The changelog records each version.
Kept
- Karpathy — the base. Surgical changes, simplicity first, verifiable goals. Plan Gate, the Delta Report, and the rest of the discipline rules grow from that.
- ponytail — the least-new-code ladder only. Reuse this codebase, then the platform, then an installed dependency, then one readable line, then the minimum that works.
- mattpocock/skills — ideas only: optional
/grill, optionalCONTEXT.md, and a richer debug loop. - obra/superpowers — ideas only: optional design check, workflow-scale task breakdown, systematic debugging, and
/debug. - cloudflare/security-audit-skill —
npxinstall when the skill is missing. It runs only when you ask. Uninstall leaves it. - pstack — six sentences, copied into the always-on plugin rules in v0.4.1. They apply in ordinary conversation. You do not install pstack, and you do not type its slash names.
- Docs, comments, and commit messages use the plain word. One idea per sentence. Name the mechanism or the number. A step names the command and what the reader should see. A step does not say simply, easy, or quickly.
- Collapse a wrapper that has one caller. A reader should see where a value comes from and what can change it.
- Replacing an internal API migrates the callers and deletes the old API in the same change. No compatibility wrapper.
- When the project already has tests, assert what a caller can observe. A test stays green when only the internals change. This does not turn TDD on by default.
- External input is validated at the boundary and turned into a type the rest of the code can trust. Do not leave an illegal state representable.
- A reported number says what it measured and what limits it. Skip this when the task did not measure anything.
Left out
- ponytail hooks and
/ponytailcommands. - mandatory TDD, the triage, wayfinder, and issue-tracker suites, and full skills.sh vendoring.
- default multi-hour subagent runs and per-task git worktrees.
- the pstack plugin itself:
/poteto-modeand the rest of its slash-only skills. The six sentences above are the part that stays on without a slash.
- Windows 10 / 11
- PowerShell 5.1+ (built-in)
- Git
- Node.js with
npxon PATH (the installer fails if it cannot install the security-audit skill) - Cursor installed
- macOS / Linux: no installer is shipped yet (
install.ps1is Windows-only; see AGENTS.md to port it)
Clone the repo, open it in Cursor (or any AI IDE/agent), and paste this prompt:
Read AGENTS.md in this repo and install cursor-prime by following its
"Install cursor-prime (agent procedure)" section. Give a plan first and wait
for GO, then verify. Tell me to run Developer: Reload Window and open a new
chat. If a cursor-prime rule is still pasted under Customize → Rules → User,
tell me to delete it.
git clone https://github.com/xnoahwang/cursor-prime.git $env:USERPROFILE\cursor-prime
cd $env:USERPROFILE\cursor-prime
powershell -ExecutionPolicy Bypass -File .\install.ps1This installs the local plugin (rules, and one skill per command, which is also the slash command), the wish skill, and the global gitignore. It does not write ~/.cursor/commands/. A backup of the rule text stays at ~/.cursor-prime-user-rules.txt. If the security-audit skill is missing, the installer adds it. The skill runs only when you ask for a security audit, and uninstall leaves it in place.
Reinstall: .\install.ps1 -ForceOptional hooks: .\install.ps1 -Force -WithHooks
Required after every install. Run Developer: Reload Window. Then open a new chat. The window that ran the installer still has the old plugin list. A chat that is already open does not gain the new rules.
If you pasted a cursor-prime rule before: open Customize → Rules → User and delete it. The plugin loads the rules, so a pasted copy would load them twice.
Repo checks (read-only, no install): powershell -NoProfile -ExecutionPolicy Bypass -File .\tests\check.ps1. Pass ends with All checks passed.
After install, run Developer: Reload Window and start a new chat. Try the rules in that new chat. The chat you had open during install is the wrong place to judge them.
Ask for something that clearly needs code. Pass: a heading ## Plan, then a wait for GO. Reply GO → implement + Delta Report.
Ask a read-only question. Pass: direct answer, no wait for GO.
| Symptom | Likely cause |
|---|---|
Code before GO on non-trivial tasks |
The plugin rule is not loaded, or this is an old chat. Reload the window and open a new one |
| Rules seem ignored | Reload the window and open a new chat. A pasted copy and the plugin together load the rules twice |
| Path | Source |
|---|---|
~/.cursor/plugins/local/cursor-prime/ |
payload/ rules and generated skills |
~/.cursor/plugins/local/cursor-prime/skills/<command>/SKILL.md |
generated from payload/commands/*.md |
~/.cursor/plugins/local/cursor-prime/skills/wish/SKILL.md |
copied from payload/plugin/skills/wish/SKILL.md |
~/.cursor/hooks.json (entry merged in; uninstall removes only that entry) + hooks script |
payload/hooks/* (only with -WithHooks) |
~/.gitignore_global |
payload/gitignore_global |
~/.cursor-prime-user-rules.txt |
generated from payload/behavior.mdc + maintainability.mdc |
~/.agents/skills/security-audit/ |
npx when neither this nor ~/.cursor/skills/security-audit/SKILL.md exists (not removed by uninstall) |
git config --global core.excludesfile |
set to ~/.gitignore_global |
Manifest: ~/.cursor-prime-manifest.json.
Edit files under payload/, then .\install.ps1 -Force and reload the window.
cd $env:USERPROFILE\cursor-prime
git pull
.\install.ps1 -ForceThe plugin rule replaces the paste as of v0.4.1. Delete the pasted User Rule under Customize → Rules → User so the rules are not loaded twice.
cd $env:USERPROFILE\cursor-prime
.\uninstall.ps1Removes manifest-listed files and restores core.excludesfile. It leaves ~/.agents/skills/security-audit/ in place. Clear the User rule under Customize → Rules manually if desired. -RestoreBackups restores install-time backups.
install.ps1backs up existing files as<file>.bak.<timestamp>.uninstall.ps1touches only files listed in the manifest.- Scripts are short. Read them before running.
See AGENTS.md.
- Prose. Docs, comments, and commit messages use the plain word, one idea per sentence, and name the mechanism or the number. A step names the command and what the reader should see, and does not say simply, easy, or quickly.
- Reader load. Collapse a wrapper with one caller. A reader should see where a value comes from and what can change it.
- Internal APIs. Replacing one migrates callers and deletes the old API in the same change.
- Tests. When the project already has tests, assert what a caller can observe. A test stays green when only the internals change. This does not turn TDD on by default.
- Boundaries. External input is validated at the boundary and turned into a type the rest of the code can trust. Do not leave an illegal state representable.
- Numbers. A reported number says what it measured and what limits it. Skip this when the task did not measure anything.
- Delete the pasted User Rule if one is still there. Re-install with
install.ps1 -Force, then reload the window.
- Plan. Plans use a markdown heading
## Plan. - Install. Give a plan first and wait for
GObefore running the installer. - Removed "Skip Stretch and this review on trivial tasks."
- A repeated failure becomes a check (test, lint, types, or one line in
AGENTS.md). - Delete the pasted User Rule if one is still there. Re-install with
install.ps1 -Force, then reload the window.
- Command path. The rules point at
~/.cursor/plugins/local/cursor-prime/skills/<name>/SKILL.md.install.ps1does not create~/.cursor/commands/. - Docs. The opening, quickstart, and troubleshooting no longer say the paste is what turns the rules on.
- Stretch is a field in
/plan, the same three lines the rule already requires. - Delete the pasted User Rule if one is still there. Re-install with
install.ps1 -Force, then reload the window.
- Local plugin.
install.ps1installs~/.cursor/plugins/local/cursor-prime: the rules, which load in every project, the slash commands, and one skill per command. A skill's text is generated from its command file, so there is no second copy. Saying "hand this over" or "polish the whole project" triggers the skill without a slash command. - Stretch. Every non-trivial plan adds up to 3 lines: an approach an order of magnitude better, whether the task can delete code instead of adding it, and what you would choose with no time limit. Each line is
in Goaloroffered. Anofferedline stays out of scope unless you name it beforeGO. Before the Delta Report the agent reviews its own diff. - Wish. Asking to polish the whole project, or to look at the whole approach again, runs a read-only audit and waits for you to pick items.
- Delete the pasted User Rule. The plugin replaces it. Leaving the paste loads the rules twice. Reload the window once.
- Reinstall keeps your originals. A reinstall no longer records cursor-prime's own
core.excludesfileas "previous", so uninstall restores the value you had before the first install. Files an earlier install placed keep that install's backup, so-RestoreBackupsbrings back your original, not an older cursor-prime copy. A file you edited since gets a fresh backup; untouched files get none, so.bakfiles stop piling up. - Upgrade from v0.2.6-v0.3.7 hooks.
-WithHooksreplaces the old guard entry (./hooks/guard-destructive.ps1) instead of running the guard twice. - No half installs. The security-audit skill (
npx) is installed first; without Node.js the installer stops before changing anything. - Guard. Asks for flags in any order (
Remove-Item -Force -Recurse,rm -fr,rm -r -f),rd /s,del /s,git push ... -f,git cleanwith-f,git checkout -- .,git restorewithout--staged,git branch -D, andgit stash drop|clear.tests/check.ps1holds 22 must-ask and 10 must-allow commands. - No
~/.cursor/rules/behavior.mdc. The editor does not load it, so the installer stops writing it and a-Forcereinstall removes the old copy. - Re-install (
install.ps1 -Force, with-WithHooksif you use the guard). No re-paste: the User Rules text is unchanged.
- Rules reach their details. User Rules say where each command lives (
/planis~/.cursor/commands/plan.md) and tell the agent to read that file when a rule points to a command the user did not invoke. Debugging, design check, and submission keep a short rule; their steps live in/debug,/grill, and/submission-init. - Conflicts resolved. After
GO, a failing verify is retried the/iterateway (up to 8 passes) without asking;progress.mdLoop State is written only at the cap or when pausing, and is now one of its sections./debugplans use the full/planfields. "State-changing" covers commits, pushes, installs, and anything sent off the machine. The read boundary applies afterGO. Unattended runs and the Out of scope exclusions yield when the user asks or a workflow skill needs them. - Duplicates removed. One place each for naming and conventions, submission's off-by-default, and
@project. Rules refer to "the Maintainability section", not amaintainability.mdcfile the paste does not create. The user-rules text is about a fifth shorter. /submission-initreads the clone path fromrepoin~/.cursor-prime-manifest.json, so a clone outside%USERPROFILE%\cursor-primeworks.- Repo checks also confirm every
/commandand~/.cursor/commands/*.mdthe rules name exists. - Re-install + re-paste User Rules required (
install.ps1 -Force).
- Plans. A duration in the request or the model's estimate is inherited from human typing speed. The plan names the real constraint, the inherited step, and the missing check. Goal stays what was asked. A wider outcome is one line under Out of scope.
- Review. Every plan states Risk (
low/medium/high) from the change. Verify names what the check would still miss.GOstays required. The same approach failing twice changes the approach. A repeated comment becomes a test, a lint, or one line inAGENTS.md. At the loop cap,progress.mdrecords the task, what was asked, and the check that failed. - Fresh review. A
high-risk plan ends with one review in a fresh context (a subagent given only the Goal and the diff), plus a security review when auth, secrets, or trust-boundary input change. A re-review covers only the new diff. - Repo checks.
tests/check.ps1checks version agreement, command lists, the hook, script syntax, and an install / reinstall / uninstall round trip against a temp profile. Run it before a release. /loopis now/iterate. Cursor ships a built-in/loopskill (repeat on an interval).install.ps1 -Forceremoves the oldloop.md.- Hooks merge.
-WithHooksmerges the guard into an existing~/.cursor/hooks.jsoninstead of overwriting it, and uninstall removes only that entry. A JSON file it cannot parse stops the install unchanged. - Workflow skills. Invoking a workflow skill such as pstack
/poteto-modegets one<plan>+GOat the start; then it runs its own process inside that scope. Overnight runs only when asked. - Hooks.
hooks.jsonstarts the guard throughpowershell -ExecutionPolicy Bypass -File, so Windows runs it instead of opening it. The guard no longer assigns to PowerShell's automatic$input. - Re-install + re-paste User Rules required (
install.ps1 -Force). Copy from the clipboard or~/.cursor-prime-user-rules.txt.
- README. The opening says a non-trivial task starts with a plan, waits for
GO, and ends with a Delta Report, and that the User Rules paste is what turns the rules on. "Karpathy is the starting point" lists what later versions kept and left out. - Paste path. README, AGENTS.md,
install.ps1,uninstall.ps1, and the persistence line inbehavior.mdcnow say Customize → Rules → User (+ New). The handoff tier is/handoffor an explicit hand-off. - Docs. Installer and agent instructions describe only the files this package ships. Submission templates are a handover, a reflection, and process notes.
- Re-install + re-paste User Rules required (
install.ps1 -Force). Copy from the clipboard or~/.cursor-prime-user-rules.txt.
- User Rules wording. The paste no longer says the rules are “always on for this project,” and it no longer says cursor-prime scaffolds projects. Submission templates are read from
$env:USERPROFILE\cursor-prime. If that path is missing, the agent asks where the clone lives. - Re-install + re-paste User Rules required (
install.ps1 -Force). Copy from the clipboard or~/.cursor-prime-user-rules.txt.
- Light install of cloudflare/security-audit-skill —
install.ps1runsnpx --yes skills add https://github.com/cloudflare/security-audit-skill --skill security-audit --global --agent cursor --yes --copywhen the skill is missing. The CLI writes~/.agents/skills/security-audit/;~/.cursor/skills/security-audit/SKILL.mdalso counts as present. It does not run an audit, and the skill is not copied intopayload/.uninstall.ps1does not remove it.npxfailure fails the install. - Re-install required (
install.ps1 -Force). User Rules text is unchanged from v0.3.4, so no re-paste.
- Light absorb from ponytail (the ladder only, in User Rules): reuse existing code, the platform, or an installed dependency before writing new code. Never cut trust-boundary validation, data-loss handling, security, or accessibility to shorten a diff. When the project already has tests, that new logic leaves one small test.
- Still not installed: ponytail hooks and
/ponytailcommands. Those inject a second always-on ruleset. - Re-install + re-paste User Rules required (
install.ps1 -Force).
- Submission is opt-in only — no auto-bootstrap on non-trivial tasks; prefer inline why-comments. Enable via
/submission-initor an explicit ask for submission/handover docs. - Re-install + re-paste User Rules required (
install.ps1 -Force).
- Light absorb from mattpocock/skills (ideas only): optional
/grillalignment, optionalCONTEXT.mdshared language, richer debug loop (minimise / instrument / regression). - Still not absorbed: mandatory TDD, triage/wayfinder/issue-tracker suites, full skills.sh vendoring.
- Re-install + re-paste User Rules required after upgrade (
install.ps1 -Force). - History note: v0.3.2 was not a separate commit. Grill and
CONTEXT.mdshipped in the v0.3.3 commit.
- Light absorb from superpowers-style process (ideas only — not a fork): optional design check, workflow-scale task breakdown + step self-check, systematic debugging,
/debug. - Still not absorbed: mandatory TDD-always, default multi-hour subagent runs, per-task git worktrees.
- Re-install + re-paste User Rules required after upgrade (
install.ps1 -Force).
- Major: global Cursor settings package — single
payload/originals tree. - Deploy story only: clone →
install.ps1→ paste User Rules (all projects on the machine). - Submission + Maintainability cover interview write-ups.
- User Rules merge — Coding Behavior + Maintainability in one paste.
- Submission auto-bootstrap +
/submission-init.
- Submission trio for assessments.
- Maintainability +
/handoff; greenfield pattern grounding.
- Light loop +
/loop+ hard verifier.
- Stricter task class — any file edit is non-trivial.
- Discipline loop,
/verify, enhanced/plan, optional hooks.
MIT — see LICENSE.