Skip to main content

Overview

The prompt command exports one or more skills in formats suitable for agent platforms and LLM prompts. It generates structured output containing skill metadata (name, description, location) in XML, Markdown, or JSON format.

Usage

Arguments

Path[]
Paths to skill directories. Accepts multiple paths. Defaults to current directory if not specified.

Options

string
default:"xml"
Alias: -fOutput format for the exported prompt.Options:
  • xml - XML format (default)
  • markdown - Markdown format
  • json - JSON format

Examples

Export current directory (XML)

Output:

Export multiple skills

Export as Markdown

Output:

Export as JSON

Output:

Redirect to file

Output Formats

XML Format

Structured XML with <available_skills> root element and <skill> children:

Markdown Format

Human-readable Markdown with headers and bullet points:

JSON Format

Machine-readable JSON array:

Token Usage Summary

The command outputs a summary to stderr:
This shows:
  • Number of skills exported
  • Estimated total discovery tokens (name + description for all skills)
The summary is written to stderr, so it won’t interfere with piping or redirecting the main output.

Use Cases

Agent Platform Integration

Export skills for use in agent system prompts:

Skill Discovery APIs

Generate JSON for skill discovery endpoints:

Documentation Generation

Create skill catalogs in Markdown:

CI/CD Validation

Validate skill metadata during deployment:

Exit Codes

  • 0: Export successful
  • 1: Error occurred (invalid path, missing SKILL.md, invalid format, etc.)

Notes

All skill paths must contain a valid SKILL.md file. The command will fail if any path is invalid.
The location field uses file:// URI scheme with absolute paths resolved from the provided input paths.
Token estimates in the summary use the same algorithm as sklab info and are approximate.