cursor-handbook
AGENTS.md31 starsChanged 3 months agoMITView on GitHub
This file provides instructions to AI agents working in this repository. This is cursor-handbook, a Cursor IDE configuration boilerplate providing rules, agents, skills, commands, and hooks for software development. Project settings are in .cursor/config/project.json. Components reference settings via {{CONFIG.section.key}} placeholders.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository30 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .cursor/rules/architecture/core-principles.mdcCursor rule
- .cursor/rules/architecture/dependency-management.mdcCursor rule
- .cursor/rules/architecture/token-efficiency.mdcCursor rule
- .cursor/rules/backend/api-design.mdcCursor rule
- .cursor/rules/backend/code-organization.mdcCursor rule
- .cursor/rules/backend/error-handling.mdcCursor rule
- .cursor/rules/backend/handler-patterns.mdcCursor rule
- .cursor/rules/backend/nodejs.mdcCursor rule
- .cursor/rules/backend/typescript.mdcCursor rule
- .cursor/rules/cloud/containerization.mdcCursor rule
- .cursor/rules/cloud/infrastructure.mdcCursor rule
- .cursor/rules/cloud/serverless.mdcCursor rule
- .cursor/rules/database/migration-rules.mdcCursor rule
- .cursor/rules/database/query-patterns.mdcCursor rule
- .cursor/rules/database/schema-design.mdcCursor rule
- .cursor/rules/devops/ci-cd.mdcCursor rule
- .cursor/rules/devops/documentation-standards.mdcCursor rule
- .cursor/rules/devops/monitoring.mdcCursor rule
- .cursor/rules/frontend/accessibility.mdcCursor rule
- .cursor/rules/frontend/component-patterns.mdcCursor rule
- .cursor/rules/frontend/performance.mdcCursor rule
- .cursor/rules/frontend/state-management.mdcCursor rule
- .cursor/rules/main-rules.mdcCursor rule
- .cursor/rules/security/guardrails.mdcCursor rule
- .cursor/rules/security/secrets-rules.mdcCursor rule
- .cursor/rules/security/security-compliance.mdcCursor rule
- .cursor/rules/testing/integration-testing.mdcCursor rule
- .cursor/rules/testing/mock-patterns.mdcCursor rule
- .cursor/rules/testing/testing-standards.mdcCursor rule
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
14 rules. About 2 are common, 10 are distinctive, and 2 are very specific to this project.
≈2
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
NEVER auto-run full test suites (100K+ tokens)
- Distinctive: line 14
NEVER auto-run full lint (50K+ tokens)
- Very specific: line 15
Use read_lints tool instead of lint commands
- Distinctive: line 16
Run type-check (~10K tokens) as the default validation
- Common: line 21
NEVER hardcode secrets, API keys, passwords
- Distinctive: line 22
NEVER log PII (names, emails, SSN, credit cards)
- Common: line 23
Use environment variables for all secrets
- Very specific: line 24
Use generic placeholders for infrastructure: [ACCOUNT_ID], [RESOURCE_NAME]
- Distinctive: line 28
Follow the handler pattern for API endpoints
- Distinctive: line 31
All shared types in common/ directories
- Distinctive: line 32
Import order: external → internal → relative
- Distinctive: line 36
All tables require: id, created_at, updated_at, active_indicator
- Distinctive: line 45
Follow AAA pattern (Arrange-Act-Assert)
- Distinctive: line 46
No real API/database calls in unit tests
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md — Instructions for AI Agents
This file provides instructions to AI agents working in this repository.
Project Overview
This is cursor-handbook, a Cursor IDE configuration boilerplate providing rules, agents, skills, commands, and hooks for software development.
Key Principles
1. Token Efficiency
- NEVER auto-run full test suites (100K+ tokens)
- NEVER auto-run full lint (50K+ tokens)
- Use
read_lintstool instead of lint commands - Run type-check (~10K tokens) as the default validation
- Require explicit user confirmation for 50K+ token operations
2. Security
- NEVER hardcode secrets, API keys, passwords
- NEVER log PII (names, emails, SSN, credit cards)
- Use environment variables for all secrets
- Use generic placeholders for infrastructure: [ACCOUNT_ID], [RESOURCE_NAME]
3. Code Conventions
- Follow the handler pattern for API endpoints
- Soft delete only — never use DELETE SQL statements
- Structured JSON logging with correlationId
- All shared types in common/ directories
- Import order: external → internal → relative
4. Database
- All tables require: id, created_at, updated_at, active_indicator
- Parameterized queries only — never concatenate SQL
- Cursor-based pagination preferred
- Schema changes only via migrations
5. Testing
- Minimum 90% code coverage
- Mock all external dependencies
- Follow AAA pattern (Arrange-Act-Assert)
- No real API/database calls in unit tests
Configuration
Project settings are in .cursor/config/project.json. Components reference settings via {{CONFIG.section.key}} placeholders.
Component Map
- Rules:
.cursor/rules/*.mdc— Always-applied standards - Agents:
.cursor/agents/*.md— Specialized AI assistants - Skills:
.cursor/skills/*/SKILL.md— Step-by-step workflows - Commands:
.cursor/commands/*.md— Quick actions - Hooks:
.cursor/hooks/*.sh— Automation scripts
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

