@clawforge/schema
v0.0.1
Published
Zod schemas and TypeScript types for clawforge registry entries.
Readme
@clawforge/schema
Zod schemas and TypeScript types for the clawforge registry.
Install
pnpm add @clawforge/schemaUsage
import { parseEntry, EntrySchema } from "@clawforge/schema";
const entry = parseEntry(JSON.parse(await fs.readFile("entry.json", "utf8")));
// entry is narrowed by its discriminator: SkillEntry | AgentEntry | ...
// Or use the schema directly for non-throwing validation:
const result = EntrySchema.safeParse(input);Namespace IDs
import { parseId, formatId } from "@clawforge/schema";
parseId("skill:tdd-workflow");
// → { kind: "skill", user: null, name: "tdd-workflow" }
formatId({ kind: "agent", user: "kalkan", name: "code-reviewer" });
// → "agent:@kalkan/code-reviewer"Supported kinds
| Kind | Schema |
|---|---|
| skill | SkillEntrySchema |
| agent | AgentEntrySchema |
| cmd | CommandEntrySchema |
| hook | HookEntrySchema |
| mcp | McpEntrySchema |
| preset | PresetEntrySchema |
All are joined into EntrySchema (discriminated on kind).
Stability
Breaking changes are released as major bumps. See the clawforge design spec.
License: MIT.
