garrytan/gstack · error · Error

Usage: $B domain-skill edit <host>

Error message

Usage: $B domain-skill edit <host>

What it means

Error "Usage: $B domain-skill edit <host>" thrown in garrytan/gstack.

Source

Thrown at browse/src/domain-skill-commands.ts:177

    );
  }
  const slug = getCurrentProjectSlug();
  const result = await readSkill(host, slug);
  if (!result) {
    return `No active skill for ${host}.\n\nA quarantined skill may exist; run $B domain-skill list to see all states.`;
  }
  return [
    `# ${result.row.host} (${result.source} scope, ${result.row.state})`,
    `# version: ${result.row.version}, used: ${result.row.use_count}×, flags: ${result.row.flag_count}`,
    '',
    result.row.body,
  ].join('\n');
}

async function handleEdit(args: string[]): Promise<string> {
  const host = args[0];
  if (!host) {
    throw new Error('Usage: $B domain-skill edit <host>');
  }
  const slug = getCurrentProjectSlug();
  // Read current body to seed the editor
  const list = await listSkills(slug);
  const current = [...list.project, ...list.global].find((r) => r.host === host);
  if (!current) {
    throw new Error(
      `Cannot edit: no skill for ${host}.\n` +
        'Cause: skill does not exist in this project or global scope.\n' +
        'Action: $B domain-skill save to create one first.'
    );
  }
  const editor = process.env.EDITOR || 'vi';
  const tmpFile = path.join(os.tmpdir(), `gstack-domain-skill-${process.pid}-${Date.now()}.md`);
  await fs.writeFile(tmpFile, current.body, 'utf8');
  const result = spawnSync(editor, [tmpFile], { stdio: 'inherit' });
  if (result.status !== 0) {
    await fs.unlink(tmpFile).catch(() => {});

View on GitHub (pinned to 94993f7401)

When it happens

Trigger: Thrown at browse/src/domain-skill-commands.ts:177 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12). Data as JSON: /api/errors/a0ab6f3b5916b6d4. Report an issue: GitHub.