.clinerules 1.5 KB

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