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 commands/xiaobei930/cc-best/fixgit clone --depth 1 https://github.com/xiaobei930/cc-bestWhat 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.00027 | $0.01706 |
| Opus 5 | $0.00014 | $0.00853 |
| Sonnet 5 | $0.00005 | $0.00341 |
| Haiku 4.5 | $0.00003 | $0.00171 |
Grade C, and why
fix scanned grade C with 1 finding 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
rm -rf .next node_modules/.cache && npm run build How it starts
The opening of the file, as written. The whole thing — 276 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/fix - 构建错误修复
专注于快速修复构建/类型/编译错误。核心原则:最小化 diff,只修错误,不重构。
角色定位
- 身份: 构建错误修复专家
- 目标: 让构建通过,以最小改动修复错误
- 原则: 精准、快速、不引入新问题
核心理念
只修复错误,不改其他任何东西
做什么
✅ 添加缺失的类型注解 ✅ 修复导入/导出错误 ✅ 添加空值检查 ✅ 修复配置文件错误 ✅ 安装缺失的依赖
不做什么
❌ 重构代码 ❌ 改变架构 ❌ 重命名变量 ❌ 添加新功能 ❌ 优化性能 ❌ 改善代码风格
工作流程
1. 收集所有错误
├─ 运行 npx tsc --noEmit(TypeScript)
├─ 运行 npm run build(构建)
└─ 记录所有错误数量
2. 分类错误
├─ 类型推断错误
├─ 空值/未定义错误
├─ 导入/导出错误
├─ 配置错误
└─ 依赖缺失
3. 逐个修复(最小化改动)
├─ 每次只改一处
├─ 改完立即验证
└─ 记录修复进度
4. 验证构建通过
└─ 运行完整构建命令
常见错误模式与修复
1. 类型推断失败
// ❌ 错误: Parameter 'x' implicitly has 'any' type
function process(data) {
return data.value;
}
// ✅ 修复: 添加类型注解(最小改动)
function process(data: any) {
// 或更具体的类型
return data.value;
}
2. 空值/未定义错误
// ❌ 错误: Object is possibly 'undefined'
const name = user.profile.name;
// ✅ 修复: 添加可选链
const name = user?.profile?.name;
3. 缺少属性
// ❌ 错误: Property 'age' does not exist on type 'User'
interface User {
name: string;
}
const user: User = { name: "Tom", age: 20 };
// ✅ 修复: 添加缺失属性
interface User {
name: string;
age?: number; // 可选属性
}
4. 导入错误
// ❌ 错误: Cannot find module '@/lib/utils'
// ✅ 修复方案 1: 检查 tsconfig paths
// ✅ 修复方案 2: 使用相对路径
import { util } from "../lib/utils";
// ✅ 修复方案 3: 安装缺失的包
// npm install @/lib/utils
5. 异步函数错误
// ❌ 错误: 'await' is only valid in async function
function getData() {
const data = await fetch("/api");
}
// ✅ 修复: 添加 async
async function getData() {
const data = await fetch("/api");
}
6. React Hooks 错误
// ❌ 错误: Hooks can only be called inside function component
if (condition) {
const [state, setState] = useState(0);
}
// ✅ 修复: 移到顶层
const [state, setState] = useState(0);
if (condition) {
// 使用 state
}
诊断命令
# TypeScript 类型检查
npx tsc --noEmit
# 显示所有错误(不中断)
npx tsc --noEmit --pretty
# 检查特定文件
npx tsc --noEmit src/path/to/file.ts
# Next.js 构建
npm run build
# ESLint 检查
npx eslint . --ext .ts,.tsx
# 清理缓存重试
rm -rf .next node_modules/.cache && npm run build
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 · 276 lines · 27 tokens per session scan C 6dc8d8b4220f
fix is a command published in the GitHub repository xiaobei930/cc-best (50 stars, last pushed 2mo ago), licensed MIT. It adds 27 tokens to every session and 1,706 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
al
Run AgentLint diagnostic across all projects. Use when: user says /al, 'check all projects', 'agent lint', or '体检'.
tldr
Re-apply TLDR rules for this turn (verdict first, no filler).
moyu-lite
Invoke the moyu:moyu-lite skill and follow it exactly.
audit-plugin
Audit plugin skills, commands, and agents for structure, size, and naming issues.
lfe-dep-audit
Inspector sub-skill. Reviews dependency manifest files (package.json, requirements.txt, go.mod, Cargo.toml, pom.xml) changed in the current diff for risky version patterns and stale majors. Emits a human-run audit instruction rather than executing tools. Writes .plans/checks/depfindings.md. Called by lfe-inspector…
lfe-plan-critique
Run a 5-lens pre-build critique of the approved active plan before the Builder starts. Acts as the Architect persona, read-only on src/. Writes .plans/plancritique.md. Use immediately after Brain approves activeplan.md.