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/setup-pmgit 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.00016 | $0.00768 |
| Opus 5 | $0.00008 | $0.00384 |
| Sonnet 5 | $0.00003 | $0.00154 |
| Haiku 4.5 | $0.00002 | $0.00077 |
Grade A, and why
setup-pm 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 106 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/setup-pm - 包管理器配置
配置项目或全局的首选包管理器。
快速使用
# 检测当前配置
node scripts/node/setup-package-manager.js --detect
# 设置项目首选为 pnpm
node scripts/node/setup-package-manager.js --project pnpm
# 设置全局首选为 bun
node scripts/node/setup-package-manager.js --global bun
# 列出所有可用选项
node scripts/node/setup-package-manager.js --list
检测优先级
系统按以下顺序检测包管理器:
| 优先级 | 来源 | 说明 |
|---|---|---|
| 1 | 环境变量 CLAUDE_PACKAGE_MANAGER |
最高优先级 |
| 2 | 项目配置 .claude/package-manager.json |
项目级覆盖 |
| 3 | package.json 的 packageManager |
标准字段 |
| 4 | Lock 文件检测 | 自动检测 |
| 5 | 全局配置 ~/.claude/package-manager.json |
用户默认 |
| 6 | 回退 | pnpm > bun > yarn > npm |
配置文件格式
项目配置 (.claude/package-manager.json)
{
"packageManager": "pnpm",
"updatedAt": "2024-01-23T10:00:00.000Z"
}
全局配置 (~/.claude/package-manager.json)
{
"packageManager": "bun",
"updatedAt": "2024-01-23T10:00:00.000Z"
}
package.json 标准字段
{
"name": "my-project",
"packageManager": "[email protected]"
}
环境变量
设置 CLAUDE_PACKAGE_MANAGER 环境变量可覆盖所有配置:
# Windows PowerShell
$env:CLAUDE_PACKAGE_MANAGER = "pnpm"
# macOS/Linux
export CLAUDE_PACKAGE_MANAGER=pnpm
支持的包管理器
| 包管理器 | Lock 文件 | 特点 |
|---|---|---|
| npm | package-lock.json | Node.js 自带 |
| pnpm | pnpm-lock.yaml | 快速、节省磁盘空间 |
| yarn | yarn.lock | 稳定、广泛使用 |
| bun | bun.lockb | 极快、新一代运行时 |
在 Hooks 中使用
Node.js hooks 会自动使用检测到的包管理器:
const { detect, getRunCommand } = require("./lib/package-manager");
const pm = detect();
console.log(`使用 ${pm.name} (来源: ${pm.source})`);
// 获取运行命令
const devCmd = getRunCommand("dev"); // -> "pnpm dev" 或 "npm run dev"
const testCmd = getRunCommand("test"); // -> "pnpm test" 或 "npm test"
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.
- 3d ago First seen · 106 lines · 16 tokens per session scan A 1ea8c8db1930
setup-pm is a command published in the GitHub repository xiaobei930/cc-best (50 stars, last pushed 2mo ago), licensed MIT. It adds 16 tokens to every session and 768 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.
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.