self-check

self-check is a command for coding agents from xiaobei930/cc-best. It costs 7 tokens per session (1,321 once invoked), scanned A, original, MIT.

A command for reviewing whether work is complete, correct, and still aligned with the goal. It uses checklists for tasks and project phases and records problems by severity.

In plain words
What is it for?
Use it after tasks or phases, when blocked or uncertain, or after user feedback to verify results, identify red flags, record issues, and decide the next step.
Why use it?
It provides a repeatable review step that can expose missing tests, errors, outdated documentation, unfinished dependencies, or unnecessary complexity.

Command

Part of the cc-best plugin — 3 skills, 44 commands, 8 agents, 20 hooks shipped together

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/self-check
Clone the repo
git clone --depth 1 https://github.com/xiaobei930/cc-best

Or install cc-best, the plugin that ships this one along with the rest of its 3 skills, 44 commands, 8 agents, 20 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for self-check

README.md
[![agentmods](https://agentmods.dev/badge/commands/xiaobei930/cc-best/self-check.svg)](https://agentmods.dev/commands/xiaobei930/cc-best/self-check)
Your own site
<a href="https://agentmods.dev/commands/xiaobei930/cc-best/self-check"><img src="https://agentmods.dev/badge/commands/xiaobei930/cc-best/self-check.svg" alt="Measured on agentmods" height="20"></a>
Per session 7 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,321 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.00007 $0.01321
Opus 5 $0.00003 $0.00660
Sonnet 5 $0.00001 $0.00264
Haiku 4.5 $0.00001 $0.00132

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

Security

Grade A, and why

self-check 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 4d 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/self-check.md · 175 lines

How it starts

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

/self-check - 自我检查

定期进行自我检查,确保工作质量和方向正确。

检查时机

定时检查

频率 检查内容
每个任务完成后 任务验证
每 5 个任务后 方向检查
每个 Phase 完成后 阶段审查
每天结束前 日总结

触发检查

触发条件 检查内容
遇到阻塞 问题分析
不确定时 方向确认
用户反馈后 调整确认

检查清单

任务级检查

[ ] 任务目标是否达成?
[ ] 代码是否可运行?
[ ] 是否有未处理的错误?
[ ] 是否需要更新文档?
[ ] 是否需要提交 Git?

阶段级检查

[ ] Phase 目标是否达成?
[ ] 所有验收标准是否满足?
[ ] 文档是否同步更新?
[ ] 是否有遗留问题?
[ ] 下一阶段依赖是否就绪?

方向检查

[ ] 是否偏离了项目目标?
[ ] 是否过度设计?
[ ] 是否遗漏了用户需求?
[ ] 是否有更简单的方案?
[ ] 当前优先级是否正确?

问题发现后的处理

小问题(可立即修复)

  1. 记录问题
  2. 立即修复
  3. 验证修复
  4. 继续原任务

中等问题(需要规划)

  1. 记录问题到 progress.md
  2. 评估影响范围
  3. 创建修复任务
  4. 安排到合适时机

大问题(需要决策)

  1. 停止当前工作
  2. 详细记录问题
  3. 分析可选方案
  4. 请求用户决策

自检报告格式

## Self-Check Report [时间戳]

### 当前状态

- Phase: X / Step: Y
- 进度: XX%
- 状态: 正常/需关注/阻塞

### 完成检查

- [x/] 任务验证
- [x/] 代码质量
- [x/] 文档同步
- [x/] Git 状态

### 发现问题

1. [问题描述] - [严重程度] - [处理方式]

### 下一步

- [下一个任务]
- [预期产出]

红旗检测 | Red Flag Detection

以下信号表明可能存在问题,需要立即关注:

7 个红旗信号

# 红旗 检测方式 行动
1 引用不存在的 API/函数 Grep 搜索确认 停止,查文档
2 假设未验证的业务规则 检查需求文档 标记 TBD
3 引用的版本号/语法可能过时 WebSearch 验证 更新引用
4 多次失败后仍用相同方法 检查会话历史 换方案
5 修改了不理解的代码 检查是否先 Read 先阅读再修改
6 跳过了测试直接提交 检查 verify 记录 补测试
7 长时间无进展(>10次工具调用无产出) 计数器检测 暂停反思

检测集成

红旗检测自动集成到现有检查流程中:

  • 任务级检查:检查红旗 #1, #5, #6(API 存在性、代码理解、测试覆盖)
  • 阶段级检查:检查红旗 #2, #3(业务假设、技术时效)
  • 方向检查:检查红旗 #4, #7(方法有效性、进展停滞)

自动化检测 (v0.8.2+)

红旗 #4(多次失败后仍用相同方法)已通过 observe-patterns.js PostToolUse hook 自动检测:

  • 同文件 Edit 3+ 次 + 最近 5 步内 Bash 错误 2+ 次 → 自动输出 [RedFlag] 警告
  • 其他红旗仍需手动检查

Read the full file on GitHub · 175 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. 4d ago First seen · 175 lines · 7 tokens per session scan A f6c542fd7c23

Subscribe to this mod's changes

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