Cursor Best Practices
Best practices for using Cursor—rules, commands, skills, subagents, ignore files, Agent security, workflows, and community resources. Use when setting up Cursor, initializing or creating the .cursor folder, writing .cursor/rules or AGENTS.md, creating commands or skills, configuring .cursorignore, working with Agent, discovering rules or MCPs (e.g. cursor.directory), making codebases cursor-compa…
Cursor Cli
The `agent` CLI — install, interactive modes (Agent / Plan / Ask), headless `-p` mode for CI, GitHub Actions integration, and how it relates to the TypeScript SDK. Use when scripting Cursor in shell pipelines or workflows instead of (or alongside) the SDK.
Cursor Hooks
File-based agent loop hooks via `.cursor/hooks.json` — pre/post commands, governance gates. Use when enforcing policy without modifying agent prompts.
Cursor Cloud
Cloud runtime for Cursor SDK — dedicated VMs, repo-bound runs, auto-PR creation, artifacts, and reattachment. Use when running long, review-oriented, or repo-modifying agents off the local machine.
Cursor Runs
Run lifecycle, streaming, follow-ups, and conversation introspection in the Cursor SDK. Use when consuming agent output, handling progress events, or chaining turns.
Cursor Rules
Project, user, and team rules that the Cursor SDK and Agent load — `.cursor/rules/*.mdc`, `AGENTS.md`, and the legacy `.cursorrules`. Use when authoring rules that the SDK will pick up via `local.settingSources`, or when writing rule frontmatter with the right type (always / auto-attached / agent-requested / manual).
Cursor Sdk
Entry point for the Cursor TypeScript SDK — install, auth, and the Agent.create / Agent.resume / Agent.prompt lifecycle. Use when starting any Cursor SDK integration or wiring durable agent IDs.
Cursor Models
Model discovery and selection on Cursor SDK — Cursor.models.list, ModelSelection, parameters (e.g. thinking levels), per-run sticky overrides.
Cursor Errors
CursorAgentError class hierarchy, isRetryable, and recovery patterns. Use when classifying SDK failures, building retry logic, or surfacing actionable messages.
Cursor Mcp
Configure MCP servers on Cursor SDK agents — stdio subprocess, HTTP, and SSE transports, inline vs file-based config, and per-run overrides. Use when extending an agent's tools beyond the built-ins.
Cursor Skills System
Authoring `.cursor/skills/` skill packs that the Cursor Agent and SDK can pick up. Use when adding reusable capabilities to a project (or user-global), structuring SKILL.md frontmatter, and pairing skills with the SDK via `local.settingSources`.
Cursor Subagents
Define delegated subagents on a Cursor SDK agent via the `agents` field — `AgentDefinition`, MCP scoping, and model inheritance. Use when decomposing work across specialist personas.