/** * Programmatic skill authoring. * * A skill is Markdown-first: the body is the instructional prompt and the * frontmatter carries metadata. `defineSkill()` is the code path for the same * shape — use it when the instructions are computed, when a skill ships from a * package that cannot rely on the `.fabricharness/skills/` convention, or when * a build-time `SKILL.md` import needs a runtime companion. * * Workspace-convention skills (`.fabricharness/skills//SKILL.md`) keep * loading by name and are unaffected by this helper. */ import type { JsonObject, PackagedSkillDirectory, Skill } from "./types.js"; export interface DefineSkillInput { /** Reference the model activates, and the name `session.skill()` resolves. */ name: string; /** One line telling the model when this skill applies. */ description?: string; /** The instructional prompt body. */ instructions: string; /** Model override applied while the skill is active. */ model?: string; /** Frontmatter-equivalent metadata. */ metadata?: JsonObject; /** * Supporting files advertised to the model but not loaded into context until * it reads one. Registering the skill on a session also registers this * directory with the `read` tool. */ packaged?: PackagedSkillDirectory; } /** * Build a `Skill` from explicit fields. * * Throws when `name` or `instructions` is empty — a skill the model cannot * name, or one that carries no instruction, is a silent no-op at activation * time, so it fails here instead. */ export declare function defineSkill(input: DefineSkillInput): Skill; //# sourceMappingURL=skill-definition.d.ts.map