agentleFS
HKTITANHKTITAN/cursor-sdk/AGENTS.md

cursor-sdk

AGENTS.md2 starsChanged 7 months agoMITView on GitHub

Guidance for AI coding agents working in this repository. Format: agents.md. A library of Agent Skills for building with Cursor — the AI code editor and SDK by Anysphere. Skills cover the full surface of cursor.com/docs: the editor, the in-editor Agent, Rules / Memories / Skills / Hooks / MCP, the CLI, Background (Cloud) Agents, integrations (Slack, Linear, GitHub, GitLab, JetBrains, Xcode), the TypeScript SDK, Teams, and Enterprise. This repo contains only Markdown — no source to compile, no runtime…

  • Reads credentials

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

13 rules. About 0 are common, 6 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Don't introduce a new wikilink target without creating the corresponding file.

    line 59
  2. Very specific:

    Create skills/<name>/SKILL.md with valid frontmatter (name matching the directory).

    line 63
  3. Very specific:

    Add skills/<name>/references/ with at least one node.

    line 64
  4. Distinctive:

    Update the skill table and graph diagram in README.md.

    line 66
  5. Distinctive:

    Run validation locally — CI will block merge if anything's off.

    line 67
  6. Very specific:

    Create skills/<skill>/references/<topic>.md with frontmatter (name, description).

    line 71
  7. Very specific:

    Add a [[references/<topic>]] line to the skill's SKILL.md MoC under the right section.

    line 72
  8. Distinctive:

    Add inbound links from at least one related node so it's discoverable.

    line 73
  9. Very specific:

    Use em-dash — (U+2014), not --.

    line 96
  10. Distinctive:

    Don't add emojis to skill content unless the user asked.

    line 97
  11. Distinctive:

    Keep node titles imperative or noun-phrase, not full sentences.

    line 99
  12. Very specific:

    Don't: add nodes/ — the spec-standard directory is references/.

    line 104
  13. Very specific:

    Don't: put real API keys, tokens, or PII in any file.

    line 105

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

Guidance for AI coding agents working in this repository. Format: agents.md.

What this repo is

A library of Agent Skills for building with Cursor — the AI code editor and SDK by Anysphere. Skills cover the full surface of cursor.com/docs: the editor, the in-editor Agent, Rules / Memories / Skills / Hooks / MCP, the CLI, Background (Cloud) Agents, integrations (Slack, Linear, GitHub, GitLab, JetBrains, Xcode), the TypeScript SDK, Teams, and Enterprise.

This repo contains only Markdown — no source to compile, no runtime to ship. The deliverable is the skill graph itself.

Project layout

.
├── AGENTS.md                       # this file
├── README.md                       # human-facing intro + install
├── LICENSE                         # MIT
├── .gitignore
├── .markdownlint.jsonc
├── .github/workflows/validate.yml  # CI
├── scripts/
│   └── check-wikilinks.mjs         # broken-link checker
└── skills/
    └── <skill-name>/
        ├── SKILL.md                # required, spec-compliant frontmatter
        └── references/             # spec-standard subdirectory for atomic nodes
            └── *.md                # one concept per file, with [[wikilinks]]

The closest AGENTS.md to the file you're editing wins; only this top-level one exists today.

Authoring rules

CI enforces the spec-driven rules below.

SKILL.md frontmatter (Agent Skills spec)

  • name (required) — lowercase letters, digits, hyphens; ≤ 64 chars; must match the parent directory name; no leading/trailing/consecutive hyphens.
  • description (required) — ≤ 1024 chars, non-empty, describes what the skill does and when to use it. Include trigger phrases users would actually say.
  • metadata.source — upstream URL the skill tracks (e.g. a cursor.com/docs page).
  • metadata.internal — set true only on nodes that are not user-facing top-level skills.

Skill graph structure

Each skill is a graph, not a monolithic file. Inspired by Akshay Pachaar's "Skill Graphs > SKILL.md".

  • SKILL.md is a Map of Content: short descriptions plus [[wikilinks]]. Don't dump prose here.
  • references/*.md files are atomic concepts — one complete thought per file, ≤ ~80 lines. Add YAML frontmatter (name, description).
  • Cross-skill links use [[../<other-skill>/references/<node>]].
  • Aim for SKILL.md under 100 lines.

Wikilink conventions

  • [[references/foo]] — same-skill link.
  • [[../cursor-runs/references/stream]] — cross-skill link.
  • [[../cursor-cli/SKILL]] — link to a sibling skill's MoC.
  • [[references/foo|display text]] — alias form.

Don't introduce a new wikilink target without creating the corresponding file. CI fails on broken links.

Adding a new skill

  1. Create skills/<name>/SKILL.md with valid frontmatter (name matching the directory).
  2. Add skills/<name>/references/ with at least one node.
  3. Cross-link the new skill from at least one existing skill's MoC.
  4. Update the skill table and graph diagram in README.md.
  5. Run validation locally — CI will block merge if anything's off.

Adding a new node to an existing skill

  1. Create skills/<skill>/references/<topic>.md with frontmatter (name, description).
  2. Add a [[references/<topic>]] line to the skill's SKILL.md MoC under the right section.
  3. Add inbound links from at least one related node so it's discoverable.

Validation / dev environment

# Markdown lint
npx markdownlint-cli2 "**/*.md" "!**/node_modules/**"

# Wikilink checker
node scripts/check-wikilinks.mjs

# Name-vs-directory consistency (one-liner)
for f in skills/*/SKILL.md; do
  dir=$(basename "$(dirname "$f")")
  name=$(grep -m1 '^name:' "$f" | awk '{print $2}')
  [ "$dir" = "$name" ] || echo "MISMATCH: $f ($name) vs $dir"
done

CI runs these on every PR. See .github/workflows/validate.yml.

Style

  • Use em-dash — (U+2014), not --.
  • Don't add emojis to skill content unless the user asked.
  • Code fences must specify a language.
  • Keep node titles imperative or noun-phrase, not full sentences.
  • One blank line between sections; no trailing whitespace.

Things NOT to do

  • Don't add nodes/ — the spec-standard directory is references/.
  • Don't put real API keys, tokens, or PII in any file. Examples must use process.env.CURSOR_* or cur_... placeholders.
  • Don't rewrite the skill-graph structure into single monolithic SKILL.md files — the graph layout is intentional.
  • Don't introduce a build step or package.json — this repo is pure Markdown by design.
  • Don't invent SDK methods, CLI flags, or feature names. If the upstream docs don't cover it, don't write it.

Commit / PR conventions

  • Conventional Commits: feat:, fix:, docs:, refactor:, chore:.
  • One skill / one concern per PR. Cross-skill renames are fine in a single PR.
  • PR description should mention which skills were touched and link to any external docs you used.

License

MIT. By contributing, you agree your contributions are MIT-licensed.

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.