agentleFS
girijashankarjgirijashankarj/cursor-handbook/AGENTS.md

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.

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
  1. Distinctive:

    NEVER auto-run full test suites (100K+ tokens)

    line 13
  2. Distinctive:

    NEVER auto-run full lint (50K+ tokens)

    line 14
  3. Very specific:

    Use read_lints tool instead of lint commands

    line 15
  4. Distinctive:

    Run type-check (~10K tokens) as the default validation

    line 16
  5. Common:

    NEVER hardcode secrets, API keys, passwords

    line 21
  6. Distinctive:

    NEVER log PII (names, emails, SSN, credit cards)

    line 22
  7. Common:

    Use environment variables for all secrets

    line 23
  8. Very specific:

    Use generic placeholders for infrastructure: [ACCOUNT_ID], [RESOURCE_NAME]

    line 24
  9. Distinctive:

    Follow the handler pattern for API endpoints

    line 28
  10. Distinctive:

    All shared types in common/ directories

    line 31
  11. Distinctive:

    Import order: external → internal → relative

    line 32
  12. Distinctive:

    All tables require: id, created_at, updated_at, active_indicator

    line 36
  13. Distinctive:

    Follow AAA pattern (Arrange-Act-Assert)

    line 45
  14. Distinctive:

    No real API/database calls in unit tests

    line 46

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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_lints tool 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.