garrytan/gstack · warning · Error
Usage: $B skill show <name>
Error message
Usage: $B skill show <name>
What it means
Thrown by handleShow when args[0] is falsy — the caller invoked `$B skill show` with no skill name. It is a usage guard so the daemon returns a clean usage string instead of attempting a lookup on an undefined name (which readBrowserSkill would otherwise turn into a misleading 'not found').
Source
Thrown at browse/src/browser-skill-commands.ts:112
for (const s of skills) {
const desc = (s.frontmatter.description ?? '').slice(0, 40);
lines.push(
[
s.name.padEnd(30),
s.tier.padEnd(8),
s.frontmatter.host.padEnd(28),
desc,
].join(' '),
);
}
return lines.join('\n') + '\n';
}
// ─── show ───────────────────────────────────────────────────────
function handleShow(args: string[], ctx: SkillCommandContext): string {
const name = args[0];
if (!name) throw new Error('Usage: $B skill show <name>');
const tiers = ctx.tiers ?? defaultTierPaths();
const skill = readBrowserSkill(name, tiers);
if (!skill) throw new Error(`Skill "${name}" not found in any tier.`);
return readFile(path.join(skill.dir, 'SKILL.md'));
}
function readFile(p: string): string {
return fs.readFileSync(p, 'utf-8');
}
// ─── run ────────────────────────────────────────────────────────
interface ParsedRunArgs {
passthrough: string[];
timeoutSeconds: number;
}
export function parseSkillRunArgs(args: string[]): ParsedRunArgs {View on GitHub (pinned to 94993f7401)
Solutions
- Re-run with a name: `$B skill show <name>`.
- List available skills first with `$B skill list` to copy a valid name.
- If calling handleSkillCommand programmatically, ensure args contains the subcommand AND its operand: ['show', 'hn-frontpage'].
Example fix
// before $B skill show // after $B skill show hn-frontpage
Defensive patterns
Strategy: validation
Validate before calling
function requireSkillNameArg(args: string[], sub: string): string {
const name = args[0];
if (!name) throw new Error(`Usage: $B skill ${sub} <name>`);
return name;
}
// before calling handleShow:
const name = requireSkillNameArg(rest, 'show'); Prevention
- Always pass args as [subcommand, ...operands] with the operand present.
- When calling handleSkillCommand programmatically, build the args array with a literal name slot.
- Use `$B skill list` to discover valid names before show/run/test.
When it happens
Trigger: handleSkillCommand(['show'], ctx) or handleSkillCommand(['show',''], ctx) — the subcommand resolves to 'show' but args.slice(1) has no non-empty first element. Equivalent to running `$B skill show` from the CLI with nothing after the subcommand.
Common situations: Agent or human types the command incompletely; a calling script trims args and passes an empty array; shell quoting eats the argument; programmatic caller forgets to append the name.
Related errors
- Usage: $B skill run <name> [--arg k=v]... [--timeout=Ns]
- Usage: $B skill test <name>
- Usage: $B skill rm <name> [--global]
- Skill "${name}" not found in any tier.
- Skill "${name}" not found.
AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12).
Data as JSON: /api/errors/762b324b388da14a.
Report an issue: GitHub.