Skip to content

Mario-pereyra/skill-creator-opencode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skill Creator for OpenCode

A meta-skill system that automates the creation of OpenCode skills, commands, agents, and plugins through an interactive 7-phase wizard.

What is this?

Skill Creator is an OpenCode skill that creates other skills. It interviews you step-by-step, analyzes your project context (optionally), and generates the optimal stack of extensibility layers for your use case.

Instead of manually writing SKILL.md files, commands, and configs, you run /create-skill and the wizard handles everything:

  • Classifies what type of skill you need (Knowledge, Workflow, or Integration)
  • Decides which OpenCode layers to generate (Skill, Command, Agent, Plugin)
  • Uses progressive disclosure so generated skills are token-efficient
  • Validates the output before writing files

Features

  • Interactive 7-phase wizard via /create-skill command
  • Three skill types: Knowledge (patterns/rules), Workflow (multi-step processes), Integration (external tools)
  • Adaptive layer generation: Only generates what's needed (Skill + Command as minimum, Agent/Plugin when required)
  • Two operation modes: "Create a skill for X" (on-demand) or "Analyze this repo and suggest skills" (proactive)
  • Progressive disclosure architecture: SKILL.md hub (~140-200 lines) with on-demand reference files
  • Built-in validation: Shell script to verify generated skill structure
  • 6 templates + 3 annotated examples for every skill type and layer
  • Spanish UX: All wizard interactions are in Spanish; generated skill content is in English

Architecture

The 4 OpenCode Extensibility Layers

Layer File Type Purpose When to Use
Skill .md Instructions, patterns, knowledge Always (base layer)
Command .md Entry point with $ARGUMENTS, !shell, @file refs Needs user arguments or shell injection
Agent .yaml Model config, temperature, tool restrictions Needs specific model or tool limits
Plugin .ts Event hooks, custom tools, SDK access Needs system events or custom tools

Skill Types

Type Purpose Examples
Knowledge Patterns, rules, best practices for a technology typescript, react-19, django-drf
Workflow Multi-step process with defined phases CI/CD pipelines, code review flows
Integration Connect external tools/services jira-task, jira-epic, Slack bots

3-Level Loading Model

Generated skills use progressive disclosure to minimize token consumption:

Level 1 (~100 tokens):  name + description in frontmatter (always loaded in skill list)
Level 2 (~500 lines):   SKILL.md body (loaded when skill() invoked)
Level 3 (unlimited):    reference/, templates/, examples/ (loaded on-demand via read tool)

File Structure

.opencode/
  skills/skill-creator/
    SKILL.md                              # Hub: concise instructions + quick-ref tables
    reference/
      taxonomy.md                         # Knowledge/Workflow/Integration classification
      opencode-layers.md                  # Anatomy of Skills, Commands, Agents, Plugins
      decision-tree.md                    # Which layers to generate and why
      patterns-antipatterns.md            # 7 patterns + 7 anti-patterns
      best-practices.md                   # Claude Code best practices adapted for OpenCode
      progressive-disclosure.md           # 3-level loading model guide
    templates/
      knowledge-skill.md                  # Template for Knowledge Skills
      workflow-skill.md                   # Template for Workflow Skills
      integration-skill.md               # Template for Integration Skills
      command-template.md                 # Template for Commands
      agent-template.md                   # Template for Agent configs
      plugin-template.md                  # Template for Plugins (TypeScript)
    examples/
      knowledge-example.md                # Annotated example (typescript pattern)
      workflow-example.md                 # Annotated example (openspec-propose pattern)
      integration-example.md              # Annotated example (jira-task pattern)
    scripts/
      validate-skill.sh                   # SKILL.md structure validator
  commands/
    create-skill.md                       # /create-skill slash command (7-phase wizard)

OpenSpec Artifacts

The project was designed using OpenSpec, a spec-driven development methodology. The full spec artifacts are included:

openspec/
  config.yaml                             # OpenSpec project configuration
  specs/                                  # 6 capability specifications
    skill-hub/spec.md
    create-skill-command/spec.md
    reference-docs/spec.md
    skill-templates/spec.md
    skill-examples/spec.md
    validation-script/spec.md
  changes/archive/                        # Archived change with proposal, design, tasks
    2026-03-06-implement-skill-creator/
      proposal.md
      design.md
      tasks.md                            # 22/22 tasks completed
      specs/                              # Delta specs for the change

Quick Start

See INSTALL.md for installation instructions and USAGE.md for a complete usage guide.

TL;DR

# Clone the repo
git clone https://github.com/Mario-pereyra/skill-creator-opencode.git

# Copy skill to global OpenCode skills
cp -r .opencode/skills/skill-creator ~/.config/opencode/skills/

# Copy command to global OpenCode commands
cp .opencode/commands/create-skill.md ~/.config/opencode/commands/

# Open any project in OpenCode and run:
# /create-skill

The 7-Phase Wizard

Phase Name What Happens
0 Load Context Loads skill-creator instructions and creates task tracking
1 Classify Intent Asks: Create new / Analyze repo / Improve existing
2 Interview Step-by-step questions about the skill (type, content, scope)
3 Decide Stack Recommends which layers to generate, with explanation
4 Choose Destination Project-local or global installation
5 Generate Files Creates files from templates using interview data
6 Preview & Confirm Shows all generated files for user approval
7 Write & Verify Writes files, runs validation, shows summary

Design Decisions

Why English for generated content?

LLMs perform better with English technical content: more efficient tokenization, stronger pattern recognition, and consistency with the OpenCode ecosystem. The wizard UX is in Spanish for the user's comfort, but generated skill files are in English for optimal AI performance.

Why progressive disclosure?

A monolithic 500+ line SKILL.md wastes tokens when only a subset of instructions is needed. The hub + reference files pattern keeps the always-loaded content under 200 lines, with deep reference material loaded only when needed.

Why spec-driven development?

OpenSpec artifacts serve as living documentation of design decisions. The proposal, design, specs, and task breakdown explain why each component exists, not just what it does.

Requirements

  • OpenCode installed and configured
  • Bash-compatible shell (for validation script; works on Linux, macOS, WSL, Git Bash)

License

MIT

Author

Built with OpenCode using the OpenSpec methodology.

About

A meta-skill for OpenCode that automates creation of skills, commands, agents, and plugins through an interactive 7-phase wizard

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages