Skill: CLI Command Wiring

**Bug class:** Commands implemented in `packages/squad-cli/src/cli/commands/` but never routed in `cli-entry.ts`.

6 stars

Best use case

Skill: CLI Command Wiring is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

**Bug class:** Commands implemented in `packages/squad-cli/src/cli/commands/` but never routed in `cli-entry.ts`.

Teams using Skill: CLI Command Wiring should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/cli-wiring/SKILL.md --create-dirs "https://raw.githubusercontent.com/cwoodruff/morespeakers-com/main/.copilot/skills/cli-wiring/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/cli-wiring/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Skill: CLI Command Wiring Compares

Feature / AgentSkill: CLI Command WiringStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

**Bug class:** Commands implemented in `packages/squad-cli/src/cli/commands/` but never routed in `cli-entry.ts`.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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 section of `cli-entry.ts` (search for `Commands:`):
   ```ts
   console.log(`  ${BOLD}<name>${RESET}     <description>`);
   console.log(`             Usage: <name> [flags]`);
   ```

4. **Verify both exist** — the recurring bug is doing step 1 but missing steps 2-3.

## Wiring Patterns by Command Type

| Type | Example | How to wire |
|------|---------|-------------|
| Standard command | `export.ts`, `build.ts` | `run*()` function, parse flags from `args` |
| Placeholder command | `loop`, `hire` | Inline in cli-entry.ts, prints pending message |
| Utility/check module | `rc-tunnel.ts`, `copilot-bridge.ts` | Wire as diagnostic check (e.g., `isDevtunnelAvailable()`) |
| Subcommand of another | `init-remote.ts` | Already used inside parent + standalone alias |

## Common Import Pattern

```ts
import { BOLD, RESET, DIM, RED, GREEN, YELLOW } from './cli/core/output.js';
```

Use dynamic `await import()` for command modules to keep startup fast (lazy loading).

## History

- **#237 / PR #244:** 4 commands wired (rc, copilot-bridge, init-remote, rc-tunnel). aspire, link, loop, hire were already present.