AI 集成
react-simplikit 提供了多种资料,帮助 AI 编程 agent(Claude Code、Codex、Cursor 等)在手写 Hook 之前找到合适的现有 Hook。
Agent skill
react-simplikit skill 包含所有 Hook、组件和工具函数的目录及一句话说明,以及 import 和 SSR 规则。安装后,agent 可以在编写防抖、节流、外部点击检测、键盘避让等逻辑前查阅目录,并在使用 API 前阅读附带的参考文档。
sh
npx skills add toss/react-simplikit --skill react-simplikitsh
claude plugin marketplace add https://github.com/toss/react-simplikit --sparse .claude-plugin packages/plugin
claude plugin install react-simplikit@react-simplikitsh
codex plugin marketplace add https://github.com/toss/react-simplikit
# then install "react-simplikit" from the plugin UISkill 由这些文档页面生成,以保持与库的内容一致。源代码位于 packages/plugin。
llms.txt
英文文档也以 agent 可以直接读取的格式发布。
llms.txt— 英文文档的索引和一句话摘要llms-full.txt— 合并为单个文件的英文文档- 将英文文档 URL 中的
.html替换为.md,即可读取 Markdown 源文件。例如,你可以阅读useDebounce.md。
Context7
react-simplikit 已在 Context7 中以 /toss/react-simplikit 收录。使用 Context7 MCP 服务器的 agent 无需额外配置即可查询文档。
验证 agent 访问
- 让 agent 使用已安装的 skill 或 llms.txt,为具体任务查找 API,例如在用户停止输入 300 ms 后调用搜索函数。
- 让它读取链接中的 useDebounce Markdown 参考,并在编写代码前说明 import、参数、默认值和清理行为。
- 确认它从
react-simplikit使用具名导入,能够区分延迟回调与延迟值,并说明取消待执行回调不会中止已经开始的请求。 - 检查已安装的包版本是否提供该 API,并在项目中运行代码。网站提供最新文档;查找正确并不代表与旧版本兼容。
如果 agent 无法加载 skill 或访问网站,请直接提供相关 Markdown 参考。仅安装 skill 不能证明 agent 已读取文档。描述所需行为时,可以参考常见使用场景。