Agent Skills

Manage modular skills for agents using the open Agent Skills standard

Agent Skills is an open standard for extending AI agent capabilities with specialized knowledge and workflows. PraisonAI Agents fully supports the Agent Skills specification, enabling agents to load and use modular capabilities through SKILL.md files.

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:

  1. Level 1 – Metadata (~100 tokens): Name and description loaded at startup
  2. Level 2 – Instructions (<5000 tokens): Full SKILL.md body loaded when activated
  3. 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.

bash
# List all available skills
praisonai skills list

# List skills from specific directories
praisonai skills list --dirs ./my-skills ./other-skills

# List skills with verbose output
praisonai skills list --verbose

Output:

Available Skills:
├── pdf-processing
│   ├── Description: Process and extract information from PDF documents
│   ├── Path: /Users/user/.praison/skills/pdf-processing
│   └── Metadata: author=your-org, version=1.0
├── data-analysis
│   ├── Description: Analyze data using pandas and visualization
│   ├── Path: /Users/user/.praison/skills/data-analysis
│   └── Metadata: author=data-team, version=2.1
└── web-scraping
    ├── Description: Extract data from websites using various techniques
    ├── Path: ./skills/web-scraping
    └── Metadata: author=scraping-team, version=1.5

Add or Install a Skill

Install a skill from a local path or a git URL. add is a familiar alias — it and install do the same thing.

A real run: pick a repo (https://github.com/acme/team-skills), run praisonai skills add <url>, and the CLI shallow-clones it and copies the skill into ~/.praisonai/skills/ (or --dest). On success it prints Installed: <path>; a bad source exits with code 1. Every agent that discovers ~/.praisonai/skills/ picks the skill up on its next run — no code change.

bash
# Add from a git URL (mirrors `npx skills add <url>`)
praisonai skills add https://github.com/acme/team-skills

# Add from a local path
praisonai skills add ./my-skill

# Choose a destination (default: ~/.praisonai/skills)
praisonai skills add https://github.com/acme/team-skills --dest ./team-skills

# `install` is the original spelling — identical behaviour
praisonai skills install ./my-skill

Arguments and options

NameTypeDefaultDescription
source (positional)str(required)Local path or https:// git URL of the skill.
--dest, -dstr~/.praisonai/skillsInstall destination.
Diagram

One-off copy, familiar verb

One-off copy, original verb

Versioned cache, team repo

How do you want
to consume the skill?

praisonai skills add URL

praisonai skills install URL

praisonai skills sync URL

Learn a Skill from Sources

Distil a grounded SKILL.md from sources you describe (a repo, docs, PDFs, configs, or a URL). Uses the existing skill tools — no manual content authoring required.

bash
praisonai skills learn "Read ./my-repo and make a 'deploy-flow' skill"
bash
praisonai skills learn "deploy steps from ./repo and the runbook PDF"
bash
praisonai skills learn "the API in ./openapi.yaml as a 'stripe-billing' skill" --llm gpt-4o

This is distinct from praisonai memory learn (captures a recall note into the memory store — not a skill) and from self_improve (auto-curates from conversation, unprompted).

Validate a Skill

Validate that a skill directory conforms to the Agent Skills specification.

bash
# Validate a skill directory
praisonai skills validate --path ./my-skill

# Validate with detailed output
praisonai skills validate --path ./my-skill --verbose

# Validate multiple skills
praisonai skills validate --path ./skill1 --path ./skill2

Output:

✓ Skill validation passed for: ./my-skill
├── ✓ SKILL.md exists
├── ✓ Frontmatter valid
├── ✓ Name format correct (lowercase, hyphens only)
├── ✓ Description within limits (1-1024 chars)
├── ✓ Optional fields valid
└── ✓ Directory structure valid

Error Output:

✗ Skill validation failed for: ./my-skill
├── ✗ SKILL.md not found
├── ✗ Name contains invalid characters (use lowercase and hyphens only)
└── ✗ Description too long (1024 chars max, found 1500)

Create a New Skill

Create a new skill directory with AI-generated content (default) or from a template.

bash
# Create with AI-generated content (uses OpenAI/Anthropic API)
praisonai skills create --name my-skill --description "Process and analyze CSV files"

# Create with all metadata options
praisonai skills create --name my-skill \
  --description "Process CSV files" \
  --author "my-team" \
  --license "MIT" \
  --compatibility "Works with PraisonAI Agents" \
  --output-dir ./custom-skills

# Create with template only (no AI, works without API key)
praisonai skills create --name my-skill --description "My skill" --template

# Create with auto-generated scripts/script.py
praisonai skills create --name my-skill --description "Data processor" --script

# Create CSV analyzer with relevant script
praisonai skills create --name csv-analyzer --description "Analyze CSV files" --script

# Create PDF processor with relevant script  
praisonai skills create --name pdf-processor --description "Extract text from PDF documents" --script

# Create API client with relevant script
praisonai skills create --name api-client --description "Make HTTP requests to REST APIs" --script

# Create CSV analyzer with template
praisonai skills create --name csv-analyzer --description "Analyze CSV files" --script --template
✓ scripts/script.py contains CSV analysis code with pandas

# Create PDF processor with template
praisonai skills create --name pdf-processor --description "Extract text from PDF documents" --script --template
✓ scripts/script.py contains PDF extraction code

# Create API client with template
praisonai skills create --name api-client --description "Make HTTP requests to REST APIs" --script --template
✓ scripts/script.py contains HTTP request code

# Create YAML config with AI generation
praisonai skills create --name yaml-config --description "Parse and validate YAML configuration files" --script
✓ AI generates comprehensive SKILL.md and script.py

# Create JSON parser
praisonai skills create --name json-parser --description "Parse JSON files" --script
✓ AI generates comprehensive SKILL.md and script.py

AI Generation Features:

  • 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 --template flag to skip AI and use template only

Smart Script Generation (--script flag):

When using --script, the generated scripts/script.py is tailored to the description:

Description KeywordsGenerated Script Type
csv, spreadsheet, data analysisPandas-based CSV analyzer
pdf, document, extract textPyPDF-based PDF processor
api, http, request, webRequests-based API client
image, photo, resizePIL-based image processor
json, yaml, configJSON/YAML parser
text, regex, searchText processing utilities
file, read, writeFile operations

The SKILL.md automatically includes usage instructions for the generated script:

markdown
## Script Usage

This skill includes a Python script at `scripts/script.py` that provides the core functionality.

### Running the Script

\`\`\`bash
python scripts/script.py <input>
\`\`\`

### Using as a Module

\`\`\`python
from scripts.script import csv_analyzer

result = csv_analyzer(input_data)
print(result)
\`\`\`

Generated Structure:

my-skill/
├── SKILL.md
├── scripts/
│   └── script.py    # Generated when using --script flag
├── references/
└── assets/

Generated SKILL.md:

yaml
---
name: my-skill
description: A custom skill for data processing
license: MIT
compatibility: Works with PraisonAI Agents
metadata:
  author: my-team
  version: "1.0"
allowed-tools: Read Write
---

# My Skill

## Overview

This skill enables agents to...

## Instructions

1. First step...
2. Second step...
3. Final step...

## Usage

Use this skill when the user asks to...

Upload Skill to Anthropic

Upload a skill to Anthropic’s Skills API for use with Claude.

bash
# Upload a skill to Anthropic
praisonai skills upload --path ./my-skill

# Upload with custom display title
praisonai skills upload --path ./my-skill --title "My Custom Skill"

Requirements:

  • ANTHROPIC_API_KEY environment variable must be set
  • anthropic Python package must be installed
  • Skill must have a valid SKILL.md file

Output:

Uploading skill 'my-skill' to Anthropic...
✓ Skill uploaded successfully!
  ID: skill_01AbCdEfGhIjKlMnOpQrStUv
  Title: My Custom Skill

Generate Prompt XML

Generate the XML prompt block for skills, useful for system prompt injection.

bash
# Generate prompt XML for all discovered skills
praisonai skills prompt

# Generate for specific directories
praisonai skills prompt --dirs ./skills ./other-skills

# Generate for specific skill names
praisonai skills prompt --skills pdf-processing data-analysis

# Output to file
praisonai skills prompt --output skills-prompt.xml

Output:

xml
<available_skills>
  <skill name="pdf-processing" path="/Users/user/.praison/skills/pdf-processing">
    <description>Process and extract information from PDF documents. Use this skill when the user asks to read, analyze, or extract data from PDF files.</description>
  </skill>
  <skill name="data-analysis" path="/Users/user/.praison/skills/data-analysis">
    <description>Analyze data using pandas, create visualizations, and generate insights from datasets. Use this skill when the user needs data analysis or visualization.</description>
  </skill>
</available_skills>

Check Skills

Check all discovered skills for issues and validate their configurations:

bash
# Check all skills
praisonai skills check

# Check with verbose output
praisonai skills check --verbose

# Check specific directories
praisonai skills check --dirs ./skills ./other-skills

Output:

Skill Health Check

✅ pdf-processing
   ✓ SKILL.md valid
   ✓ Frontmatter complete
   ✓ Instructions present

✅ data-analysis
   ✓ SKILL.md valid
   ✓ scripts/script.py exists
   ✓ Dependencies installed

⚠️ web-scraping
   ✓ SKILL.md valid
   ⚠ Missing examples/ directory
   ⚠ No scripts found

❌ broken-skill
   ✗ Invalid SKILL.md frontmatter
   ✗ Name contains invalid characters

Summary: 2 healthy, 1 warning, 1 error

Eligible Skills

List skills eligible for a specific task or capability:

bash
# List skills eligible for data tasks
praisonai skills eligible --task "analyze CSV data"

# List skills with specific tools
praisonai skills eligible --tools read_file write_file

# Output as JSON
praisonai skills eligible --task "process PDFs" --json

Output:

Eligible Skills for: "analyze CSV data"

1. csv-analyzer (score: 0.95)
   Match: CSV, data analysis, statistics

2. data-analysis (score: 0.82)
   Match: data analysis, visualization

3. file-processor (score: 0.45)
   Match: file operations

Skill Discovery Locations

PraisonAI searches for skills in these locations (in order of precedence):

  1. Project: ./.praison/skills/ or ./.claude/skills/
  2. User: ~/.praisonai/skills/
  3. System: /etc/praison/skills/ (admin-managed)

Using Skills with Agents

Direct Skill Paths

python
from praisonaiagents import Agent

# Create agent with specific skills
agent = Agent(
    name="PDF Assistant",
    instructions="You are a helpful assistant.",
    skills=["./skills/pdf-processing", "./skills/data-analysis"]
)

Skill Discovery

python
# Create agent that discovers skills from directories using SkillsConfig
from praisonaiagents.config import SkillsConfig

agent = Agent(
    name="Multi-Skill Agent",
    instructions="You are a versatile assistant.",
    skills=SkillsConfig(dirs=["./skills", "~/.praisonai/skills"])
)

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

bash
pip install praisonai
export OPENAI_API_KEY=xxxxxx
praisonai skills create --name csv-analyzer --description "Analyze CSV files" --script

Step 2: Create test data

bash
echo "transaction_id,account_holder,account_number,transaction_type,amount,timestamp,status
1,John Doe,ACC001,deposit,1500.00,2024-01-15 09:30:00,completed
2,Jane Smith,ACC002,withdrawal,500.00,2024-01-15 10:15:00,completed
3,Bob Wilson,ACC003,transfer,2000.00,2024-01-15 11:00:00,pending
4,Alice Brown,ACC004,deposit,3500.00,2024-01-15 14:30:00,completed
5,Charlie Davis,ACC005,withdrawal,750.00,2024-01-15 15:45:00,failed" > data.csv

Step 3: Create app.py

python
from praisonai import Agent

agent = Agent(
    name="Data Analyst",
    instructions="Analyze data files",
    skills=["./csv-analyzer"]
)

agent.run("Analyze the data in this file: ./data.csv using the csv-analyzer skill.")

Step 4: Run

bash
python app.py

How it works behind the scenes:

  1. Skill Discovery: When skills=["./csv-analyzer"] is set, the agent loads skill metadata
  2. Lazy Tool Injection: read_file and run_skill_script tools are added only when skills are accessed (zero performance impact when not used)
  3. System Prompt: Skills are injected into the system prompt with their descriptions, locations, and current working directory
  4. Path Resolution: The run_skill_script tool automatically resolves relative file paths (like data.csv) to absolute paths based on the working directory
  5. Progressive Disclosure: Agent reads SKILL.md only when the skill is relevant to the task
  6. Script Execution: Agent runs scripts from scripts/ directory using the modular skill_tools module

Skill Directory Structure:

csv-analyzer/
├── SKILL.md              # Required: instructions + metadata
└── scripts/
    └── skill.py          # Optional: executable scripts

SKILL.md Example:

markdown
---
name: csv-analyzer
description: Analyze CSV files to extract statistics and insights
license: Apache-2.0
metadata:
  author: praison
  version: "1.0"
---

# CSV Analyzer

## When to Use
Use this skill when the user needs to analyze CSV files.

## Instructions
1. Read the CSV file
2. Identify columns and data types
3. Calculate statistics for numeric columns
4. Report findings clearly

CLI with Skills

bash
# Use skills with direct prompt
praisonai "Analyze this PDF" --skills ./skills/pdf-processing

# Use skills with discovery
praisonai "Process the data" --skills-dirs ./skills

# Combine with other features
praisonai "Extract and analyze" \
  --skills ./skills/pdf-processing \
  --skills-dirs ./skills \
  --verbose \
  --metrics

SKILL.md Format

Required Fields

FieldDescriptionConstraints
nameSkill identifier1-64 chars, lowercase, hyphens only
descriptionWhat the skill does and when to use it1-1024 chars

Optional Fields

FieldDescription
licenseLicense for the skill (e.g., Apache-2.0, MIT)
compatibilityCompatibility information (max 500 chars)
metadataKey-value pairs for custom properties
allowed-toolsSpace-delimited list of tools the skill requires

Example SKILL.md

yaml
---
name: pdf-processing
description: Process and extract information from PDF documents. Use this skill when the user asks to read, analyze, or extract data from PDF files.
license: Apache-2.0
compatibility: Works with PraisonAI Agents
metadata:
  author: your-org
  version: "1.0"
allowed-tools: Read Write
---

# PDF Processing Skill

## Overview

This skill enables agents to process PDF documents, extract text, tables, and metadata from PDF files.

## Instructions

1. First, verify the PDF file exists and is accessible
2. Use appropriate tools to read the PDF content
3. Extract text while preserving structure and formatting
4. Identify and extract tables if present
5. Extract metadata like author, creation date, etc.
6. Provide a structured summary of the PDF content

## When to Use

- User asks to read or analyze PDF files
- Need to extract specific information from PDFs
- Converting PDF content to other formats
- Summarizing PDF documents

## Tools Required

- Read: To access PDF files
- Write: To save extracted content or summaries

Directory Structure

skill-name/
├── SKILL.md          # Required: Skill definition
├── scripts/          # Optional: Executable code
│   ├── extract.py    # Python scripts for the skill
│   └── process.sh    # Shell scripts
├── references/       # Optional: Additional documentation
│   ├── api.md        # API documentation
│   └── examples.md   # Usage examples
└── assets/           # Optional: Templates, data files
    ├── template.txt   # Text templates
    └── sample.json   # Sample data

Best Practices

  1. Clear Descriptions: Be specific about when to use the skill
  2. Structured Instructions: Use numbered steps for clarity
  3. Tool Requirements: List all required tools in allowed-tools
  4. Version Management: Use semantic versioning in metadata
  5. Documentation: Include examples in references/
  6. 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

PraisonAI supports both .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

  1. Skill not found
  2. Check if skill directory is in discovery path
  3. Verify SKILL.md exists in the skill directory
  4. Use praisonai skills list --verbose to debug
  1. Validation errors
  2. Ensure name uses only lowercase and hyphens
  3. Check description length (1-1024 chars)
  4. Verify YAML frontmatter is valid
  1. Skills not loading
  2. Check file permissions on skill directories
  3. Verify skill directory structure
  4. Use praisonai skills validate to check compliance

Debug Commands

bash
# List with verbose output
praisonai skills list --verbose

# Validate with details
praisonai skills validate --path ./skill --verbose

# Check discovery paths
praisonai skills list --dirs ./test-skills --verbose

Examples

See the examples/skills/ directory for complete examples:

  • basic_skill_usage.py – Basic skill discovery and usage
  • custom_skill_example.py – Creating custom skills programmatically
  • pdf-processing/ – Example skill directory