Skip to main content

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).

来源信息

仓库
HKTITAN/cursor-sdk
最近来源活动
2026年5月3日 08:23
检测到的 SKILL.md 语言
英语
星标
2
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
10 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
cursor-rules
description
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).
metadata
{"internal":false,"source":"https://cursor.com/docs/context/rules"}
# cursor-rules Rules are how you bake context into a project so every Agent run starts with the right instructions. The SDK reads them through `local.settingSources` — see [[../cursor-sdk/references/local-options]]. ## When to use - Adding repo-level coding conventions an SDK agent should follow - Writing per-folder `AGENTS.md` for nested context - Migrating from `.cursorrules` to `.cursor/rules/*.mdc` - Choosing between always-on, auto-attached, agent-requested, and manual rules ## File locations - [[references/file-locations]] — `.cursor/rules/`, `AGENTS.md`, legacy `.cursorrules` - [[references/scope-and-precedence]] — team / project / user, hierarchy ## Authoring `.mdc` rules - [[references/mdc-frontmatter]] — `description`, `globs`, `alwaysApply` - [[references/rule-types]] — Always / Auto-attached / Agent-requested / Manual - [[references/glob-patterns]] — `**/*.tsx`, comma-separated lists ## `AGENTS.md` - [[references/agents-md]] — markdown-only, nested per directory - [[references/agents-md-vs-rules]] — when to pick which ## SDK integration - [[references/sdk-integration]] — `settingSources` and what loads where - [[references/limitations]] — Tab and Inline Edit don't read rules ## Cross-links - SDK setting sources → [[../cursor-sdk/references/local-options]] - Hooks (sibling .cursor/ feature) → [[../cursor-hooks/SKILL]] - Skills (sibling .cursor/ feature) → [[../cursor-skills-system/SKILL]]
在 GitHub 查看