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.
npx agentmods add rules/alibaba/hooks/demogit clone --depth 1 https://github.com/alibaba/hooksWhat 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 | $0.00000 | $0.00355 |
| Opus 5 | $0.00000 | $0.00178 |
| Sonnet 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 today.
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.
- today First seen · 44 lines · 0 tokens per session scan A 4bb80113a9ae
demo is a cursor rule published in the GitHub repository alibaba/hooks (14,977 stars, last pushed today), 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
cursor
FlagsKit feature flags — API patterns and usage rules.
upgrade-tests
// ✅ CORRECT: Upgrade package pattern await using ctx = testReactResource(appRouter, { server: { // server configuration }, client(opts) { return { links: [ httpLink({ url: opts.httpUrl, // client configuration }), ], }; }, }).
development-conventions
Development conventions, code style, and best practices for the Kaneo project.
test-running
When running tests, use the --watch false flag to avoid watch mode.
general
Wonder Blocks design system conventions, component patterns, and coding standards.
hydration-safety
React hydration mismatch prevention.