adhd

A set of rules for keeping coding-agent work and replies short, focused and careful. ADHD refers to attention-deficit/hyperactivity disorder, but here it is the name of the add-on.

In plain words
What is it for?
Use it to guide code decisions, ask focused questions, estimate context use and report progress in a consistent format.
Why use it?
It helps avoid unnecessary code and requires a brief status line at the end of each reply, while checking understanding before making changes.

Cursor rule

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/jerryfish123/adhd-mcp/adhd
Clone the repo
git clone --depth 1 https://github.com/JerryFish123/adhd-mcp
Per session 699 This file is loaded in full into every session.
When invoked 699 The same file — it is already loaded in full.
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.00699 $0.00699
Opus 5 $0.00349 $0.00349
Sonnet 5 $0.00140 $0.00140
Haiku 4.5 $0.00070 $0.00070

Measured yesterday against content hash 498215a5e7a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

adhd 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 yesterday.

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.

templates/cursor/rules/adhd.mdc · 65 lines

What it actually says

ADHDMCP · Rule(少写 + 输出底线)

本仓库已启用 adhd-mcpnpx adhd-mcp init)。用户不必点名。

Ponytail · 写代码前先爬梯子

Lazy = efficient, not careless. 最好代码是不写的代码。

写任何代码前,在第一档能停就停:

  1. 这功能真的需要吗?(YAGNI)
  2. 仓库里已有可复用的吗?
  3. 标准库够吗?
  4. 平台原生能力够吗?
  5. 已安装依赖能覆盖吗?
  6. 能一行吗?
  7. 才写 最少必要 代码

梯子前 先理解:读相关代码、trace 真实流程。Bug 修 根因(改共享函数一次),不逐处打补丁。

Not lazy about:信任边界校验、防数据丢失、安全、无障碍、用户明确要求的内容。

ADHD · 每条回复底线

  • 能短则短;语言 跟随用户
  • 每条回复末尾必须有状态行:
    1. 先写完正文
    2. 必须调用 MCP format_status_footer(传本轮字符数,见下)
    3. 原样粘贴工具返回的 footer 字段 — 禁止手写 footer
📊 理解 X% │ 进度 Y% │ ctx ~Z% │ 本轮 ~N tok
  • 必须 4 段(含 本轮 ~N tok);仅 3 段或旧 tok ~N 格式 禁止

  • 本轮 tok本次交互估算 = 用户输入 + 回复输出 + tool 结果 + tool 调用开销

    • user_message_charsreply_charstool_result_charstool_call_count
    • 有 IDE 精确值则传 turn_tokens_reported
    • 不含历史 context/cache(那看 ctx %
  • 理解 <95%禁止改代码 / 副作用;只问 一个问题

  • 详细 Q&A 流程 → Skill adhd-qa

  • 详细输出格式 → Skill adhd-output

MCP 工具(adhd_mcp)

工具 何时
qa_session_start / qa_session_append Q&A 开始时
check_readiness 写码前
estimate_context / format_status_footer 每条回复结尾

禁止

  • 理解未达标就写代码
  • Q&A 阶段一次问多个问题
  • 跳过 footer 或省略「本轮 tok」
  • 手写 footer(不调用 format_status_footer
  • 自动 commit / push(除非用户明确要求)
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. yesterday First seen · 65 lines · 699 tokens per session scan A 498215a5e7a5

Subscribe to this mod's changes

adhd is a cursor rule published in the GitHub repository JerryFish123/adhd-mcp (0 stars, last pushed 13d ago), licensed MIT. It adds 699 tokens to every session, about $0.0035 per session on Opus 5. 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-31.