Skip to content

About

Global Cursor settings: plan first, wait for a literal GO, then a Delta Report. Karpathy's guidance is the starting point; later versions kept only what fit. Run install.ps1, then paste User Rules once under Customize → Rules → User. Commands include /plan, /verify, and /loop.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

Repository files navigation

cursor-prime

Most AI coding assistants start by editing files. On a non-trivial task, this package starts with a plan, waits for a literal GO, and finishes with a Delta Report that shows what changed.

It is a global Cursor settings package: a Plan Gate, coding rules, slash commands, and a global .gitignore. Install once on a machine, paste User Rules once, and every project follows them. The installer does not turn the rules on by itself. The paste does.

The coding 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, and uninstall leaves it in place. See Karpathy is the starting point.

Quickstart

  1. On Windows, clone this repo and run .\install.ps1.
  2. Paste User Rules once (clipboard, or ~/.cursor-prime-user-rules.txt).
  3. Open a new chat. Plan Gate means the agent prints a <plan> and waits for GO.
  4. Use /plan, /verify, and /loop when you want them.

Why use this?

  • Save credits. The agent plans before it codes, so you catch wrong directions before tokens are spent on wrong implementations.
  • Honest reporting, not blind trust. Every non-trivial task ends with a Delta Report (files changed, anything outside plan, verify output) so you can spot drift without reading every diff.
  • Handoff-ready by default. User Rules include maintainability standards so new code is documented for the next human and the next AI — tiered so one-line fixes stay cheap.
  • Light loop discipline. After GO, fix-and-retry with a hard verifier (test/lint/build), iteration cap, and /loop — session-only, not overnight automation.
  • Surgical changes, not drive-by refactors. Simplicity first, verifiable goals, terse output. No "Great! Let me also refactor this for you" sprawl.
  • One machine setup. Clone → install.ps1 → paste into Customize → Rules → User. Every project uses that paste.
  • Submission-ready (opt-in). Templates for Handover / Reflection / Appendix live under payload/submission/. Not auto-created; use /submission-init or ask explicitly. Day-to-day: prefer inline why-comments.
  • Uninstall. uninstall.ps1 removes the files it listed in the manifest and restores core.excludesfile. Clear the User Rules paste yourself for a full rules reset. The Cloudflare security-audit skill stays; it is not in the manifest.

Repository layout (settings package)

cursor-prime/
├── install.ps1 / uninstall.ps1
├── payload/                         # ONLY originals
│   ├── behavior.mdc / maintainability.mdc
│   ├── gitignore_global
│   ├── commands/                    # global slash commands
│   ├── hooks/                       # optional -WithHooks
│   └── submission/                  # Handover, Reflection, Appendix
├── README.md / AGENTS.md / LICENSE

Deploy: git clone → install.ps1 → paste User Rules once. Done for all projects on that machine.

Why a User Rules paste is required

Cursor has no reliable global rules file — that's a known limitation. So cursor-prime uses:

Mechanism Scope Set by Reliability
User Rules (Customize → Rules → User) global manual paste ✅ reliable (no file API)
Global slash commands ~/.cursor/commands/*.md global install.ps1 ✅ reliable
~/.cursor/rules/behavior.mdc global install.ps1 (best-effort) ⚠️ version-dependent
~/.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 → paste into Customize → Rules → User (+ New; clipboard + ~/.cursor-prime-user-rules.txt). That paste is Coding Behavior + Maintainability. The installer also ensures the global security-audit skill. Optional: /submission-init when you explicitly want the Handover / Reflection / Appendix trio.

What it does

After setup you get:

Discipline (what the AI is told not to do):

  • Plan Gate — the agent outputs a <plan> and waits for your GO before writing code on non-trivial tasks.
  • 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.md for domain jargon; AGENTS.md / @project stay 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; 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 /ponytail commands 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.md Handoff 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.
  • /loop — after GO, fix-and-retry until verify passes or iteration cap. The same failure twice becomes a check (test, lint, or types) before another reminder.
  • /debug — systematic debugging: reproduce → minimise → evidence → fix → regression check.
  • /grill — alignment grilling before planning; optional CONTEXT.md terms.
  • /handoff — raise the bar to tier D: public API docs, module headers, truthful AGENTS.md / README / @project.
  • /delta — produce a Delta Report for work just done.
  • /submission-init — opt-in scaffold for submission/ Handover / Reflection / Appendix (off by default).
  • Security audit skill — from cloudflare/security-audit-skill. install.ps1 runs npx when both ~/.agents/skills/security-audit/SKILL.md and ~/.cursor/skills/security-audit/SKILL.md are 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, and payload/ does not contain the skill.
  • Optional hooks — -WithHooks on install asks before destructive shell commands (off by default).
  • Global gitignore — __pycache__, node_modules, .venv, IDE/OS noise, Cursor caches.

Karpathy is the starting point

The base is Andrej Karpathy's LLM coding guidance: surgical changes, simplicity first, and verifiable goals. Later versions screened other skill repos and kept only what fit. Those repos were not vendored. The changelog records each version.

Kept

  • ponytail — the least-new-code ladder only.
  • mattpocock/skills — ideas only: optional /grill, optional CONTEXT.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 — npx install when the skill is missing. It runs only when you ask. Uninstall leaves it.

Left out

  • ponytail hooks and /ponytail commands.
  • mandatory TDD, the triage, wayfinder, and issue-tracker suites, and full skills.sh vendoring.
  • default multi-hour subagent runs and per-task git worktrees.

Requirements

  • Windows 10 / 11
  • PowerShell 5.1+ (built-in)
  • Git
  • Node.js with npx on PATH (the installer fails if it cannot install the security-audit skill)
  • Cursor installed
  • macOS / Linux: no installer is shipped yet (install.ps1 is Windows-only; see AGENTS.md to port it)

Install

Option 1 — Ask your AI agent (recommended)

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. Do everything automatically,
verify it, then tell me the single manual step I need to do.

Option 2 — Manual (PowerShell)

git clone https://github.com/xnoahwang/cursor-prime.git $env:USERPROFILE\cursor-prime
cd $env:USERPROFILE\cursor-prime
powershell -ExecutionPolicy Bypass -File .\install.ps1

This installs global slash commands, the global gitignore, and a best-effort ~/.cursor/rules/behavior.mdc. It copies User Rules text to your clipboard (backup: ~/.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 -Force
Optional hooks: .\install.ps1 -Force -WithHooks

The single manual step: open Customize → Rules, click + New under User, paste, and Save. Cursor has no file/API for User Rules. ~10 seconds, once per machine.

Testing

After install + User Rules paste, start a new chat.

Plan Gate (non-trivial task)

Ask for something that clearly needs code. Pass: <plan> then wait for GO. Reply GO → implement + Delta Report.

Trivial task

Ask a read-only question. Pass: direct answer, no wait for GO.

Troubleshooting

Symptom Likely cause
Code before GO on non-trivial tasks User Rules not pasted, or old chat — open a new one
Rules seem ignored Re-paste from ~/.cursor-prime-user-rules.txt; new chat

What it changes on your machine

Path Source
~/.cursor/commands/*.md payload/commands/*.md
~/.cursor/rules/behavior.mdc payload/behavior.mdc (best-effort)
~/.cursor/hooks.json + 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.

Customize

Edit files under payload/, then .\install.ps1 -Force and re-paste User Rules.

Update

cd $env:USERPROFILE\cursor-prime
git pull
.\install.ps1 -Force

Re-paste User Rules when the rules text changed. v0.3.7 changes that text. Re-paste from the clipboard or ~/.cursor-prime-user-rules.txt.

Uninstall

cd $env:USERPROFILE\cursor-prime
.\uninstall.ps1

Removes 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.

Safety

  • install.ps1 backs up existing files as <file>.bak.<timestamp>.
  • uninstall.ps1 touches only files listed in the manifest.
  • Scripts are short. Read them before running.

Adapt for other tools / OSes

See AGENTS.md.

Changelog

v0.3.7

  • 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 in behavior.mdc now say Customize → Rules → User (+ New). The handoff tier is /handoff or 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.

v0.3.6

  • 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.

v0.3.5

  • Light install of cloudflare/security-audit-skill — install.ps1 runs npx --yes skills add https://github.com/cloudflare/security-audit-skill --skill security-audit --global --agent cursor --yes --copy when the skill is missing. The CLI writes ~/.agents/skills/security-audit/; ~/.cursor/skills/security-audit/SKILL.md also counts as present. It does not run an audit, and the skill is not copied into payload/. uninstall.ps1 does not remove it. npx failure fails the install.
  • Re-install required (install.ps1 -Force). User Rules text is unchanged from v0.3.4, so no re-paste.

v0.3.4

  • 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 /ponytail commands. Those inject a second always-on ruleset.
  • Re-install + re-paste User Rules required (install.ps1 -Force).

v0.3.3

  • Submission is opt-in only — no auto-bootstrap on non-trivial tasks; prefer inline why-comments. Enable via /submission-init or an explicit ask for submission/handover docs.
  • Re-install + re-paste User Rules required (install.ps1 -Force).

v0.3.2

  • Light absorb from mattpocock/skills (ideas only): optional /grill alignment, optional CONTEXT.md shared 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.md shipped in the v0.3.3 commit.

v0.3.1

  • 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).

v0.3.0

  • 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.

v0.2.5

  • User Rules merge — Coding Behavior + Maintainability in one paste.
  • Submission auto-bootstrap + /submission-init.

v0.2.4

  • Submission trio for assessments.

v0.2.3

  • Maintainability + /handoff; greenfield pattern grounding.

v0.2.2

  • Light loop + /loop + hard verifier.

v0.2.1

  • Stricter task class — any file edit is non-trivial.

v0.2.0

  • Discipline loop, /verify, enhanced /plan, optional hooks.

License

MIT — see LICENSE.

About

Global Cursor settings: plan first, wait for a literal GO, then a Delta Report. Karpathy's guidance is the starting point; later versions kept only what fit. Run install.ps1, then paste User Rules once under Customize → Rules → User. Commands include /plan, /verify, and /loop.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages