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/setupgit 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.00010 | $0.02901 |
| Opus 5 | $0.00005 | $0.01451 |
| Sonnet 5 | $0.00002 | $0.00580 |
| Haiku 4.5 | $0.00001 | $0.00290 |
Grade B, and why
setup scanned grade B 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
| `--global` | 配置到全局 `~/.claude/settings.json` | How it starts
The opening of the file, as written. The whole thing — 373 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/setup - 项目初始化
初始化 Claude Code 项目配置。支持 Plugin 模式 和 Clone 模式。
使用方式
# 完整初始化(默认)
/cc-best:setup
# 仅配置 hooks(修复插件 hooks 问题)
/cc-best:setup --hooks
# 配置 hooks 到全局
/cc-best:setup --hooks --global
# 配置 hooks 到项目
/cc-best:setup --hooks --project
# 验证 hooks 配置是否正确
/cc-best:setup --verify
# 交互式配置向导
/cc-best:setup --interactive
参数说明
| 参数 | 说明 |
|---|---|
--hooks |
仅配置 hooks,跳过其他初始化步骤 |
--global |
配置到全局 ~/.claude/settings.json |
--project |
配置到项目 .claude/settings.local.json |
--verify |
验证 hooks 配置是否正确(诊断模式) |
--interactive |
交互式配置向导,按需选择安装组件 |
执行步骤
0. 检查 --verify 参数
如果使用 --verify 参数,执行验证模式:
# 运行 hooks 验证脚本
node <SCRIPT_PATH>/verify-hooks.js
验证脚本会检查:
- ✅ 脚本路径是否存在
- ✅ timeout 是否在合理范围 (1ms - 10min)
- ✅ matcher 语法是否正确
- ✅ 生命周期事件是否有效
验证完成后输出诊断报告和修复建议,然后退出。
1. 检测运行模式
如果存在 scripts/node/hooks/ 目录:
→ Clone 模式
否则:
→ Plugin 模式,定位插件缓存目录
2. 运行初始化脚本
使用 Node.js 脚本(跨平台兼容)执行初始化:
# 检测并运行初始化脚本
# Plugin 模式:脚本位于插件目录
# Clone 模式:脚本位于项目目录
# 优先使用 Node.js(跨平台)
if command -v node &> /dev/null; then
# 查找脚本位置(Plugin 或 Clone 模式)
if [ -f "scripts/node/init.js" ]; then
node scripts/node/init.js
fi
else
# 回退到 Bash(仅 Unix)
if [ -f "scripts/shell/init.sh" ]; then
bash scripts/shell/init.sh
fi
fi
初始化脚本会自动:
- 检测运行模式(Plugin/Clone)
- 创建
.claude/settings.local.json - 创建必要目录结构
- 初始化 Memory Bank 文件
- Plugin 模式下从插件目录复制模板
- Clone 模式下创建 Hookify 规则文件
3. 清理旧版本 Hooks 配置
⚠️ v0.6.3 升级: 如果从旧版本升级,全局 settings.json 可能有冗余的 hooks 配置需要清理。
检查并清理:
- 读取全局配置
~/.claude/settings.json - 检查是否存在
hooks字段,且包含${CLAUDE_PLUGIN_ROOT}/scripts/node/hooks/路径 - 如果存在,这是旧版本遗留配置,应该删除
hooks字段 - 告知用户:「已清理旧版本 hooks 配置,现在通过插件内置 hooks/hooks.json 自动生效」
// 清理逻辑示例
const settingsPath = path.join(os.homedir(), ".claude/settings.json");
const settings = JSON.parse(fs.readFileSync(settingsPath, "utf8"));
if (settings.hooks) {
const hasOldHooks = JSON.stringify(settings.hooks).includes(
"scripts/node/hooks/",
);
if (hasOldHooks) {
delete settings.hooks;
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
console.log("✅ 已清理旧版本 hooks 配置");
}
}
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 · 373 lines · 10 tokens per session scan B 09b6ed8b61a8
setup is a command published in the GitHub repository xiaobei930/cc-best (50 stars, last pushed 2mo ago), licensed MIT. It adds 10 tokens to every session and 2,901 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
tldr
Re-apply TLDR rules for this turn (verdict first, no filler).
tldr-help
Quick reference card for tldr modes, slash commands, and triggers.
tldr-review
One-line TLDR PR review comments (verdict first, no filler).
guide
Interactive guide to fellowship. Walks you through a real task using the structured research-plan-implement flow, then shows you what's next.
audit-plugin
Audit plugin skills, commands, and agents for structure, size, and naming issues.
lfe-improve-architecture
Find deepening opportunities in the codebase — turn shallow modules into deep ones. Use in Phase 5 (Hygiene sub-pipeline) or when scheduled by session count.