alibaba/hooks is a TypeScript library of React Hooks, including basic utilities and Hooks shaped by common application development needs. React developers use it in applications that may also require server-side rendering and predictable static types. The catalogue entries provide rules and instructions for using the library.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/alibaba/hooksWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/alibaba/hooks/demo)<a href="https://agentmods.dev/rules/alibaba/hooks/demo"><img src="https://agentmods.dev/badge/rules/alibaba/hooks/demo/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/alibaba/hooks/demo"><img src="https://agentmods.dev/badge/rules/alibaba/hooks/demo.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00355 |
| Opus 5.5 | $0.00000 | $0.00142 |
| Sonnet 5.5 | $0.00000 | $0.00071 |
| Haiku 4.5 | $0.00000 | $0.00036 |
Grade A, and why
demo scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Demo 规范
- demo 代码尽可能简洁
- 避免冗余代码,方便用户复制到项目直接使用
- 每个 demo 聚焦展示一个功能点
- 提供中英文两个版本的说明
- demo 文件命名:
- 英文 demo: index.en-US.md
- 中文 demo: index.zh-CN.md
- 确保 demo 在各种尺寸下都能正常展示
- 对于复杂交互提供必要的操作说明
文件组织
- 每个组件演示包含
.md(说明文档)和.ts(实际代码)两部分 - 位置:hooks 目录下的
src子目录,如packages/hooks/src/useHover - 文件名应简洁地描述示例内容
MD 文档规范
- 必须包含
## zh-CN和## en-US两种语言说明 - 内容简洁明了,突出组件特性和用法
- 避免冗长段落,必要时使用列表或粗体
- 标注注意事项和实验性功能
代码质量
- 实用且专注于单一功能
- 关键处添加简洁注释
- 使用有意义的数据和变量
- 优先使用 ahooks 内置 hook 或者公共方法,减少外部依赖
质量要求
- 确保代码运行正常,无控制台错误
- 适配常见浏览器
- 避免过时 API,及时更新到新推荐用法
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 44 lines · 0 tokens per session scan A 4bb80113a9ae
demo is a cursor rule published in the GitHub repository alibaba/hooks (14,973 stars, last pushed 9d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 355 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.
Other cursor rules, from other repositories
explorer-interface-brief
Use when asked to design the interface for an interactive 3D explorer, plan a UI for exploring a 3D model of a topic, or write an image-model prompt for a 3D learning app mock-up. Produces, from a topic, the UI design brief (audience, layout, panels, interactions, label style, colour palette, accessibility) and an…
tanstack-react-router_routing
TanStack Router: Routing.
project-structure
Folder layout for Next.js App Router and Vite + React variants.
react-basics-state
A set of React rules for managing shared application state with Context API and useReducer. React is a JavaScript library for building user interfaces; shared state is information used by multiple parts of an interface.
react-chakra-ui-cursorrules-prompt-file
description: "Cursor rules for React development with Chakra UI integration." globs: / alwaysApply: false.
modus-checkbox-value-inversion-react-short
Critical bug fix for ModusWcCheckbox value property inversion.