Skip to content

About

One-command AI coding agent starter kit for Cursor, Claude Code, Codex, Copilot & Windsurf — 12 rules, 14 skills (anti-AI-slop UI, clean code, TDD, 4-phase debug, verify), 12 slash commands, 7 subagents & safety hooks.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Cursor Agent Starter Kit — One-command AI coding agent workspace

GitHub Release npm version npm downloads Interactive Docs CI Node.js >= 18 Zero Dependencies License: MIT

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


Quick Start

1. Install into any project (Windows, macOS, Linux)

# 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 --yes

Existing files in your repository are never overwritten unless you pass --force. Use --dry-run to preview changes first or --minimal for rules, commands, skills, and bridges only.

Prefer configuring visually? Use the Interactive CLI Builder.

2. Orient your agent

Open the project in Cursor, Claude Code, Codex, Copilot, or Windsurf and type:

/onboard

3. Use daily workflow commands

/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 summary
Preview 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, windsurf

Minimal install (no extra docs or workflow templates):

npx cursor-agent-starter-kit init --yes --minimal

Install directly from GitHub without npm:

npx github:JunnDung/cursor-agent-starter-kit init

Clone as a standalone template:

git clone https://github.com/JunnDung/cursor-agent-starter-kit my-project
cd my-project
npm run validate:all && npm test

Multi-Tool Compatibility

Write 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

Slash Commands

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/

Open-Standard Agent Skills

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.


Stack Presets

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-fastapi

Want Rust, Vue/Nuxt, Laravel, Flutter, or Spring Boot? Request or contribute a preset — each preset is a single .mdc file under 150 lines.


Context Architecture & Safety

Lean Always-On Token Budget

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/]
Loading

Cross-Platform Pre-Tool Safety Guard

.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-root Remove-Item -Recurse
  • git push --force / -f (allows safer --force-with-lease)
  • git reset --hard and git clean -fdx
  • DROP TABLE, DROP DATABASE, TRUNCATE TABLE
  • chmod 777 and remote pipe-to-shell (curl ... | bash, iwr ... | iex)
  • Shell reads of .env secret files (allows .env.example)

Test commands interactively in the Live Safety Guard Playground.


CLI & Workspace Doctor

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 & subagents
What'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

Before vs. After

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

Documentation

Start with the Documentation Hub for guided learning tracks (5-min Quick Start, Architecture Deep Dive, Power User & Extending):


Contributing & License

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.

About

One-command AI coding agent starter kit for Cursor, Claude Code, Codex, Copilot & Windsurf — 12 rules, 14 skills (anti-AI-slop UI, clean code, TDD, 4-phase debug, verify), 12 slash commands, 7 subagents & safety hooks.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages