cli-whitelist-docs

A project rule for keeping Agent CLI allowlists and their documentation synchronized. An allowlist is the set of command-line tools an agent is permitted or recommended to use.

In plain words
What is it for?
Use it whenever adding or changing an Agent CLI entry so the relevant backend settings, desktop labels, tests, guides, and changelog are updated together.
Why use it?
It prevents the code, installation guidance, routing settings, and user-facing documentation from describing different available tools.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/fancy1108/clutch/cli-whitelist-docs
Clone the repo
git clone --depth 1 https://github.com/fancy1108/Clutch

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 724 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00724
Opus 5 $0.00000 $0.00362
Sonnet 5 $0.00000 $0.00145
Haiku 4.5 $0.00000 $0.00072

Measured 2d ago against content hash 361996034a13, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

cli-whitelist-docs 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.

.cursor/rules/cli-whitelist-docs.mdc · 45 lines

What it actually says

Layer 4 操作剧本 · 不扩权。铁律见 CLAUDE.md;决策见 memory/DECISIONS.md D19。 本文件不定义新规则,仅描述「新增 Agent CLI 白名单」时的代码与文档同步步骤。

Agent CLI 白名单 — 代码 + 文档同步

用户要求「加 CLI」或你修改 CLI 白名单/路由时,同一 Task 内完成代码与文档,不单改代码。

代码(最小集)

文件 改动
services/orchestrator/src/tools_status.py CLI_CANDIDATES;若推荐则 RECOMMENDED_CLI_IDS
services/orchestrator/src/engine_router.py CLI_ROUTING_CONFIGS curated 路由
services/orchestrator/src/agent_type.py AGENT_TYPES + 别名
services/orchestrator/src/provider_registry.py ProviderSpec(若一等公民路由)
services/orchestrator/src/adapters/cli_adapter.py _CLI_BINARY_LABELS
services/orchestrator/src/agent_executor.py tool id 集合
apps/desktop/src/services/cliInstallGuides.ts 安装指引 + RECOMMENDED_CLI_IDS
apps/desktop/src/services/agentTypes.ts 显示名与 legacy 映射
apps/desktop/src/services/workflowAgentSteps.ts TOOL_LABELS
services/orchestrator/tests/test_tools_status.py 候选与 resolve_agent_type_for_tool

文档(D19 必更)

  1. docs/PRODUCT_INTRO.md — EngineRouter 列表、Tool Settings 推荐 CLI
  2. docs/GETTING_STARTED.md — 中英「常见配置」表各一行
  3. CHANGELOG.md — 当前开发版本节 Added(现为 ## [1.4.0] - Unreleased,D59)
  4. README.md / README.zh-CN.md — CLI 能力表;若用 --dangerously-skip-permissions 则安全节
  5. memory/FILEMAP.md — 仅当路径映射有变
  6. docs/index.html — 官网引擎条带 + hero 浮层 logo(docs/assets/tool-logos/
  7. apps/desktop/src/assets/tool-logos/ + services/brandLogos.ts(若已路由)
  8. docs/research/pty-session.md — 附录引擎一览(可选,保持与路由一致)

示例:codebuddy-cli

  • 二进制:codebuddy(别名 cbc
  • 路由:codebuddy -p + --dangerously-skip-permissionsconversation_mode: separate
  • 推荐列表首位(当前策略)
Changes

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.

  1. 2d ago First seen · 45 lines · 0 tokens per session scan A 361996034a13

Subscribe to this mod's changes

cli-whitelist-docs is a cursor rule published in the GitHub repository fancy1108/Clutch (87 stars, last pushed 5d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 724 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.