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/xuliang2024/cutcli-cookbook/docs-stylegit clone --depth 1 https://github.com/xuliang2024/cutcli-cookbookWhat 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.01758 |
| Opus 5 | $0.00000 | $0.00879 |
| Sonnet 5 | $0.00000 | $0.00352 |
| Haiku 4.5 | $0.00000 | $0.00176 |
Grade A, and why
docs-style 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 164 lines — stays where its author put it; the contents beside it link to each section on GitHub.
文档编写规范(docs/**)
VitePress 配置约束
docs/.vitepress/config.mts 关键设置:
cleanUrls: false // 必须保留:让 R2 直接命中 .html 文件
如果改成 cleanUrls: true,docs.cutcli.com/guide/installation 就需要 worker 强行重写到 .html,但 worker 已经做了路径回退(/foo → foo.html → foo/index.html),这层回退是为了兼容 cleanUrls 风格的链接,不要因此关掉路径回退。
中文文档风格
- 中英文之间 1 个空格:「使用 cutcli 创建草稿」
- 数字与中文之间 1 个空格:「3 秒后退出」
- 标点:使用全角中文标点(,。?!);代码 / 命令内保持半角
- 引号:内容用「」,引用用 ""
标题层级
- 每篇 markdown 唯一 H1(用文件 frontmatter
title也行,但要么 frontmatter 要么 H1,二选一不要双写) - H2 用作主要章节
- H3 / H4 用作小节
- 不要直接跳层(H2 → H4)
文件名 / URL 风格
- 文件名 kebab-case:
first-draft.md、time-units.md - URL 不带扩展名(VitePress 自动加
.html) - 内部链接用相对路径:
./first-draft或/guide/first-draft - 引用案例用绝对 GitHub 链接:
https://github.com/xuliang2024/cutcli-cookbook/tree/main/examples/...
链接规则
| 场景 | 写法 |
|---|---|
| 同侧栏内的 guide 互链 | [一节](./time-units) |
| 跨侧栏(guide → reference) | [CLI](/reference/cli) |
| 引用案例目录 | [examples/01-hello-caption](https://github.com/xuliang2024/cutcli-cookbook/tree/main/examples/01-hello-caption) |
| 外链(cutcli.com、GitHub) | 直接 <https://...> 或 [文字](https://...) |
| 引用图片资源 | 放 docs/public/ 下,URL 用 /foo.svg(不是 ./public/foo.svg) |
CI 用 scripts/check-links.mjs 校验内部链接,不通过 fail。
命令示例
- 命令名严格
cutcli,不写cut - 多行命令换行用
\续行 - 复杂 JSON 用
--captions @data/captions.json文件引用,避免 shell 转义噩梦 - 时间字段必须是整数微秒(
3000000);不写3s/3000ms
表格
- 用纯 markdown 表格(
| ... |) - 不要拿 HTML table
- 列对齐用
|---|、|:---|、|---:|、|:---:|
代码块
- 都加语言:
bash、json、typescript、yaml - shell 命令前不加
$提示符(VitePress 主题已视觉化) - 引用本地文件路径用
inline code,例如`docs/.vitepress/config.mts`
VitePress 特有语法
::: tip
小提示
:::
::: warning
警告
:::
::: danger
危险操作
:::
::: details 折叠展开
里面写细节
:::
适度用,不要每段都包。
自动生成区域 ⚠
docs/reference/cli.md、docs/reference/api.md、docs/reference/concepts.md 由 jy_cli/scripts/sync-to-cookbook.mjs 单向覆盖。不要直接编辑:
- 改这些文件 → 下次同步会被覆盖回去
- 真要改 → 改
jy_cli/docs/cli.md(或 api.md / README.md)→ 跑node scripts/sync-to-cookbook.mjs
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.
- 2d ago First seen · 164 lines · 0 tokens per session scan A 427089ed335f
docs-style is a cursor rule published in the GitHub repository xuliang2024/cutcli-cookbook (192 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,758 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-08-30.
Other cursor rules, from other repositories
angular-20
This rule provides comprehensive best practices and coding standards for Angular development, focusing on modern TypeScript, standalone components, signals, and performance optimizations.
dev-standard
Apache Superset development standards and guidelines for Cursor IDE.
cli-error-handling
CLI command error handling patterns.
prefer-direct-imports-over-module-mocks
Prefer extracting a testable core over vi.mock / vi.resetModules when unit tests need to reach production logic entangled with config, env, or singletons.
control-plane-descriptors
Control plane descriptor and instance implementation patterns.
family-instance-domain-actions
Family instance domain action implementation patterns.