Ver Fonte

feat: add .clinerules for Context7 MCP auto-usage configuration

- Add .clinerules file to enable automatic Context7 MCP server usage
- Configure rules for code generation, library setup, and API documentation scenarios
- Enable auto-invocation of resolve-library-id and get-library-docs tools
sw há 2 semanas atrás
pai
commit
0ce5db4b46
1 ficheiros alterados com 32 adições e 0 exclusões
  1. 32 0
      .clinerules

+ 32 - 0
.clinerules

@@ -0,0 +1,32 @@
+# Cline Rules - Context7 MCP 使用指示
+
+## Context7 MCP 自动使用规则
+
+当需要以下情况时,自动使用 context7 MCP server:
+
+1. **代码生成和实现** - 编写新的代码功能或组件时
+2. **库和框架的设置配置步骤** - 配置第三方库、框架或工具时
+3. **API 文档查询** - 需要查看最新的 API 文档和使用方法时
+4. **最新的库文档和代码示例** - 获取最新版本的库文档和实际代码示例时
+
+## 具体指示
+
+这意味着你应该自动使用 Context7 MCP 工具来:
+- 使用 `resolve-library-id` 工具解析库名称到 Context7 兼容的库 ID
+- 使用 `get-library-docs` 工具获取最新的库文档和代码示例
+- 无需我明确要求 "use context7",应该主动使用这些工具
+- Always use context7 when I need code generation, setup or configuration steps, or
+library/API documentation. This means you should automatically use the Context7 MCP
+tools to resolve library id and get library docs without me having to explicitly ask.
+
+## 示例场景
+
+- 当我询问如何使用 React、Vue、Next.js 等框架时
+- 当我需要配置 TypeScript、Webpack、Vite cornerstone3D 等工具时
+- 当我询问某个库的最新 API 用法时
+- 当我需要实现特定功能的代码示例时
+
+通过自动使用 Context7,确保提供的代码和文档都是最新、准确的。
+## 注意
+- 优先考虑使用和当前依赖库版本兼容的代码和文档
+- 如果无法通过 Context7 获取所需信息,再考虑其他来源