Skip to main content
The sklab prompt command exports one or more skills into prompt formats suitable for agent platforms. This enables you to inject skill metadata (name, description, location) into agent system prompts for dynamic skill discovery.

Overview

Skill Lab supports 3 output formats:
XML is the default and recommended format for Claude-based agents.

Basic Usage

Export Single Skill

Output goes to stdout for easy piping. Token estimates are printed to stderr.

Export Multiple Skills

Export Current Directory

Output Formats

XML (Default)

Best for: Claude API, Claude Code, structured system prompts
Usage in Claude system prompt:

Markdown

Best for: Human-readable documentation, LangChain prompts, OpenAI Assistants

JSON

Best for: Machine-readable metadata, API integrations, custom skill loaders

Token Estimates

Skill Lab estimates discovery tokens (name + description) for all exported skills:
Output (to stderr):
This represents the token cost of injecting skill metadata into a system prompt.
Discovery tokens are what agents see when choosing skills. Activation tokens (full SKILL.md) are only loaded when the skill is invoked.Use sklab info ./my-skill to see both discovery and activation token estimates.

Integration Examples

Claude API System Prompt

LangChain with Markdown

Custom Skill Loader (JSON)

Dynamic Skill Discovery

Use Cases

1. Multi-Agent Systems

Export skills for multiple specialized agents:

2. Skill Marketplace

Generate a JSON catalog of available skills:

3. Documentation Generation

Create human-readable skill documentation:

4. CI/CD Skill Injection

Token Budgeting

Discovery Cost (System Prompt)

Each skill adds ~40-100 tokens to the system prompt (name + description).
Example: 10 skills = ~800 discovery tokens

Activation Cost (Full SKILL.md)

When a skill is invoked, the agent loads the full SKILL.md (~200-2000 tokens). Use sklab info to see activation costs:
Exporting too many skills (50+) can bloat the system prompt and degrade agent performance. Consider skill categorization or lazy loading for large skill libraries.

Format Comparison

Recommendations:
  • Claude agents: Use XML
  • Documentation: Use Markdown
  • Programmatic access: Use JSON

Next Steps

Skill Inspector

View detailed skill metadata and token estimates with sklab info

Static Analysis

Validate skill quality before exporting