readAgentSkillIO
@a16njs/models / readAgentSkillIO
Function: readAgentSkillIO()
readAgentSkillIO(
skillDir):Promise<{success:true;skill:ParsedSkill&object; } | {success:false;error:string; }>
Defined in: agentskills-io.ts:239
Read an AgentSkillIO from disk in verbatim AgentSkills.io format.
This reads the VERBATIM AgentSkills.io format from:
- SKILL.md with name, description, resources, disable-model-invocation
- Resource files in the skill directory
It does NOT expect IR-specific fields (version, type, relativeDir).
Parameters
skillDir
string
Directory containing the skill (e.g., .a16n/agent-skill-io/NAME)
Returns
Promise<{ success: true; skill: ParsedSkill & object; } | { success: false; error: string; }>
Parsed skill with frontmatter, content, and resource files
Example
await readAgentSkillIO('.a16n/agent-skill-io/deploy')
// {
// frontmatter: { name: 'deploy', description: '...', resources: ['checklist.md'] },
// content: 'Deploy instructions...',
// files: { 'checklist.md': 'Checklist content...' }
// }