Files
claudemesh/apps/cli/src/commands/skill.ts
Alejandro Gutiérrez f9ed3fa286
Some checks failed
CI / Docker build (linux/amd64) (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Broker tests (Postgres) (push) Has been cancelled
feat(cli): claudemesh skill prints bundled SKILL.md (v1.18.0)
Zero-install access to the protocol reference: a fresh `npm i -g
claudemesh-cli` user (or someone running the prebuilt binary) can
now `claudemesh skill | claude --skill-add -` without copying any
files into ~/.claude/skills. The skill markdown is embedded into
the CLI bundle at build time via Bun's text-import attribute.

Also replaces two `<> ALL(...)` raw SQL fragments in the dashboard
unread-count queries with drizzle's notInArray() helper — matches
the same fix already applied to /v1/me/topics in the API package.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 12:24:45 +01:00

22 lines
764 B
TypeScript

/**
* `claudemesh skill` — print the bundled SKILL.md to stdout.
*
* Zero-install access: the skill is embedded into the binary at build
* time via Bun's text-import attribute, so a fresh `npm i -g` user
* (or someone running the prebuilt binary) can pipe the contents into
* Claude Code (or anywhere else) without copying files into
* ~/.claude/skills.
*
* claudemesh skill | claude --skill-add -
* claudemesh skill > /tmp/cm.md
*/
import skillContent from "../../skills/claudemesh/SKILL.md" with { type: "text" };
import { EXIT } from "~/constants/exit-codes.js";
export async function runSkill(): Promise<number> {
process.stdout.write(skillContent);
if (!skillContent.endsWith("\n")) process.stdout.write("\n");
return EXIT.SUCCESS;
}