mode

A work-mode switcher that changes how the coding agent approaches a task: development, research, review, or planning. Each mode sets priorities and a different working process.

In plain words
What is it for?
Use it before implementing features, investigating an unfamiliar project, reviewing code, or planning architecture and larger changes.
Why use it?
It makes the agent’s behaviour fit the job at hand instead of using one approach for every task. For example, review mode prioritises security and severity-ranked findings, while research mode delays coding until the problem is understood.

Command

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 commands/xiaobei930/cc-best/mode
Clone the repo
git clone --depth 1 https://github.com/xiaobei930/cc-best
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,017 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.00019 $0.01017
Opus 5 $0.00010 $0.00508
Sonnet 5 $0.00004 $0.00203
Haiku 4.5 $0.00002 $0.00102

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

Security

Grade A, and why

mode 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.

commands/mode.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/mode - 工作模式切换

切换 Claude 的工作模式,调整行为风格以适应不同场景。

可用模式

dev - 开发模式

/cc-best:mode dev

行为特点:

  • 先写代码再解释
  • 偏好工作方案而非完美方案
  • 变更后运行测试
  • 保持提交原子化

优先级:

  1. 让它工作
  2. 让它正确
  3. 让它整洁

适用场景: 实现功能、修复 Bug、快速迭代


research - 研究模式

/cc-best:mode research

行为特点:

  • 先理解再行动
  • 提出澄清问题
  • 边探索边记录
  • 理解清晰前不写代码

研究流程:

  1. 理解问题
  2. 探索相关代码/文档
  3. 形成假设
  4. 用证据验证
  5. 总结发现

适用场景: 新项目理解、架构分析、技术调研


review - 审查模式

/cc-best:mode review

行为特点:

  • 彻底阅读后再评论
  • 按严重性排序问题(Critical > High > Medium > Low)
  • 建议修复方案,不仅指出问题
  • 检查安全漏洞

审查清单:

  • 逻辑错误
  • 边界情况
  • 错误处理
  • 安全问题(注入、认证、密钥)
  • 性能问题
  • 可读性
  • 测试覆盖

适用场景: PR 审查、代码分析、质量评估


planning - 规划模式

/cc-best:mode planning

行为特点:

  • 不低估任务复杂度
  • 明确识别依赖和风险
  • 计划具体可执行
  • 宁可过度规划

规划流程:

  1. 任务分析
  2. 方案设计(至少 2 个选项)
  3. 任务分解
  4. 风险识别

适用场景: 新功能设计、重构规划、架构决策


模式与角色的关系

模式是"怎么做",角色是"做什么",两者正交互补。

模式 推荐角色
dev /cc-best:dev
research /cc-best:lead /cc-best:pm
review /cc-best:qa
planning /cc-best:lead /cc-best:pm

示例用法

# 开始功能开发前
/cc-best:mode planning
/cc-best:pm "分析用户认证需求"

# 进入开发阶段
/cc-best:mode dev
/cc-best:dev "实现 JWT 认证"

# 代码审查
/cc-best:mode review
/cc-best:qa "审查认证模块"

# 技术调研
/cc-best:mode research
/cc-best:lead "调研 OAuth 2.0 最佳实践"

当前模式

执行 /cc-best:mode 不带参数可查看当前模式。

当前模式状态保存在 memory-bank/current-mode.md 中。


Context 模板

每个模式都有对应的上下文模板,切换模式时会自动加载:

模式 Context 文件 核心指令
dev skills/session/context-dev.md 先写代码,自动测试
research skills/session/context-research.md 只读探索,记录发现
review skills/session/context-review.md 严格标准,不修改代码
planning skills/session/context-planning.md 多方案对比,风险评估

切换模式时,读取对应 context 模板以注入模式特定的行为指令和工具偏好。

Read the full file on GitHub · 167 lines

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 · 167 lines · 19 tokens per session scan A 425a7274b3d6

Subscribe to this mod's changes

mode is a command published in the GitHub repository xiaobei930/cc-best (50 stars, last pushed 2mo ago), licensed MIT. It adds 19 tokens to every session and 1,017 once invoked, about $0.0001 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-30.