Overview
Skills provide a way to give agents specialized knowledge and instructions without bloating the main system prompt. They use progressive disclosure to efficiently manage context:- Level 1 - Metadata (~100 tokens): Name and description loaded at startup
- Level 2 - Instructions (<5000 tokens): Full SKILL.md body loaded when activated
- Level 3 - Resources (as needed): Scripts, references, and assets loaded on demand
CLI Commands
List Available Skills
List all discovered skills in the configured directories.Validate a Skill
Validate that a skill directory conforms to the Agent Skills specification.Create a New Skill
Create a new skill directory with AI-generated content (default) or from a template.- Automatically generates comprehensive SKILL.md content based on description
- Creates scripts/script.py with relevant Python code when needed
- Falls back to template if no API key is available
- Use
--templateflag to skip AI and use template only
--script flag):
When using --script, the generated scripts/script.py is tailored to the description:
| Description Keywords | Generated Script Type |
|---|---|
| csv, spreadsheet, data analysis | Pandas-based CSV analyzer |
| pdf, document, extract text | PyPDF-based PDF processor |
| api, http, request, web | Requests-based API client |
| image, photo, resize | PIL-based image processor |
| json, yaml, config | JSON/YAML parser |
| text, regex, search | Text processing utilities |
| file, read, write | File operations |
Upload Skill to Anthropic
Upload a skill to Anthropic’s Skills API for use with Claude.ANTHROPIC_API_KEYenvironment variable must be setanthropicPython package must be installed- Skill must have a valid SKILL.md file
Generate Prompt XML
Generate the XML prompt block for skills, useful for system prompt injection.Skill Discovery Locations
PraisonAI searches for skills in these locations (in order of precedence):- Project:
./.praison/skills/or./.claude/skills/ - User:
~/.praison/skills/ - System:
/etc/praison/skills/(admin-managed)
Using Skills with Agents
Direct Skill Paths
Skill Discovery
Complete Example: CSV Analysis with Skills
Skills work automatically - the agent reads the SKILL.md, understands the instructions, and executes bundled scripts. No custom tools needed! Step 1: Create the skill- Skill Discovery: When
skills=["./csv-analyzer"]is set, the agent loads skill metadata - Lazy Tool Injection:
read_fileandrun_skill_scripttools are added only when skills are accessed (zero performance impact when not used) - System Prompt: Skills are injected into the system prompt with their descriptions, locations, and current working directory
- Path Resolution: The
run_skill_scripttool automatically resolves relative file paths (likedata.csv) to absolute paths based on the working directory - Progressive Disclosure: Agent reads SKILL.md only when the skill is relevant to the task
- Script Execution: Agent runs scripts from
scripts/directory using the modularskill_toolsmodule
CLI with Skills
SKILL.md Format
Required Fields
| Field | Description | Constraints |
|---|---|---|
name | Skill identifier | 1-64 chars, lowercase, hyphens only |
description | What the skill does and when to use it | 1-1024 chars |
Optional Fields
| Field | Description |
|---|---|
license | License for the skill (e.g., Apache-2.0, MIT) |
compatibility | Compatibility information (max 500 chars) |
metadata | Key-value pairs for custom properties |
allowed-tools | Space-delimited list of tools the skill requires |
Example SKILL.md
Directory Structure
Best Practices
- Clear Descriptions: Be specific about when to use the skill
- Structured Instructions: Use numbered steps for clarity
- Tool Requirements: List all required tools in
allowed-tools - Version Management: Use semantic versioning in metadata
- Documentation: Include examples in references/
- Testing: Validate skills before deployment
Compatibility
PraisonAI’s Agent Skills implementation follows the open standard, ensuring compatibility with:- Claude Code (
.claude/skills/) - GitHub Copilot (
.github/skills/) - Cursor (Agent Skills support)
- OpenAI Codex CLI
.praison/skills/ and .claude/skills/ for maximum compatibility.
Performance
Agent Skills are designed for zero performance impact when not in use:- Lazy Loading: Skills are only loaded when explicitly accessed
- No Auto-discovery: Discovery runs only when requested
- Minimal Memory: Skills not in use consume no memory
- Progressive Disclosure: Only load what’s needed
Troubleshooting
Common Issues
-
Skill not found
- Check if skill directory is in discovery path
- Verify SKILL.md exists in the skill directory
- Use
praisonai skills list --verboseto debug
-
Validation errors
- Ensure name uses only lowercase and hyphens
- Check description length (1-1024 chars)
- Verify YAML frontmatter is valid
-
Skills not loading
- Check file permissions on skill directories
- Verify skill directory structure
- Use
praisonai skills validateto check compliance
Debug Commands
Examples
See the examples/skills/ directory for complete examples:basic_skill_usage.py- Basic skill discovery and usagecustom_skill_example.py- Creating custom skills programmaticallypdf-processing/- Example skill directory

