Skill module generates Markdown skill files from CLI commands, enabling AI agents to discover and use your CLI tools.
Functions
generate
Generates a Markdown skill file from a CLI name and collected command data.string
required
The CLI name
CommandInfo[]
required
Array of command information objects
Map<string, string>
Optional map of group names to descriptions. Defaults to an empty Map.
string
Generated Markdown content for the skill file
Example
split
Splits commands into skill files grouped by depth.string
required
The CLI name
CommandInfo[]
required
Array of command information objects
number
required
Grouping depth for skill files.
0 creates a single file, 1 groups by first segment, 2 by first two segments, etc.Map<string, string>
Optional map of group names to descriptions. Defaults to an empty Map.
File[]
Array of skill file entries with directory names and content
Example
hash
Computes a deterministic hash of command structure for staleness detection.CommandInfo[]
required
Array of command information objects
string
16-character hex hash of the command structure
Example
Types
CommandInfo
Information about a single command passed togenerate() and split().
string
required
Command name (e.g.,
"deploy" or "db migrate")string
Human-readable command description
z.ZodObject<any>
Zod schema for positional arguments
z.ZodObject<any>
Zod schema for environment variables
string
Additional hint text displayed after examples
z.ZodObject<any>
Zod schema for command options/flags
z.ZodType
Zod schema for command output
Array<{ command: string; description?: string }>
Array of usage examples with optional descriptions
File
A skill file entry with its directory name and content.string
required
Directory name relative to output root. Empty string for depth 0.
string
required
Markdown content for the skill file
Related
- SyncSkills - Sync skills to agent config directories
- Agent Discovery - Learn about AI agent discovery

