Token导航 LogoToken导航

Agent Skill · 开发规范

cursor-best-practices(Cursor 最佳实践)

cursor-best-practices 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

cursor-best-practices 是开发规范类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为操作浏览器;许可证为 MIT,第三方扫描有提醒项,按安装量在开发规范类的 1,265 个 Skill 里排第 543。

总安装 1,023周安装 41GitHub Stars 5下载 331核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cursor-best-practices(Cursor 最佳实践)
来源仓库:https://github.com/hktitan/cursor-best-practices
仓库路径:skills/cursor-best-practices
安装命令:
npx skills add https://github.com/hktitan/cursor-best-practices --skill cursor-best-practices
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/hktitan/cursor-best-practices --skill cursor-best-practices

这个 Skill 是做什么的

开发规范类 Skill 用来统一代码风格、目录结构和评审口径,产出多为检查清单或改写建议。

cursor-best-practices 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/cursor-best-practices

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/hktitan/cursor-best-practices --skill cursor-b…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cursor-best-practices 怎么安装?

在终端执行 npx skills add https://github.com/hktitan/cursor-best-practices --skill cursor-best-practi…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cursor-best-practices 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cursor-best-practices 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

cursor-best-practices 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

cursor-best-practices 用的人多吗?

公开数据是累计安装 1,023 次,近一周安装 41 次,下载 331 次,GitHub 5 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cursor-best-practices 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发规范类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

开发规范类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
vercel-react-best-practices

Vercel React 最佳实践 · Codex、Claude

8,490,72025,918操作浏览器MIT通过
web-design-guidelines

网页设计指南 · Codex、Claude

6,686,01625,885需要联网MIT有提醒
remotion-best-practices

Remotion 最佳实践 · Codex、Claude

6,505,6323,027操作浏览器MIT有提醒
supabase-postgres-best-practices

Supabase Postgres 最佳实践 · Codex、Claude

3,175,5232,030需要联网MIT通过
next-best-practices

Next.js 最佳实践 · Codex、Claude

1,848,240841操作浏览器MIT通过
cursor-best-practices

Cursor 最佳实践 · 本页

1,0235操作浏览器MIT有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

cursor-best-practices

A structured repository for creating and maintaining Cursor Best Practices optimized for agents and LLMs. This skill provides references/ (on-demand docs) and assets/templates/ (rule, command, and subagent templates) covering rules, commands, skills, subagents, ignore files, Agent security, workflows, and community resources.


When to use

Apply this skill when users:

  • Set up or initialize Cursor, create the .cursor folder, or ask "setup my.cursor folder"
  • Write or edit .cursor/rules, AGENTS.md, or rule frontmatter
  • Create or use slash commands, skills, or subagents
  • Configure .cursorignore or .cursorindexingignore
  • Work with Agent modes (Agent, Ask, Plan, Debug), semantic search, or @mentions
  • Ask about TDD, git-style commands, large codebases, or Cursor workflows
  • Discover rules or MCPs (cursor.directory) or skill recommendations (skills.sh)
  • Ask about plugins, hooks, Cloud Agent, CLI, worktrees, or deeplinks

Rules

Locations: Project .cursor/rules/ (.md/.mdc), user Cursor Settings → Rules, Team dashboard. Precedence: Team → Project → User.

Types and when to use:

TypeWhen to use
Always ApplyMust affect every request (e.g. "No any in TS", "Run tests before done"). Use sparingly.
Apply IntelligentlyGeneral guidance when relevant (e.g. "Prefer functional components").
Apply to Specific FilesUse globs (e.g. **/*.test.ts, **/api/**). Rule loads only when those files are in context.
Apply ManuallyUser invokes with @rule-name when needed (e.g. release process, legacy quirks).

Frontmatter: description (keyword-rich, helps relevance), globs (file-specific), alwaysApply (use rarely). Keep each rule <500 lines; split by concern, link to references/. AGENTS.md = project-root plain markdown alternative; no frontmatter.

Best practices: Composable rules, concrete examples. Reference—don't copy—long runbooks. Start simple; add rules when the agent keeps making the same mistake. Migrate legacy .cursorrules to Project Rules or AGENTS.md.

See: Rules. assets/templates/rules/_sections.md | references/templates-index.md | references/rules-and-commands.md.


Commands

Locations: Project .cursor/commands/, user ~/.cursor/commands/, Team dashboard. Format: Plain Markdown .md; filename = command name. Trigger with / in chat. Parameters: Text after the command is passed as context (e.g. /fix-issue 123 → "123").

Available templates (copy into .cursor/commands/):

CommandPurpose
/code-reviewReview for correctness, security, quality, tests. Output: Critical / Suggestion / Nice to have.
/prSummarize changes, propose PR title/description, suggest review checklist.
/run-tests-and-fixRun tests, fix failures, re-run until green; summarize changes.
/security-auditSecurity-focused review (injection, auth, secrets, deps).
/setup-new-featurePropose plan (files, modules, patterns), suggest implementation steps.
/fix-issueFix bug or feature from issue # or description.
/update-depsUpdate deps, run tests, report breaking changes.
/docsGenerate or update docs for @-mentioned code or current feature.
/make-cursor-compatibleMake codebase Cursor compatible: add.cursor folder,.cursorignore, AGENTS.md, rules, commands, indexes.
/lint-and-fixRun linter, auto-fix issues, report remaining issues.
/formatFormat code according to project standards.
/check-coverageCheck test coverage, identify gaps, suggest improvements.
/analyze-depsAnalyze dependency tree, identify unused/duplicate deps, suggest optimizations.
/generate-typesGenerate TypeScript/types from schemas, APIs, or JSON.

See: Commands. assets/templates/commands/.


Skills and subagents

Skills: Loaded from .agents/skills/, .cursor/skills/, or ~/.cursor/skills/ (and .claude/skills/, .codex/skills/ for compatibility). Each skill is a folder with SKILL.md; optional scripts/, references/, assets/. Frontmatter: name, description (required); optional license, compatibility, metadata, disable-model-invocation (when true, skill only applies when invoked via /skill-name). Agent applies when relevant or via /skill-name. Use /migrate-to-skills (Cursor 2.4+) to convert eligible rules and commands to skills. Subagents: .cursor/agents/ or ~/.cursor/agents/; markdown + YAML name, description, optional model, readonly, background. Foreground vs background; built-ins (Explore, Bash, Browser).

When to use: Subagents — context isolation, parallel work, multi-step specialized tasks (e.g. verifier that only runs tests/lint). Skills — single-purpose, repeatable tasks (changelog, format, domain-specific workflows).

Templates: Copy subagent templates from assets/templates/agents/ → .cursor/agents/. Available subagents:

Read-only (review/analysis):

  • verifier.md — Runs tests and lint, reports only
  • reviewer.md — Code review for correctness, security, quality, tests
  • security-auditor.md — Security-focused review
  • linter.md — Linting and code style review
  • architect.md — Architectural pattern and design review

Editable (can modify code):

  • documenter.md — Generate/update documentation
  • tester.md — Write and update tests
  • refactorer.md — Refactor code while maintaining functionality
  • debugger.md — Investigate and identify bugs
  • performance-analyzer.md — Analyze performance issues and bottlenecks
  • accessibility-checker.md — Review code for a11y compliance
  • migrator.md — Handle code migrations systematically
  • dependency-manager.md — Review and manage dependencies
  • formatter.md — Format code according to standards
  • type-generator.md — Generate types from schemas/APIs

Skill recommendations: assets/recommended-skills.md and skills.sh only; suggest npx skills add <owner/repo>.

See: Skills, Subagents.


Ignore files

.cursorignore: Project root; same syntax as .gitignore. Excluded paths are not used for semantic search, Tab, Agent, Inline Edit, @mentions. Not terminal/MCP. Why: Security (secrets, keys, credentials), performance (large repos). .cursorindexingignore: Indexing only; files still usable if @-mentioned.

Must exclude: .env, .env.*, *.key, *.pem, credentials.json, **/secrets/**. Add project-specific paths. Use ! carefully; parent exclusions limit re-includes.

See: Ignore files. assets/templates/rules/ignore-cursorignore-secrets.md.


Agent and security

Agent: Rules + tools (search, read, edit, terminal, MCP) + your messages. Summarization (/summarize), checkpoints. Queue (Enter) vs Ctrl+Enter (send immediately).

Security: File edits allowed (except protected config); use VCS. Terminal: approval by default; avoid "Run everything". MCP: approve connection + each tool call. Network: GitHub, link fetch, search only. Put secrets in .cursorignore.

See: Agent overview, Agent security. references/agent-and-security.md.


Agent modes

ModePurposeTools
AgentImplement, refactor, multi-file work.Full (search, read, edit, terminal, MCP).
AskLearning, Q&A, exploration.Search + read only; no edits.
PlanResearch → clarify → plan → you review → "Build".Search + read. Plans in .cursor/plans/; Shift+Tab to switch.
DebugReproducible bugs; hypotheses → instrument → reproduce → fix → verify.Full.

Switch: Mode picker in chat; Ctrl+. to cycle. Best practice: Plan with Ask/Plan, implement with Agent. If Agent builds wrong thing, revert → refine plan → re-run.

See: Plan Mode, Debug Mode. assets/templates/rules/modes-plan-then-agent.md. references/modes-context-tools.md.


Workflows and large codebases

TDD: Write tests → run (expect fail) → commit tests → implement → run until pass → commit impl. Run tests before done: assets/templates/rules/workflows-run-tests-before-done.md.

Git-style commands: /pr, /fix-issue, /review, /update-deps, /docs in .cursor/commands/. Codebase understanding: "How does X work?", "How do I add Y?"; broad → narrow. Diagrams: Ask for Mermaid architecture/data-flow. Hooks: .cursor/hooks.json for long-running loops. Design → code: Paste mockups; use Browser for preview.

Large codebases: Domain rules in .cursor/rules with globs; Plan with Ask, implement with Agent. Tab = quick edits; Inline Edit (Ctrl+K) = single-file; Chat/Agent = multi-file. Use @files, @folder, @Code; scope down; new chats when context is noisy.

See: Agent workflows, Large codebases. references/workflows-and-codebases.md.


Semantic search, @mentions, Tab

Semantic search: Meaning-based; natural-language questions. Indexing on workspace open; usable ~80% completion. Use both grep (exact) and semantic (conceptual): assets/templates/rules/context-use-grep-and-semantic.md.

@Files & Folders: Reference by path; drag from sidebar. @Code: Specific snippets (most precise). @Docs: Bundled or Add new doc (URL). /summarize — compress context. Best practice: assets/templates/rules/context-use-at-mentions.md.

Tab: Inline autocomplete; Tab accept, Esc reject, Ctrl+Right partial. Use for speed; Inline Edit or Chat for larger changes.

See: Semantic search, @ Mentions, Tab.


Bugbot, MCP, shortcuts

Bugbot: PR review (bugs, security, quality). .cursor/BUGBOT.md at project root (always included) and nested per directory (included when reviewing files under that path); Team rules from dashboard apply to all repos. Trigger: comment cursor review or bugbot run; use verbose=true for request ID. Autofix spawns a Cloud Agent to fix reported issues (commit to branch or new branch). MCP: External tools; approve connection + tool calls. cursor.directory for community rules & MCPs. Skills: skills.sh only.

Shortcuts: Ctrl+I Agent | Ctrl+K Inline Edit | Ctrl+. cycle modes | Enter queue, Ctrl+Enter send | Tab accept completion, Esc reject.

See: Bugbot, MCP.


Plugins, Hooks, Cloud Agent, CLI, Worktrees, Deeplinks

Plugins: Bundle rules, skills, agents, commands, MCP servers, and hooks in distributable packages. .cursor-plugin/plugin.json manifest; install from Cursor Marketplace or team marketplaces (Teams/Enterprise). See: Plugins.

Hooks: .cursor/hooks.json (project) or ~/.cursor/hooks.json (user). Observe or gate agent loop stages (e.g. beforeShellExecution, afterFileEdit, sessionStart). Command-based (script) or prompt-based (LLM). See: Hooks.

Cloud Agent: Agents run in the cloud; access via API, Linear, GitHub, Slack, Desktop (Cloud in dropdown), or cursor.com/agents (Web/PWA). MCP support; spend limit; "Apply" to bring worktree changes to your branch. See: Cloud Agent.

CLI: agent command for interactive or non-interactive use. Modes: Agent, Plan, Ask. Cloud handoff: & in chat or agent -c "prompt". Sessions: agent ls, agent resume. See: CLI.

Worktrees: Parallel agents run in separate Git worktrees. .cursor/worktrees.json for setup (e.g. setup-worktree, OS-specific). Best-of-N: run same prompt on multiple models; Apply to merge result. See: Worktrees.

Deeplinks: Share prompts, commands, or rules via cursor://anysphere.cursor-deeplink/ or https://cursor.com/link/. Max 8,000 characters. See: Deeplinks.


.cursor layout and setup workflow

Folders: rules/, commands/, skills/, agents/. Optional: hooks.json, worktrees.json. AGENTS.md = simple alternative to rules.

Setup my.cursor folder

When the user asks to set up, initialize, or create the .cursor folder:

  1. Create: .cursor/rules/, .cursor/commands/, .cursor/skills/, .cursor/agents/.
  2. Optional .cursorignore: If missing, add minimal (e.g. node_modules/, .env, *.log, dist/). Use .gitignore syntax; adjust for stack.
  3. Optional templates: Offer to copy from this skill. If user agrees:

- Commands: Copy from assets/templates/commands/ → .cursor/commands/ (e.g. code-review.md, lint-and-fix.md, format.md, etc.). - Agents: Copy from assets/templates/agents/ → .cursor/agents/ (e.g. verifier.md, reviewer.md, linter.md, formatter.md, etc.). - Rules: Optionally copy from assets/templates/rules/ or add one starter rule or AGENTS.md.

  1. Confirm: List what was created and how to use it (e.g. "Use /code-review in chat," "Add rules to .cursor/rules/").

See: assets/templates/rules/context-setup-cursor-folder.md. references/templates-index.md.


Troubleshooting

Rules not applying? Check type (Always / Intelligent / Globs / Manual), description (keywords), and globs (paths match). Request ID: "Get request ID" or cursor review verbose=true when reporting. See: Common issues, Troubleshooting guide. references/modes-context-tools.md.


See also

平台分布

Claude Code

31.56%
按下载量换算104

Gemini CLI

21.32%
按下载量换算71

Antigravity

18.36%
按下载量换算61

Cursor

12.61%
按下载量换算42

OpenCode

7.75%
按下载量换算26

qoder

3.06%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills