|

Skills

defineSkill — give your agent reusable knowledge and procedures it can load on demand.

Skills are what an agent knows — reference knowledge or procedures it can pull in when relevant, without bloating the always-on system prompt. Each file in agent/skills/ default-exports a skill.

// agent/skills/refund_policy.ts
import { defineSkill } from "arcie/skills";
 
export default defineSkill({
  name: "refund_policy",
  description: "How and when refunds are issued.",
  content: `
Refunds are available within 30 days of purchase.
Digital goods are non-refundable once downloaded.
Escalate disputes over $500 to a human.
`,
});

defineSkill requires a name and content — omitting either throws Skill must have a name and content.

SkillConfig

interface SkillConfig {
  name: string;
  description: string;
  content: string;
}
FieldPurpose
nameStable identifier for the skill.
descriptionA short summary of when the skill is relevant.
contentThe knowledge itself — markdown or text the agent can load.

Loading skills from a directory

The getSkill helper reads a skill's raw content by name:

import { getSkill } from "arcie/skills";
 
const skill = getSkill("./agent", "refund_policy");
// → reads ./agent/knowledge/refund_policy.md (or .ts), or null

Skills vs. tools vs. subagents

  • A skill is passive knowledge the agent can reference — no code runs.
  • A tool executes code and returns a result.
  • A subagent is a separate agent you delegate a whole subtask to. Reach for one only when the work needs its own prompt, tools, or isolated context.