cursor-sdk
AGENTS.md1 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
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,398 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.
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
- Distinctive: line 59
Don't introduce a new wikilink target without creating the corresponding file.
- Very specific: line 63
Create skills/<name>/SKILL.md with valid frontmatter (name matching the directory).
- Very specific: line 64
Add skills/<name>/references/ with at least one node.
- Distinctive: line 66
Update the skill table and graph diagram in README.md.
- Distinctive: line 67
Run validation locally — CI will block merge if anything's off.
- Very specific: line 71
Create skills/<skill>/references/<topic>.md with frontmatter (name, description).
- Very specific: line 72
Add a [[references/<topic>]] line to the skill's SKILL.md MoC under the right section.
- Distinctive: line 73
Add inbound links from at least one related node so it's discoverable.
- Very specific: line 96
Use em-dash — (U+2014), not --.
- Distinctive: line 97
Don't add emojis to skill content unless the user asked.
- Distinctive: line 99
Keep node titles imperative or noun-phrase, not full sentences.
- Very specific: line 104
Don't: add nodes/ — the spec-standard directory is references/.
- Very specific: line 105
Don't: put real API keys, tokens, or PII in any file.
≈ “Common” is an estimate: at least 1 in 5 of the 43,423 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
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— settrueonly 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.mdis a Map of Content: short descriptions plus[[wikilinks]]. Don't dump prose here.references/*.mdfiles 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.mdunder 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
- Create
skills/<name>/SKILL.mdwith valid frontmatter (namematching the directory). - Add
skills/<name>/references/with at least one node. - Cross-link the new skill from at least one existing skill's MoC.
- Update the skill table and graph diagram in
README.md. - Run validation locally — CI will block merge if anything's off.
Adding a new node to an existing skill
- Create
skills/<skill>/references/<topic>.mdwith frontmatter (name,description). - Add a
[[references/<topic>]]line to the skill'sSKILL.mdMoC under the right section. - 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"
doneCI 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 isreferences/. - Don't put real API keys, tokens, or PII in any file. Examples must use
process.env.CURSOR_*orcur_...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.
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.

