cli-wiring
仓库创建 2026年4月15日最近提交 21 天前SkillHot 收录 21 天前
▸ 精选理由
实用的步骤化检查表,减少命令未注册或路由缺失的错误。
这个 Skill 做什么
项目中添加新CLI命令的检查清单与接线实现指南。
给团队在项目里新增 CLI 命令时提供的检查清单和接线实现指南,确保命令文件、对外导出(如 run 函数)以及在 cli-entry.ts 的路由都到位。常在实现新命令或重构 CLI 时用,避免把实现写好却没接入入口导致命令不可达。它把实现和路由两端的步骤标准化,减少遗漏和回溯。
0
Stars
0
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/Codebrew-company/CodebrewRouter/master/.copilot/skills/cli-wiring/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/Codebrew-company/CodebrewRouter/master/.copilot/skills/cli-wiring/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Skill: CLI Command Wiring
**Bug class:** Commands implemented in `packages/squad-cli/src/cli/commands/` but never routed in `cli-entry.ts`.
## Checklist — Adding a New CLI Command
1. **Create command file** in `packages/squad-cli/src/cli/commands/<name>.ts`
- Export a `run<Name>(cwd, options)` async function (or class with static methods for utility modules)
2. **Add routing block** in `packages/squad-cli/src/cli-entry.ts` inside `main()`:
```ts
if (cmd === '<name>') {
const { run<Name> } = await import('./cli/commands/<name>.js');
// parse args, call function
await run<Name>(process.cwd(), options);
return;
}
```
3. **Add help text** in the help secvia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有