Documentation / @agentick/core / defineSkill
Function: defineSkill()
defineSkill<
TInput>(def):SkillDef<TInput>
Defined in: core/src/skill/skill.ts:289
Define a skill. Identity-typed factory — gives TypeScript the inference handles to flow TInput from the input schema to call sites.
Validates name format and length per the Agent Skills open spec, plus any provided description / compatibility length caps. description is recommended by the open spec but defineSkill keeps it optional — the loader enforces required-when-loading-from-folder.
Type Parameters
TInput
TInput = unknown
Parameters
def
SkillDef<TInput>
Returns
SkillDef<TInput>
Example
typescript
const Triage = defineSkill({
name: "triage",
description: "Investigate an issue and decide on action",
instructions: "You are a triage agent. Investigate, decide, submit.",
input: z.object({ issueNumber: z.number() }),
allowedTools: ["search", "read_file"],
argumentNames: ["issueNumber"],
});