home / skills / darrenhinde / openagentscontrol / smart-router-skill
This skill lets you embody iconic movie characters with configurable missions and themed workflows to create engaging, personalized automation experiences.
npx playbooks add skill darrenhinde/openagentscontrol --skill smart-router-skillReview the files below or copy the command above to add this skill to your agents.
---
name: smart-router-skill
description: Movie character personality skill with configurable missions - choose your character and watch themed workflows unfold
---
## What I do
I'm a fun, interactive skill that lets you embody iconic movie characters! I demonstrate:
- š¬ **Character Selection** - Choose from Yoda, Tony Stark, or Sherlock Holmes
- šÆ **Configurable Missions** - Simple config changes create different outcomes
- šØ **Themed Workflows** - Rich, visual scripts that match each character
- š **Dynamic Routing** - Different scripts run based on character choice
- āļø **Easy Customization** - Edit one config file to change missions
This shows how skills can adapt behavior based on simple configuration changes!
## How to use me
**IMPORTANT: First, I'll ask you which character you want to embody!**
### Available Characters
- **yoda** - Wise Jedi Master from Star Wars
- Mission 1: Defend the Republic (train Jedi, fortify defenses)
- Mission 2: Infiltrate the Sith (undercover operation)
- **stark** - Genius billionaire Tony Stark from Iron Man
- Mission 1: Save the World (build suit, assemble Avengers)
- Mission 2: Ultron Protocol (autonomous defense system)
- **sherlock** - Master detective Sherlock Holmes
- Mission 1: Solve the Murder (deductive reasoning)
- Mission 2: Prevent the Crime (predictive analysis)
### Basic Usage
When you ask to use this skill, I'll present the character options and ask you to choose. Then I'll run:
```bash
cd .opencode/skills/smart-router-skill
bash router.sh --character <your_choice>
```
### Example Flow
```
You: "Use the movie personality skill"
Me: "Which character would you like me to be?
1. Yoda - Wise Jedi Master
2. Tony Stark - Genius billionaire
3. Sherlock Holmes - Master detective"
You: "Yoda"
Me: *runs bash router.sh --character yoda*
*displays themed workflow output*
*responds in character*
```
## Customizing Missions
Want to see different behavior? Edit the config file!
**File:** `.opencode/skills/smart-router-skill/config/personality-config.json`
```json
{
"yoda": {
"mission": 1, ā Change this to 2!
"missions": {
"1": { "name": "Defend the Republic", ... },
"2": { "name": "Infiltrate the Sith", ... }
}
}
}
```
**Change `"mission": 1` to `"mission": 2`** and the same character will run a completely different workflow!
### Mission 1 vs Mission 2 Examples
**Yoda Mission 1** (Defend the Republic):
```
š JEDI COUNCIL - CORUSCANT TEMPLE
Training Padawans...
Fortifying defenses...
'Ready to defend the Republic, we are!'
RESULT: ALIGNMENT=LIGHT_SIDE
```
**Yoda Mission 2** (Infiltrate the Sith):
```
š“ SECRET CHAMBER - UNDERCOVER OPERATION
Studying dark side techniques...
Gathering intelligence...
'Dangerous path this is, but necessary!'
RESULT: ALIGNMENT=UNDERCOVER
```
## What This Demonstrates
ā
**Simple config = different behavior** - Change 1 number, get completely different output
ā
**Dynamic script routing** - Tool selects the right script based on character
ā
**Rich visual feedback** - Clear, themed console output shows what's happening
ā
**Character context** - Each personality has unique dialogue and workflow
ā
**Easy to understand** - Viewers immediately see the cause and effect
ā
**Real-world pattern** - Shows how to make skills configurable for different scenarios
## Architecture
```
.opencode/
āāā skill/
āāā smart-router-skill/
āāā SKILL.md # This file
āāā router.sh # Routes to character scripts
āāā config/
ā āāā personality-config.json # ā EDIT THIS to change missions!
āāā scripts/
āāā yoda-workflow.sh # Star Wars themed workflow
āāā stark-workflow.sh # Iron Man themed workflow
āāā sherlock-workflow.sh # Detective themed workflow
```
## Router Script Reference
### router.sh
A bash script that loads a character personality and runs their themed workflow.
**Location:** `.opencode/skills/smart-router-skill/router.sh`
```bash
# Basic usage
bash router.sh --character yoda
bash router.sh --character stark
bash router.sh --character sherlock
# Override mission from config
bash router.sh --character yoda --mission 2
# Help
bash router.sh --help
```
**How it works:**
1. Parses command-line arguments (character, mission)
2. Reads `personality-config.json` for the character
3. Gets the mission number (from args or config)
4. Validates character and mission
5. Executes the character's workflow script with mission parameter
6. Displays themed output with full visibility
## Example Outputs
### Yoda (Mission 1)
```
š¬ Loading YODA personality...
š āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā š
JEDI COUNCIL - CORUSCANT TEMPLE
MISSION: Defend the Republic
š āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā š
š¢ Phase 1: Train the Padawans
āā 'Pass on what you have learned.'
āā Younglings trained: 12
āā Lightsaber forms mastered: Form III (Soresu)
āā Status: ā Complete
[... more phases ...]
⨠'Ready to defend the Republic, we are!' āØ
š MISSION RESULTS:
Character: yoda
Mission: Defend the Republic
Alignment: light_side
```
### Tony Stark (Mission 1)
```
š¬ Loading STARK personality...
ā” āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā”
STARK INDUSTRIES - WORKSHOP
MISSION: Save the World
ā” āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā”
š“ Phase 1: Initialize Arc Reactor
āā 'JARVIS, fire up the reactor.'
āā Arc Reactor: Mark VII online
āā Power output: 8 gigajoules per second
āā Status: ā Complete
[... more phases ...]
š 'Suit up, team. We've got a world to save.' š
š MISSION RESULTS:
Character: stark
Mission: Save the World
Team: avengers
```
### Sherlock Holmes (Mission 1)
```
š¬ Loading SHERLOCK personality...
š āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā š
221B BAKER STREET - INVESTIGATION
MISSION: Solve the Murder
š āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā š
š¤ Phase 1: Crime Scene Analysis
āā 'The game is afoot!'
āā Evidence collected: Cigar ash, muddy footprints
āā Status: ā Complete
[... more phases ...]
⨠'Case closed. Elementary, my dear Watson.' āØ
š MISSION RESULTS:
Character: sherlock
Mission: Solve the Murder
Method: deduction
```
## Key Concepts
### 1. Character Selection
The agent asks which character you want, making it interactive and clear.
### 2. Config-Driven Behavior
One simple JSON file controls which mission runs for each character.
### 3. Themed Workflows
Each character has unique dialogue, emojis, and workflow steps that match their personality.
### 4. Visual Clarity
Rich console output makes it obvious what's happening at each step.
### 5. Easy Customization
Anyone can edit the config file and immediately see different results.
## Why This Matters
This skill shows that OpenCode Skills can:
- **Be interactive** - Agent asks questions, user chooses
- **Be configurable** - Simple config changes create different behaviors
- **Be fun** - Movie themes make it engaging and memorable
- **Be clear** - Visual output shows exactly what's happening
- **Be practical** - Same pattern works for real-world scenarios (formal/casual modes, different workflows, etc.)
---
**This is Tier 4: The Movie Personality Skill** š¬
Choose your character, watch the magic happen, and see how easy it is to customize! š
This skill brings movie character personalities to interactive automation workflows. Choose a character (Yoda, Tony Stark, or Sherlock Holmes) and the skill runs a themed, visible workflow that matches that persona. Simple configuration lets you change missions instantly for different outcomes.
The skill prompts you to pick a character, then reads a JSON config to determine the mission. It routes execution to the character's workflow script, passes the mission parameter, validates inputs, and prints rich, themed console output showing each phase. You can override the mission on the command line or by editing the config file.
How do I change which mission a character runs?
Edit the personality-config.json mission value for that character or pass --mission on the router command line to override temporarily.
Can I add new characters or missions?
Yes. Add a new character key and mission definitions in the config, then create a matching workflow script that the router can invoke.