LLMs.txt

让 Claude、Cursor、Windsurf 等 AI 助手理解 HeroUI v3

我们提供 LLMs.txt 文件,让 AI 编码助手可以访问 HeroUI v3 文档。

可用文件

核心文档:

适用于上下文窗口有限的场景:

全平台:

包内文档

@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.md

llms.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.txt

了解更多

Windsurf: 添加到你的 .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 文件。

本页目录

使用 HeroUI Pro 更快构建组件、模板与 AI 工具探索 Pro