ReferenceTypeScript SDK

Skills

client.skills uploads complete Skill archives and reads platform or tenant Skills. Uploads use multipart form data; the SDK accepts Blob | Uint8Array and also accepts Node.js Buffer as its Uint8Array subtype.

Overview

filename defaults to skill.zip. Skill name, description, and meta come from SKILL.md; product metadata and immutable userId are separate Attribution fields. Updates create an immutable stored version and atomically replace the active tenant Skill content.

Methods

create()

create(input: { file: Blob | Uint8Array; filename?: string; userId?: string; metadata?: Record<string, unknown> }): Promise<SkillDetail> — multipart POST /v1/skills. Omitted userId and metadata default to tenant-level and {}.

list()

list(filter?: "all" | "built-in" | "my", userId?: string): Promise<SkillsResponse>GET /v1/skills. all is the default; built-in selects platform Skills and my tenant Skills.

get()

get(skillId: string): Promise<SkillDetail>GET /v1/skills/:skillId. Detail adds parsed meta and live archive file entries.

update()

update(skillId: string, input: { file: Blob | Uint8Array; filename?: string; metadata?: Record<string, unknown> }): Promise<SkillDetail> — multipart PUT /v1/skills/:skillId. Omit metadata to preserve it; userId cannot change.

delete()

delete(skillId: string): Promise<void>DELETE /v1/skills/:skillId. Platform Skills are read-only.

Types

SkillDetail contains identity, ownerKind: "platform" | "tenant", nullable Tenant ID, description, Attribution, timestamps, meta, and { path, sizeBytes }[]. See objects and schemas.

Errors

Invalid archives or SKILL.md frontmatter are invalid_request; missing or foreign Skills are not_found. Platform Skill mutation is rejected. See errors.

Example

import { readFile } from "node:fs/promises";
import { BlazingAgents } from "@blazing-agents/sdk";
const client = new BlazingAgents({ apiKey: process.env.BLAZING_AGENTS_API_KEY! });

const archive = await readFile("release-skill.zip");
const skill = await client.skills.create({ file: archive, filename: "release-skill.zip" });
const { skills } = await client.skills.list("my", skill.userId);
const detail = await client.skills.get(skill.id);
await client.skills.update(skill.id, { file: archive, metadata: { reviewed: true } });
console.log(skills.length, detail.files.length);
await client.skills.delete(skill.id);

On this page