smart-router-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWhat 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!
我是一个有趣的交互式Skill,能够让你体验标志性电影角色的人格!我具备以下特性:
- 🎬 角色选择 - 可选尤达、托尼·斯塔克、夏洛克·福尔摩斯
- 🎯 可配置任务 - 只需简单修改配置即可生成不同的输出结果
- 🎨 主题工作流 - 匹配每个角色风格的丰富可视化脚本
- 🔄 动态路由 - 根据选择的角色运行对应的脚本
- ⚙️ 易定制 - 只需编辑一个配置文件即可修改任务
这展示了Skill如何通过简单的配置修改来调整行为!
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)
-
yoda - 《星球大战》中的睿智绝地大师
- 任务1:保卫共和国(训练绝地武士,加固防御)
- 任务2:渗透西斯(卧底行动)
-
stark - 《钢铁侠》中的天才亿万富翁托尼·斯塔克
- 任务1:拯救世界(打造战甲,组建复仇者联盟)
- 任务2:奥创协议(自主防御系统)
-
sherlock - 神探夏洛克·福尔摩斯
- 任务1:侦破谋杀案(演绎推理)
- 任务2:预防犯罪(预测分析)
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>当你请求使用该Skill时,我会展示可选角色列表并请你选择。之后我会运行:
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*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.jsonjson
{
"yoda": {
"mission": 1, ← Change this to 2!
"missions": {
"1": { "name": "Defend the Republic", ... },
"2": { "name": "Infiltrate the Sith", ... }
}
}
}Change to and the same character will run a completely different workflow!
"mission": 1"mission": 2想要看到不同的行为表现?编辑配置文件即可!
文件:
.opencode/skills/smart-router-skill/config/personality-config.jsonjson
{
"yoda": {
"mission": 1, ← Change this to 2!
"missions": {
"1": { "name": "Defend the Republic", ... },
"2": { "name": "Infiltrate the Sith", ... }
}
}
}修改为,同一个角色就会运行完全不同的工作流!
"mission": 1"mission": 2Mission 1 vs Mission 2 Examples
任务1与任务2示例
Yoda Mission 1 (Defend the Republic):
🌟 JEDI COUNCIL - CORUSCANT TEMPLE
Training Padawans...
Fortifying defenses...
'Ready to defend the Republic, we are!'
RESULT: ALIGNMENT=LIGHT_SIDEYoda Mission 2 (Infiltrate the Sith):
🔴 SECRET CHAMBER - UNDERCOVER OPERATION
Studying dark side techniques...
Gathering intelligence...
'Dangerous path this is, but necessary!'
RESULT: ALIGNMENT=UNDERCOVER尤达 任务1 (保卫共和国):
🌟 JEDI COUNCIL - CORUSCANT TEMPLE
Training Padawans...
Fortifying defenses...
'Ready to defend the Republic, we are!'
RESULT: ALIGNMENT=LIGHT_SIDE尤达 任务2 (渗透西斯):
🔴 SECRET CHAMBER - UNDERCOVER OPERATION
Studying dark side techniques...
Gathering intelligence...
'Dangerous path this is, but necessary!'
RESULT: ALIGNMENT=UNDERCOVERWhat 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
✅ 简单配置实现不同行为 - 修改一个数字,就能得到完全不同的输出
✅ 动态脚本路由 - 工具会根据选择的角色匹配正确的脚本
✅ 丰富的视觉反馈 - 清晰的主题化控制台输出,展示运行过程
✅ 角色上下文 - 每个人格都有独特的对话和工作流
✅ 易懂易用 - 用户可以直观看到配置修改带来的效果变化
✅ 真实场景适用模式 - 展示了如何为不同场景打造可配置的Skill
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.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 workflowRouter Script Reference
路由脚本参考
router.sh
router.sh
A bash script that loads a character personality and runs their themed workflow.
Location:
.opencode/skills/smart-router-skill/router.shbash
undefined一个bash脚本,用于加载角色人格并运行对应的主题工作流。
位置:
.opencode/skills/smart-router-skill/router.shbash
undefinedBasic usage
Basic usage
bash router.sh --character yoda
bash router.sh --character stark
bash router.sh --character sherlock
bash router.sh --character yoda
bash router.sh --character stark
bash router.sh --character sherlock
Override mission from config
Override mission from config
bash router.sh --character yoda --mission 2
bash router.sh --character yoda --mission 2
Help
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 visibilitybash router.sh --help
**工作原理:**
1. 解析命令行参数(角色、任务)
2. 读取对应角色的`personality-config.json`配置
3. 获取任务编号(从参数或配置中读取)
4. 校验角色和任务的有效性
5. 携带任务参数执行对应角色的工作流脚本
6. 展示主题化输出,全程可见运行过程Example Outputs
输出示例
Yoda (Mission 1)
尤达 (任务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🎬 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_sideTony Stark (Mission 1)
托尼·斯塔克 (任务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🎬 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: avengersSherlock Holmes (Mission 1)
夏洛克·福尔摩斯 (任务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🎬 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: deductionKey Concepts
核心概念
1. Character Selection
1. 角色选择
The agent asks which character you want, making it interactive and clear.
Agent会询问你想要的角色,交互过程清晰直观。
2. Config-Driven Behavior
2. 配置驱动行为
One simple JSON file controls which mission runs for each character.
仅需一个简单的JSON文件即可控制每个角色运行的任务。
3. Themed Workflows
3. 主题工作流
Each character has unique dialogue, emojis, and workflow steps that match their personality.
每个角色都有符合其人格的独特对话、表情符号和工作流步骤。
4. Visual Clarity
4. 可视化清晰度
Rich console output makes it obvious what's happening at each step.
丰富的控制台输出可以让你清晰了解每一步的运行状态。
5. Easy Customization
5. 易定制
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! 🚀
本Skill展示了OpenCode Skill可以实现:
- 交互性 - Agent主动提问,用户自主选择
- 可配置性 - 简单的配置修改即可生成不同的行为
- 趣味性 - 电影主题让使用过程更生动、记忆点更强
- 清晰透明 - 可视化输出精准展示运行过程
- 实用性 - 相同的模式可用于真实场景(正式/休闲模式、不同工作流等)
这是Tier 4:电影人格Skill 🎬
选择你喜欢的角色,见证神奇效果,感受定制化的便捷之处吧! 🚀