1234567891011121314151617181920212223242526272829303132 |
- # 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 获取所需信息,再考虑其他来源
|