OpenSkill CLI Documentation
OpenSkill is a command-line tool for creating and managing Claude skills with AI-powered content generation. It simplifies the process of building reusable skill definitions that enhance Claude's capabilities.
What's New in v0.3.0
- Skill Templates - Pre-built templates for common use cases
- Tags & Groups - Organize skills by category
- Workspaces - Project-specific skill configuration
- Import/Export - Share skills in JSON, YAML, or Markdown
- AI Commands - Test, improve, and explain skills with AI
- Sync - Back up skills to Git repositories
- Context Providers - Define how skills gather context
- Hooks - Pre/post execution commands
Installation
Quick Install (macOS / Linux)
curl -fsSL openskill.online/api/install | bashFrom Source
git clone https://github.com/rakshit-gen/openskill.git
cd openskill && make build && sudo make installConfiguration
OpenSkill supports multiple AI providers for skill generation: Groq, OpenAI, Anthropic, and Ollama (local).
Supported Providers
| Provider | Default Model | API Key |
|---|---|---|
| groq | llama-3.3-70b-versatile | console.groq.com |
| openai | gpt-4o-mini | platform.openai.com |
| anthropic | claude-3-5-sonnet-20241022 | console.anthropic.com |
| ollama | llama3.2 | No API key (local) |
Quick Setup
# Set provider and API key
openskill config set provider groq
openskill config set api-key
# View configuration
openskill config listCommands Overview
OpenSkill v0.3.0 includes 20+ commands organized by category:
openskill initInitialize OpenSkill in your projectopenskill addCreate a new skill with AI generationopenskill listList skills (with tag/group filters)openskill showDisplay skill detailsopenskill editModify an existing skillopenskill removeDelete a skillopenskill validateValidate skill structureopenskill templateManage skill templatesopenskill historyShow version historyopenskill rollbackRestore previous versionopenskill diffCompare skill versionsopenskill tagManage skill tagsopenskill groupManage skill groupsopenskill workspaceProject-specific configopenskill exportExport to JSON/YAMLopenskill importImport from file/URLopenskill syncSync with Git repositoryopenskill testTest a skill with AIopenskill improveAI-powered improvementsopenskill explainAI-powered explanationopenskill init
Initialize OpenSkill in your project. Creates the necessary directory structure.
openskill initopenskill add
Create a new skill with AI-powered content generation.
# AI-powered creation
openskill add "code-review" -d "Reviews code for best practices"
# Manual creation
openskill add "my-skill" -d "Description" --manual -r "Rule 1" -r "Rule 2"openskill list
List all skills with optional filtering by tag or group.
# List all skills
openskill list
# Filter by tag
openskill list --tag security
# Filter by group
openskill list --group development
# Verbose output
openskill list -vopenskill show
openskill show "code-review"openskill edit
openskill edit "code-review" -d "New description" -r "New rule"openskill remove
openskill remove "old-skill"openskill validate
Validate a skill's structure and check for common issues.
openskill validate "code-review"Skill Templates
OpenSkill includes pre-built templates for common use cases. Templates provide professionally designed skills you can use immediately or customize.
Available Templates
| Template | Category | Description |
|---|---|---|
| code-review | development | Review code for quality, bugs, and best practices |
| commit-message | git | Generate conventional commit messages |
| documentation | docs | Write clear technical documentation |
| testing | development | Write comprehensive test suites |
| debugging | development | Systematic debugging and root cause analysis |
| api-design | architecture | Design RESTful APIs |
| security-review | security | Review code for security vulnerabilities |
| refactoring | development | Improve code structure safely |
openskill template list
# List all templates
openskill template list
# Show template details
openskill template show code-reviewopenskill template use
# Create skill from template
openskill template use code-review
# Create with custom name
openskill template use code-review my-code-revieweropenskill history
View version history for a skill. Versions are automatically saved when you edit.
openskill history "code-review"openskill rollback
openskill rollback "code-review" 2openskill diff
Compare different versions of a skill to see what changed.
# Compare current with latest saved version
openskill diff "code-review"
# Compare specific versions
openskill diff "code-review" --v1 1 --v2 3Groups
Bundle related skills into groups.
# List all groups
openskill group list
# Show skills in a group
openskill group show development
# Add skill to a group
openskill group set code-review development
# Remove from group
openskill group unset code-reviewWorkspaces
Configure project-specific skill settings.
# Initialize workspace
openskill workspace init my-project
# Show workspace config
openskill workspace show
# Add skill to workspace
openskill workspace add code-review
# Set variable override
openskill workspace set code-review max_issues 10openskill export
Export skills to JSON, YAML, or Markdown.
# Export to stdout
openskill export code-review --format json
# Export to file
openskill export code-review --format yaml -o skill.yamlopenskill import
Import skills from files, URLs, or stdin.
# Import from file
openskill import skill.json
# Import from URL
openskill import https://example.com/skills/review.yaml
# Import from stdin
cat skill.json | openskill import -openskill sync
Synchronize skills with a Git repository for backup and sharing.
# Set remote repository
openskill sync --remote git@github.com:user/skills.git
# Push changes
openskill sync --push
# Pull changes
openskill sync --pullopenskill test
Test a skill with a sample prompt using AI.
# Test with a prompt
openskill test code-review --prompt "Review this function: func add(a, b int) int { return a + b }"
# Mock mode (no API call)
openskill test code-review --mockopenskill improve
Use AI to analyze and suggest improvements for a skill.
# Get improvement suggestions
openskill improve code-review
# Apply improvements automatically
openskill improve code-review --applyopenskill explain
Get an AI-powered explanation of what a skill does.
# Basic explanation
openskill explain code-review
# Verbose with examples
openskill explain code-review --verboseSkill Format
Skills are Markdown files with YAML frontmatter in .claude/skills/.
---
name: code-review
description: Reviews code for quality and best practices
tags:
- code
- review
- quality
group: development
version: "1.0.0"
author: Your Name
output_format: markdown
context:
files:
- package.json
globs:
- "src/**/*.ts"
commands:
- git diff --cached
hooks:
pre:
- npm run lint
post:
- echo "Review complete"
---
# code-review
Reviews code for quality issues, potential bugs, and adherence to best practices.
## Rules
- Check for security vulnerabilities
- Verify proper error handling
- Ensure consistent code styleSkill Composition
Build complex skills from simpler ones using extends and includes.
---
name: security-review
description: Security-focused code review
extends: code-review
---
# security-review
Security-focused extension of the base code review.
## Rules
- Focus on OWASP Top 10
- Check authentication flowsContext Providers
Define how skills gather context from your project.
context:
files: # Specific files to read
- README.md
- package.json
globs: # Glob patterns to match
- "src/**/*.ts"
- "tests/**/*.test.ts"
commands: # Commands to execute
- git status
- npm run lint --silent
urls: # URLs to fetch
- https://api.example.com/schema
environment: # Environment variables
- NODE_ENV
- API_URLHooks
Define commands to run before and after skill execution.
hooks:
pre: # Run before skill
- npm run build
- npm run lint
post: # Run after skill
- npm run test
- git add .AI Generation
OpenSkill uses AI to generate comprehensive skill content from simple descriptions. The generator creates 8-12 specific, actionable rules that are falsifiable and domain-specific.
Examples
Quick Start Workflow
# Initialize
openskill init
# Create from template
openskill template use code-review
# Customize with tags
openskill tag add code-review security quality
# Test the skill
openskill test code-review --prompt "Review this code..."
# Export for sharing
openskill export code-review --format yaml -o my-review.yamlTeam Collaboration
# Set up sync
openskill sync --remote git@github.com:team/skills.git
# Make changes
openskill add "team-style" -d "Team coding standards"
# Push to team
openskill sync --push
# Teammates can pull
openskill sync --pull