Overview
All Skill Lab commands support two output formats:| Format | Use Case | Availability |
|---|---|---|
| Console | Human-readable terminal output with colors and tables | Default for all commands |
| JSON | Machine-readable structured data | --format json or --json flag |
Console output uses Rich for formatting.
JSON output follows a consistent schema across commands.
Console Output
Default Behavior
Console output is the default for all commands:- Color-coded severity levels (ERROR=red, WARNING=yellow, INFO=blue)
- Rich tables for check results and test reports
- Progress indicators for long-running commands
- Formatted panels for summaries
Example: Static Evaluation (Console)
Example: Trigger Testing (Console)
Example: Skill Info (Console)
JSON Output
Commands Supporting JSON
| Command | Flag | Schema |
|---|---|---|
sklab evaluate | --format json | EvaluationReport |
sklab trigger | --format json | TriggerReport |
sklab info | --json | Skill metadata |
sklab info uses --json instead of --format json for brevity.Example: Static Evaluation (JSON)
Example: Trigger Testing (JSON)
Example: Skill Info (JSON)
Saving Output to Files
Using --output Flag
Some commands support --output to write directly to a file:
Using Shell Redirection
For commands without--output, use shell redirection:
Integration Patterns
CI/CD Pipeline (GitHub Actions)
Python Script Integration
Bash Script Processing
Quality Dashboard
Field Extraction (sklab info)
Thesklab info command supports extracting single fields:
name, description, license, compatibility, structure, body_lines, tokens
Example: Shell Script
Verbose Mode
For console output, use--verbose to show all checks (not just failures):
JSON output always includes all checks regardless of
--verbose.Exit Codes
All commands return appropriate exit codes for scripting:| Exit Code | Meaning |
|---|---|
0 | Success (all checks passed) |
1 | Failure (validation failed or errors occurred) |
Next Steps
Static Analysis
Learn about quality checks and scoring
Skill Export
Export skills as prompts in XML, Markdown, or JSON