Skip to content
// EFFECT DAYS 2026

Skill unstable

Standalone Agent Skill value and schema for local agents and MCP servers.

A Skill models an Agent Skill (https://agentskills.io/specification) as plain data โ€” validated YAML frontmatter, markdown instructions, and supporting files โ€” with SKILL.md as its serialization format via toFiles and fromFiles.

6 exports Since v4.1.6 Source

Constructors

fromFiles

unstable
Since v4.1.6

Parses a Skill from a file map containing SKILL.md and optional supporting files.

Details

Fails with Cause.IllegalArgumentError when SKILL.md is missing, not valid UTF-8, lacks a valid YAML frontmatter block, or fails Skill schema validation.

See

  • toFiles for the inverse conversion
  • make for constructing a skill from structured fields

Signature

declare function fromFiles(files: Readonly<Record<string, string | Uint8Array>>): Effect<Skill, IllegalArgumentError>

make

unstable
Since v4.1.6

Constructs a validated Skill.

Gotchas

Throws an Error (with the validation issue on cause) when frontmatter fails validation or any key in files is "SKILL.md" or an unsafe path. Use fromFiles or Schema.decodeUnknownEffect(Skill) for untrusted input.

See

  • fromFiles for effectful construction from a raw file map

Signature

declare function make(options: {
readonly files?: Readonly<Record<string, string | Uint8Array<ArrayBufferLike>>>;
readonly frontmatter: {
[key: string]: Json;
readonly "allowed-tools"?: string;
readonly compatibility?: string;
readonly description: string;
readonly license?: string;
readonly metadata?: {
[key: string]: string;
};
readonly name: string;
};
readonly instructions: string;
}): Skill

Conversions

toFiles

unstable
Since v4.1.6

Renders a Skill into a file map that includes the generated SKILL.md along with all supporting files.

Details

Frontmatter keys and values are JSON-encoded so YAML edge cases round-trip cleanly through fromFiles.

See

Signature

declare function toFiles(self: Skill): {
readonly "SKILL.md": string;
} & Readonly<Record<string, string | Uint8Array<ArrayBufferLike>>>

Models

Frontmatter

type unstable
Since v4.1.6

The YAML frontmatter of an Agent Skill's SKILL.md.

Signature

type Frontmatter = typeof Frontmatter.Type

Skill

unstable
Since v4.1.6

Schema and class for an Agent Skill bundle.

Details

Holds validated Frontmatter, markdown instructions, and supporting files keyed by safe relative paths (excluding SKILL.md). When encoded with Schema.toCodecJson, binary Uint8Array files are represented as { base64: string } so text and binary files stay distinct.

See

  • make for constructing a skill
  • toFiles for rendering a skill to a file map including SKILL.md
  • fromFiles for parsing a skill from a file map containing SKILL.md

Signature

declare class Skill extends {
readonly files: {
[key: string]: string | Uint8Array<ArrayBufferLike>;
};
readonly frontmatter: {
[key: string]: Json;
readonly "allowed-tools"?: string;
readonly compatibility?: string;
readonly description: string;
readonly license?: string;
readonly metadata?: {
[key: string]: string;
};
readonly name: string;
};
readonly instructions: string;
} {
constructor(...args: [props: {
readonly files: {
[key: string]: string | Uint8Array<ArrayBufferLike>;
};
readonly frontmatter: {
[key: string]: unknown;
readonly "allowed-tools"?: string;
readonly compatibility?: string;
readonly description: string;
readonly license?: string;
readonly metadata?: {
[key: string]: string;
};
readonly name: string;
};
readonly instructions: string;
}, options?: MakeOptions]);
}

Schemas

Frontmatter

unstable
Since v4.1.6

Schema for the YAML frontmatter of an Agent Skill's SKILL.md, as the Agent Skills specification defines it (https://agentskills.io/specification).

Details

Fields the specification does not define are kept unchanged.

Signature

declare const Frontmatter: StructWithRest<Struct<{
readonly "allowed-tools": optionalKey<String>;
readonly compatibility: optionalKey<String>;
readonly description: String;
readonly license: optionalKey<String>;
readonly metadata: optionalKey<$Record<String, String>>;
readonly name: String;
}>, readonly [$Record<String, Codec<Json, Json, never, never>>]>