cursor
# Cursor
AI 原生 IDE,基于 VS Code 改造。
# 配置结构
分项目级和用户级两层,项目级优先级更高。
# Rules(规则)
持久化指令,告诉 AI「怎么做」,类似 .editorconfig。
| 路径 | 作用域 |
|---|---|
.cursor/rules/*.mdc | 当前项目 |
~/.cursor/rules/*.mdc | 所有项目 |
---
description: 规则描述
globs: ["**/*.md"] # 匹配文件范围,空数组=全局
alwaysApply: true
---
规则正文
1
2
3
4
5
6
7
2
3
4
5
6
7
# Agents(子代理)
拥有独立系统提示词的专项 AI 助手,隔离上下文执行特定任务。
| 路径 | 作用域 |
|---|---|
.cursor/agents/*.md | 当前项目 |
~/.cursor/agents/*.md | 所有项目 |
---
name: agent-name # 唯一标识(小写+连字符)
description: 何时使用 # AI 据此判断是否自动委派
---
系统提示词正文
1
2
3
4
5
6
2
3
4
5
6
# Skills(技能)
可复用指令包,包含工作流、模板、脚本,比 Agent 更侧重"做事方法"。
| 路径 | 作用域 |
|---|---|
.cursor/skills/<name>/SKILL.md | 当前项目 |
~/.cursor/skills/<name>/SKILL.md | 所有项目 |
# 三者关系
Rules -> 全局行为约束("代码用中文注释")
Agents -> 专项 AI 角色("code-reviewer")
Skills -> 可复用工作流("PDF 处理流程")
1
2
3
2
3
# MCP
# 相关链接
- 官网:https://cursor.com/
- Rules 文档:https://cursor.com/docs/rules
- Agents 文档:https://cursor.com/docs/subagents
- Agent Skills 规范:https://agentskills.io/specification
- Cursor Agent 使用心得 (opens new window)
- Cursor 中 MCP 的接入和使用 (opens new window)
上次更新: 2026/09/10, 20:52:09