Structured context for Cursor, Claude Code, OpenAI Codex, GitHub Copilot, and Windsurf.
Lean always-on rules, 12 native slash commands, 7 isolated subagents, 14 Open-Standard skills (including anti-AI-slop UI design, clean code, TDD, 4-phase debugging & verification gating), auto-detected stack presets, and a cross-platform safety hook — installed in one zero-dependency command.
Interactive Docs & CLI Builder · Quick Start · Slash Commands · Agent Skills · Stack Presets · CLI & Doctor · Tiếng Việt
# Interactive setup — auto-detects your stack and lets you pick tools & presets
npx cursor-agent-starter-kit init
# Non-interactive fast install using auto-detected defaults
npx cursor-agent-starter-kit init --yesExisting files in your repository are never overwritten unless you pass
--force. Use--dry-runto preview changes first or--minimalfor rules, commands, skills, and bridges only.Prefer configuring visually? Use the Interactive CLI Builder.
Open the project in Cursor, Claude Code, Codex, Copilot, or Windsurf and type:
/onboard/plan -> Spec, non-goals, file plan & approval gate before coding
/ui -> Intentional anti-AI-slop UI design, tokens, WCAG AA & mobile checks
/clean -> Guard clauses, explicit errors & async waterfall / N+1 optimization
/fix -> 4-phase root-cause debugging (3-strike rule) + failing regression test
/test -> Focused unit/edge-case tests (or strict TDD Red-Green-Refactor)
/verify -> Fresh post-edit test/typecheck/lint evidence gate before claiming done
/review -> Read-only senior code review with severity-ranked findings
/pr -> Diff hygiene check, Conventional Commit & PR summaryPreview CLI output & alternative install methods
$ npx cursor-agent-starter-kit init --yes
Cursor Agent Starter Kit v1.1.0
Target workspace: /workspace/my-saas-app
Auto-detected stack:
• nextjs-typescript (Found `next` in package.json)
• fullstack-saas (Found database/auth/billing packages)
Done! Created 76 files.
Presets applied: nextjs-typescript, fullstack-saas
Tools configured: cursor, claude, codex, copilot, windsurfMinimal install (no extra docs or workflow templates):
npx cursor-agent-starter-kit init --yes --minimalInstall directly from GitHub without npm:
npx github:JunnDung/cursor-agent-starter-kit initClone as a standalone template:
git clone https://github.com/JunnDung/cursor-agent-starter-kit my-project
cd my-project
npm run validate:all && npm testWrite engineering conventions once. Every teammate gets native support across whichever IDE or terminal agent they use:
| Tool | Native Files Installed | Auto-Loaded |
|---|---|---|
| Cursor | .cursor/rules/*.mdc, .cursor/commands/, .cursor/agents/, .cursor/skills/, .cursor/hooks.json, AGENTS.md |
Yes |
| Claude Code | CLAUDE.md, Open-Standard .cursor/skills/*/SKILL.md |
Yes |
| OpenAI Codex | AGENTS.md, Open-Standard .cursor/skills/*/SKILL.md |
Yes |
| GitHub Copilot | .github/copilot-instructions.md |
Yes |
| Windsurf | .windsurf/rules/core.md |
Yes |
Ready-to-use commands in .cursor/commands/ — no giant prompt copy-pasting required:
| Command | Mode | What It Does |
|---|---|---|
/onboard |
Read-only | Maps repo stack, key commands, active memory & recommended next step |
/plan |
Approval gate | Produces spec, non-goals, exact file plan & acceptance criteria before editing |
/ui |
Design + verify | Intentional non-AI-slop UI design, domain tokens, WCAG AA & responsive checks |
/clean |
Edit + verify | Clean code, guard clauses, explicit errors & async performance optimization |
/fix |
Edit + verify | 4-phase systematic root-cause debugging (3-strike rule) + failing regression test |
/review |
Read-only | Senior review of current diff with critical / high / medium / low findings |
/test |
Edit + verify | Writes happy-path, boundary & error-path tests (or TDD Red-Green-Refactor) |
/verify |
Completion gate | Runs fresh test/lint/typecheck/diff verification after final edit before claiming done |
/pr |
Read-only | Audits diff for secrets/debug leftovers, drafts Conventional Commit & PR notes |
/security-audit |
Read-only | Checks OWASP Top 10, IDOR/authz, injection, XSS, SSRF & secret leaks |
/refactor |
Edit + verify | Locks invariants first, cleans structure mechanically & proves tests stay green |
/reflect |
Memory | Runs After-Action Review (AAR) and saves lasting decisions into memory/ |
14 portable two-layer skills (.cursor/skills/<name>/SKILL.md < 120 lines + deep GUIDE.md) auto-discovered natively across Cursor, Claude Code, and OpenAI Codex, distilling proven patterns from anthropics/skills, vercel-labs/agent-skills, and obra/superpowers:
| Category | Skills | Core Discipline |
|---|---|---|
| UI & Code Craft | frontend-design, clean-code, refactor-safely |
Domain aesthetic tokens, WCAG AA & anti-AI-slop UI; guard clauses, explicit errors, zero async waterfalls / N+1; invariant-safe refactoring |
| Debugging, TDD & Verification | debug-bug, tdd-workflow, write-tests, verify-before-done |
4-phase root-cause trace + 3-Strike Stop Rule; strict Red-Green-Refactor iron law; fresh post-edit verification evidence before claiming done |
| Architecture, Security & Delivery | spec-driven-dev, code-review, security-audit, pr-prepare, aar, create-agent, create-tool |
Spec-first planning gate, severity-ranked reviews, OWASP/IDOR/secret audits, clean PRs, session memory capture & scaffolding |
Want to propose or contribute a skill? Open a Skill Proposal or run
npm run generate:skill.
Scoped via YAML globs frontmatter so rules only enter context when editing matching source files:
| Preset | File Globs | Focus |
|---|---|---|
nextjs-typescript |
**/*.ts, **/*.tsx, next.config.* |
App Router RSC boundaries, strict TS, Server Action auth, Tailwind |
node-typescript |
**/*.ts, **/*.mts, **/*.mjs |
Thin controllers, pure services, Zod validation, structured errors |
python-fastapi |
**/*.py, pyproject.toml |
Python 3.12+, FastAPI, Pydantic v2, async hygiene, ruff/mypy/pytest |
fullstack-saas |
prisma/**, drizzle/**, **/*.sql, **/*.ts |
Multi-tenant isolation, additive migrations, idempotent webhooks |
go-backend |
**/*.go, go.mod |
Consumer interfaces, context.Context, %w wrapping, go test -race |
Install any preset anytime:
npx cursor-agent-starter-kit add preset python-fastapiWant Rust, Vue/Nuxt, Laravel, Flutter, or Spring Boot? Request or contribute a preset — each preset is a single
.mdcfile under 150 lines.
Instead of stuffing ~9,500 tokens into one monolithic .cursorrules file, instructions load progressively across four layers:
flowchart LR
U[Prompt or /command] --> L1[L1 · 4 Core Rules<br/>~1,088 always-on tokens]
U --> L2[L2 · Stack Presets<br/>Loaded on file glob match]
U --> L3[L3 · 14 Agent Skills<br/>SKILL.md -> GUIDE.md]
U --> L4[L4 · 7 Subagents<br/>Isolated context windows]
L1 & L2 & L3 & L4 --> G[Pre-Tool Safety Guard<br/>pre-tool-guard.mjs]
G --> V[Verify & /reflect -> memory/]
.cursor/hooks/pre-tool-guard.mjs runs natively via Node.js on Windows, macOS, and Linux (no bash/jq required) and blocks destructive shell patterns before execution:
rm -rf /,rm -rf ~,rm -rf *, and drive-rootRemove-Item -Recursegit push --force/-f(allows safer--force-with-lease)git reset --hardandgit clean -fdxDROP TABLE,DROP DATABASE,TRUNCATE TABLEchmod 777and remote pipe-to-shell (curl ... | bash,iwr ... | iex)- Shell reads of
.envsecret files (allows.env.example)
Test commands interactively in the Live Safety Guard Playground.
npx cursor-agent-starter-kit init # Interactive workspace installer
npx cursor-agent-starter-kit doctor # Health score (0-100), schema & token audit
npx cursor-agent-starter-kit doctor --json --strict # CI-friendly machine-readable report
npx cursor-agent-starter-kit add preset <id> # Add a stack preset rule
npx cursor-agent-starter-kit list # List presets, commands, skills & subagentsWhat's inside the repository & local npm scripts
| Area | Path | Count / Purpose |
|---|---|---|
| CLI & Doctor | bin/cli.mjs, scripts/doctor.mjs |
Zero-dependency init, doctor, add, list, validate |
| Cursor Rules | .cursor/rules/*.mdc |
12 rules (4 always-on + 8 task-specific) |
| Slash Commands | .cursor/commands/*.md |
12 native workflow shortcuts (/ui, /clean, /plan, /fix, /verify, /pr...) |
| Agent Skills | .cursor/skills/*/SKILL.md |
14 Open-Standard skills (SKILL.md + GUIDE.md) |
| Native Subagents | .cursor/agents/*.md |
7 isolated roles (code-reviewer, security-auditor, ui-critic, bug-hunter, test-engineer, codebase-researcher, architect-planner) |
| Stack Presets | presets/*/*.mdc |
5 curated framework rule packs |
| Safety Hooks | .cursor/hooks/ |
Cross-platform pre-tool-guard.mjs + optional shell hooks |
| MCP Config | .cursor/mcp.json.example |
Ready-to-copy templates for Context7, GitHub, Playwright & Memory |
| Workflows & Memory | workflows/, memory/ |
9 workflows + 4 durable project memory files |
| Tests & Pages | tests/, site/ |
Zero-dep node:test suite + GitHub Pages interactive docs |
Local npm scripts when cloned:
| Command | Action |
|---|---|
npm run validate:all |
Validate rules, skills, commands, subagents, presets, JSON & doctor |
npm test |
Run automated node:test test suite |
npm run doctor |
Audit workspace health & always-on token budget |
npm run list |
Print catalog of presets, commands, skills & subagents |
npm run generate:skill |
Scaffold a new Open-Standard skill (SKILL.md + GUIDE.md) |
npm run generate:agent |
Scaffold a new agent role |
| Failure Mode | Unconfigured AI Agent | With Cursor Agent Starter Kit |
|---|---|---|
| Scope creep | Rewrites unrelated modules while fixing a localized bug | Minimal diffs enforced via 03-surgical-changes.mdc + /fix |
| Hidden assumptions | Edits files immediately on ambiguous requirements | Spec, non-goals & file plan gated via /plan |
| Generic "AI slop" UI | Cliché gradients, weak hierarchy, broken mobile & contrast | Domain tokens, WCAG AA & layout checks via /ui + ui-critic |
| Unverified "done" claims | Claims a bug is fixed from memory without re-running tests | Fresh post-edit evidence required by /verify & tdd-workflow |
| Destructive shell ops | Runs git push --force, rm -rf, or prints .env |
Intercepted pre-execution by pre-tool-guard.mjs |
| Context bloat | Giant .cursorrules burns ~9,500 tokens every turn |
~1,088 always-on tokens + doctor token budget audit |
| Mixed team tooling | Rules locked to one IDE | Shared native configs for Cursor, Claude Code, Codex, Copilot & Windsurf |
Start with the Documentation Hub for guided learning tracks (5-min Quick Start, Architecture Deep Dive, Power User & Extending):
- Interactive Website: junndung.github.io/cursor-agent-starter-kit
- Daily Workflow Playbook: docs/cursor-workflow.md · 15-Minute Tutorial: docs/tutorial.md
- Decision Trees (When to Use What): docs/decision-trees.md · Visual Workflows: docs/workflows-visual.md
- Stack Presets Guide: docs/stack-presets-guide.md · Multi-Tool Team Guide: docs/multi-tool-guide.md
- CLI & Slash Commands Reference: docs/cli-reference.md · Examples Cookbook: docs/examples-cookbook.md
- Hooks & Safety Guard: docs/hooks-guide.md · MCP Server Setup: docs/mcp-setup.md
- Creating Skills & Subagents: docs/creating-skills.md · docs/creating-agents.md
- FAQ, Troubleshooting & Vietnamese Guide: docs/faq.md · docs/troubleshooting.md · docs/vietnamese-guide.md · CHANGELOG.md
Contributions are welcome — especially new Stack Presets, Skills, Slash Commands, and translations.
Run npm run validate:all && npm test before opening a Pull Request. See CONTRIBUTING.md, CODE_OF_CONDUCT.md, and SECURITY.md, or join GitHub Discussions.
Released under the MIT License. If this kit saved you time, consider starring the repository.