Gets skills appropriate for a task execution.
Loads skills based on the agent's role and the task description, potentially including additional task-relevant skills beyond the agent's default role-based skills.
The agent that will execute the task
The task to get skills for
The skill loader to use
Result with readonly array of skills or SkillLoaderError on failure
const agent = createAgent({ id: 'agent-1', role: 'code_expert' });
const task = { id: 'task-1', description: 'Refactor the user service' };
const loader = createSkillLoader(library);
const result = getSkillsForTask(agent, task, loader);
if (result.ok) {
console.log(`Loaded ${result.value.length} skills for task`);
}
Skills module exports (Voyager-style skill library) - Issue #528 Split from agents.ts for file size compliance (Issue #285)