aiSkill
Discover and load AI skills from a directory tree, a single file, or an inline skill definition.
Discover and load AI skills from a directory tree, a single file, or create an inline skill definition.
Syntax
aiSkill( path, name, description, content, recurse )Parameters
path
string
No
A directory or file path. If a directory, scanned recursively for SKILL.md files. If a file path, loads that skill directly. Defaults to .ai/skills.
name
string
No
Unique name for an inline skill (used when no path is given).
description
string
No
What the skill does and when to use it. If omitted, uses the first paragraph of the skill's markdown content.
content
string
No
Full instruction content for an inline skill (body text after YAML frontmatter).
recurse
boolean
No
Whether to scan subdirectories recursively when path is a directory. Defaults to true.
Returns
path is a directory
Array of AiSkill instances (may be empty if no skills found)
path is a file
Single AiSkill instance
name provided (inline)
Single AiSkill instance
No arguments
Empty Array
Examples
Load All Skills from Default Directory
Load from a Custom Directory
Load a Single Skill File
Create an Inline Skill
Combine Directory + Inline
Related Pages
Skills — Full skills documentation
aiGlobalSkills() — Access globally shared skills
Last updated