Skip to content

darrenhinde/Opencode-skills-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎯 OpenCode Skills Showcase

A complete demonstration of OpenCode Skills with four progressive tiers, from simple instructions to interactive movie character personalities!

πŸ“š What's Included

1. Four Demonstration Skills

Tier 1: Simple (POC)

  • Location: .opencode/skill/hello-skill/
  • Files: SKILL.md
  • Demonstrates: Basic skill structure
  • Concept: Skills are instructions, not code

Tier 2: Intermediate

  • Location: .opencode/skill/steps-skill/
  • Files: SKILL.md, steps.sh
  • Demonstrates: Helper scripts with ordered execution
  • Concept: Helper scripts are portable

Tier 3: Advanced

  • Location: .opencode/skill/workflow-skill/
  • Files: SKILL.md, script1.sh, script2.sh, script3.sh, script4.sh
  • Demonstrates: Complete workflow orchestration
  • Concept: Multiple scripts working together

Tier 4: Movie Personality Skill (Interactive!)

  • Location: .opencode/skill/smart-router-skill/
  • Files: SKILL.md, router.sh, config/personality-config.json, 3 character scripts
  • Router Script: router.sh (bash script that routes to character workflows)
  • Demonstrates: Interactive character selection, configurable missions, dynamic routing
  • Concept: Config-driven behavior with rich visual output

2. Documentation

  • MOVIE_PERSONALITY_SUMMARY.md - Overview of the movie personality skill
  • SHOWCASE_SUMMARY.txt - Quick reference guide
  • .opencode/README.md - Skills structure overview
  • README.md - This file

πŸš€ Quick Start

Try Tier 4: Movie Personality Skill

The most fun way to see skills in action!

"Use the movie personality skill"

The agent will:

  1. Ask which character you want (Yoda, Tony Stark, or Sherlock Holmes)
  2. Run the themed workflow for that character
  3. Show rich visual output with movie quotes
  4. Respond in character!

Want different behavior? Edit .opencode/skill/smart-router-skill/config/personality-config.json and change the mission number from 1 to 2!

Run Individual Tiers

"Run Tier 1" - Simple hello skill
"Run Tier 2" - Steps with helper script
"Run Tier 3" - Multi-script workflow
"Run Tier 4" - Movie personality (interactive!)

🎬 Movie Personality Characters

Yoda (Star Wars)

  • Mission 1: Defend the Republic - Train Jedi, fortify defenses
  • Mission 2: Infiltrate the Sith - Undercover dark side operation

Tony Stark (Iron Man)

  • Mission 1: Save the World - Build suit, assemble Avengers
  • Mission 2: Ultron Protocol - Autonomous defense system

Sherlock Holmes

  • Mission 1: Solve the Murder - Deductive reasoning
  • Mission 2: Prevent the Crime - Predictive analysis

πŸ”‘ Key Concepts

1. Skills Are Instructions

SKILL.md contains instructions for the agent
↓
Agent reads the instructions
↓
Agent decides which tools to use
↓
Agent executes the commands

2. Scripts Are Portable

Helper scripts can be:
- Bash (.sh)
- Python (.py)
- Any language

They live alongside SKILL.md
Agent executes them via bash tool

3. Custom Tools Extend Functionality

TypeScript tools in .opencode/tool/
↓
Available to all skills
↓
Provide specialized functionality
↓
Agent calls them directly

4. Config-Driven Behavior (Tier 4)

Simple JSON config controls workflow
↓
Change one number (mission: 1 β†’ 2)
↓
Completely different behavior
↓
Same character, different story!

5. Full Visibility

Console output shows exactly what's happening
Rich visual feedback with emojis and quotes
Not hallucination or guessing
Agent can see results and make decisions

πŸ“Š Tier Comparison

Feature Tier 1 Tier 2 Tier 3 Tier 4
Complexity Minimal Medium Advanced Interactive
Files 1 2 5 5
Helper Scripts 0 1 4 3
Custom Tools No No No Yes (1)
Config-Driven No No No Yes
Interactive No No No Yes
Use Case POC Workflows Complex Systems Fun Demo
Learning Curve Instant Easy Moderate Fun!

πŸ“ Directory Structure

.
β”œβ”€β”€ .opencode/
β”‚   β”œβ”€β”€ agent/
β”‚   β”‚   β”œβ”€β”€ codebase-agent.md          # Development agent
β”‚   β”‚   └── skills-demo-agent.md       # Demo agent
β”‚   β”œβ”€β”€ skill/
β”‚   β”‚   β”œβ”€β”€ hello-skill/               # Tier 1
β”‚   β”‚   β”‚   └── SKILL.md
β”‚   β”‚   β”œβ”€β”€ steps-skill/               # Tier 2
β”‚   β”‚   β”‚   β”œβ”€β”€ SKILL.md
β”‚   β”‚   β”‚   └── steps.sh
β”‚   β”‚   β”œβ”€β”€ workflow-skill/            # Tier 3
β”‚   β”‚   β”‚   β”œβ”€β”€ SKILL.md
β”‚   β”‚   β”‚   β”œβ”€β”€ script1.sh
β”‚   β”‚   β”‚   β”œβ”€β”€ script2.sh
β”‚   β”‚   β”‚   β”œβ”€β”€ script3.sh
β”‚   β”‚   β”‚   └── script4.sh
β”‚   β”‚   └── smart-router-skill/        # Tier 4 (Movie Personality!)
β”‚   β”‚       β”œβ”€β”€ SKILL.md
β”‚   β”‚       β”œβ”€β”€ router.sh              # Routes to character scripts
β”‚   β”‚       β”œβ”€β”€ config/
β”‚   β”‚       β”‚   └── personality-config.json  ← Edit this!
β”‚   β”‚       └── scripts/
β”‚   β”‚           β”œβ”€β”€ yoda-workflow.sh
β”‚   β”‚           β”œβ”€β”€ stark-workflow.sh
β”‚   β”‚           └── sherlock-workflow.sh
β”‚   └── README.md
β”œβ”€β”€ SHOWCASE_SUMMARY.txt               # Quick reference
β”œβ”€β”€ MOVIE_PERSONALITY_SUMMARY.md       # Tier 4 overview
└── README.md                          # This file

πŸ’‘ Learning Path

Step 1: Try the Movie Personality Skill

Ask: "Use the movie personality skill" - Most fun way to see skills in action!

Step 2: Understand the Basics

Read SHOWCASE_SUMMARY.txt to understand what skills are

Step 3: Explore Each Tier

Run Tier 1, 2, 3, and 4 to see the progression

Step 4: Customize

Edit personality-config.json to change missions (1 β†’ 2) and see different behavior!

Step 5: Explore the Code

Look at individual SKILL.md files and helper scripts

Step 6: Create Your Own

Use this as a template for your own skills

🎯 What You'll Learn

After exploring this showcase, you'll understand:

βœ… How OpenCode Skills are structured βœ… How agents load and execute skills βœ… How helper scripts work with agents βœ… How custom tools extend functionality βœ… The progression from simple to complex βœ… Why skills are better than hallucination βœ… How to create your own skills βœ… NEW: How config changes drive different behaviors βœ… NEW: How to make skills interactive and fun βœ… NEW: How to use dynamic routing based on parameters

🎬 Customizing Movie Personalities

Want to see different behavior? It's easy!

  1. Open .opencode/skill/smart-router-skill/config/personality-config.json
  2. Find the character you want to change
  3. Change "mission": 1 to "mission": 2
  4. Run the skill again - completely different workflow!

Example:

{
  "yoda": {
    "mission": 2,  ← Changed from 1 to 2!
    "missions": {
      "1": { "name": "Defend the Republic", ... },
      "2": { "name": "Infiltrate the Sith", ... }
    }
  }
}

Now Yoda will run an undercover Sith infiltration mission instead of defending the Republic!

πŸ”— Related Resources

πŸš€ Next Steps

  1. Try the movie personality skill - Ask the agent to use it!
  2. Choose your character - Yoda, Stark, or Sherlock
  3. Watch the magic - See themed workflows in action
  4. Customize missions - Edit the config file
  5. Create your own - Use this as a template

✨ Key Takeaways

  • Skills are modular - Each skill is self-contained and reusable
  • Scripts are powerful - Simple bash scripts can do complex work
  • Tools extend capabilities - Custom TypeScript tools add specialized functionality
  • Full visibility - Console output shows exactly what's happening
  • Config-driven behavior - Simple JSON changes create different outcomes
  • Interactive is fun - Agent asks questions, user chooses, magic happens!
  • Easy to customize - Change one number, get different behavior

Ready to see OpenCode Skills in action?

Ask the agent: "Use the movie personality skill"

🎬 Choose your character and watch the show! πŸš€

About

Opencode-skil

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published