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.

GoCLIAI-PoweredTemplatesVersion Control

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 | bash

From Source

git clone https://github.com/rakshit-gen/openskill.git
cd openskill && make build && sudo make install

Configuration

OpenSkill supports multiple AI providers for skill generation: Groq, OpenAI, Anthropic, and Ollama (local).

Supported Providers

ProviderDefault ModelAPI Key
groqllama-3.3-70b-versatileconsole.groq.com
openaigpt-4o-miniplatform.openai.com
anthropicclaude-3-5-sonnet-20241022console.anthropic.com
ollamallama3.2No API key (local)

Quick Setup

# Set provider and API key
openskill config set provider groq
openskill config set api-key

# View configuration
openskill config list

Commands Overview

OpenSkill v0.3.0 includes 20+ commands organized by category:

openskill initInitialize OpenSkill in your project
openskill addCreate a new skill with AI generation
openskill listList skills (with tag/group filters)
openskill showDisplay skill details
openskill editModify an existing skill
openskill removeDelete a skill
openskill validateValidate skill structure
openskill templateManage skill templates
openskill historyShow version history
openskill rollbackRestore previous version
openskill diffCompare skill versions
openskill tagManage skill tags
openskill groupManage skill groups
openskill workspaceProject-specific config
openskill exportExport to JSON/YAML
openskill importImport from file/URL
openskill syncSync with Git repository
openskill testTest a skill with AI
openskill improveAI-powered improvements
openskill explainAI-powered explanation

openskill init

Initialize OpenSkill in your project. Creates the necessary directory structure.

openskill init

openskill 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 -v

openskill 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

TemplateCategoryDescription
code-reviewdevelopmentReview code for quality, bugs, and best practices
commit-messagegitGenerate conventional commit messages
documentationdocsWrite clear technical documentation
testingdevelopmentWrite comprehensive test suites
debuggingdevelopmentSystematic debugging and root cause analysis
api-designarchitectureDesign RESTful APIs
security-reviewsecurityReview code for security vulnerabilities
refactoringdevelopmentImprove code structure safely

openskill template list

# List all templates
openskill template list

# Show template details
openskill template show code-review

openskill template use

# Create skill from template
openskill template use code-review

# Create with custom name
openskill template use code-review my-code-reviewer

openskill history

View version history for a skill. Versions are automatically saved when you edit.

openskill history "code-review"

openskill rollback

openskill rollback "code-review" 2

openskill 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 3

Tags

Organize skills with tags for flexible categorization.

# List all tags
openskill tag list

# Show skills with a tag
openskill tag show security

# Add tags to a skill
openskill tag add code-review quality security

# Remove tags
openskill tag remove code-review security

Groups

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-review

Workspaces

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 10

openskill 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.yaml

openskill 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 --pull

openskill 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 --mock

openskill 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 --apply

openskill explain

Get an AI-powered explanation of what a skill does.

# Basic explanation
openskill explain code-review

# Verbose with examples
openskill explain code-review --verbose

Skill 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 style

Skill 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 flows

Context 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_URL

Hooks

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.yaml

Team 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