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.The CLI name
Array of command information objects
Optional map of group names to descriptions. Defaults to an empty Map.
Generated Markdown content for the skill file
Example
split
Splits commands into skill files grouped by depth.The CLI name
Array of command information objects
Grouping depth for skill files.
0 creates a single file, 1 groups by first segment, 2 by first two segments, etc.Optional map of group names to descriptions. Defaults to an empty Map.
Array of skill file entries with directory names and content
Example
hash
Computes a deterministic hash of command structure for staleness detection.Array of command information objects
16-character hex hash of the command structure
Example
Types
CommandInfo
Information about a single command passed togenerate() and split().
Command name (e.g.,
"deploy" or "db migrate")Human-readable command description
Zod schema for positional arguments
Zod schema for environment variables
Additional hint text displayed after examples
Zod schema for command options/flags
Zod schema for command output
Array of usage examples with optional descriptions
File
A skill file entry with its directory name and content.Directory name relative to output root. Empty string for depth 0.
Markdown content for the skill file
Related
- SyncSkills - Sync skills to agent config directories
- Agent Discovery - Learn about AI agent discovery

