让 Claude、Cursor、Windsurf 等 AI 助手理解 HeroUI v3
我们提供 LLMs.txt 文件,让 AI 编码助手可以访问 HeroUI v3 文档。
可用文件
核心文档:
- /react/llms.txt:React 文档的快速参考索引
- /react/llms-full.txt:完整的 HeroUI React 文档
适用于上下文窗口有限的场景:
- /react/llms-components.txt:仅包含组件文档
- /react/llms-patterns.txt:常见模式与代码片段
全平台:
- /llms.txt:快速参考索引(React + Native)
- /llms-full.txt:完整文档(React + Native)
- /llms-components.txt:全部组件文档
- /llms-patterns.txt:全部模式与代码片段
包内文档
@heroui/react 还会以 Markdown 形式随包附带文档,因此编码代理读取的是你项目中已安装版本的文档,且无需访问网络。
node_modules/@heroui/react/docs/llms.txt
node_modules/@heroui/react/docs/components/button.md
node_modules/@heroui/react/docs/guides/theming.mdllms.txt 是索引:它把任务(“构建主题”“搭建项目”)引导到应该阅读的页面,并列出所有组件和指南。在 AGENTS.md 或 CLAUDE.md 中让你的代理指向它:
Before using a HeroUI component, read `node_modules/@heroui/react/docs/llms.txt`
and the page it links for that component.上方的托管文件始终描述最新发布的版本。当你的项目使用较旧的版本时,请优先使用包内的副本。
集成
Claude Code: 让 Claude 参考文档:
Use HeroUI React documentation from https://heroui.com/react/llms.txt或者添加到你项目中的 .claude 文件以自动加载。
Cursor: 使用 @Docs 功能:
@Docs https://heroui.com/react/llms-full.txtWindsurf: 添加到你的 .windsurfrules 文件:
#docs https://heroui.com/react/llms-full.txt其他 AI 工具: 大多数 AI 助手都可以通过 URL 引用文档。只需提供:
https://heroui.com/react/llms.txt针对特定组件的文档:
https://heroui.com/react/llms-components.txt针对模式与最佳实践:
https://heroui.com/react/llms-patterns.txt参与贡献
发现 AI 生成的代码有问题?欢迎在 GitHub 上帮助我们改进 LLMs.txt 文件。