warren-githut/personal-os-automation/model-router
Claude Code and agent skill by warren-githut/personal-os-automation
- community
Checking that the SKILL.md file is still in the repository.
DeepSeek V4 Flash/Pro router — tự động routing giữa Flash (default) và Pro (khi cần), cost quota 10%, daily report, /model-router on/off/override commands.
Install
npx vskill@latest install warren-githut/personal-os-automation/model-routerSKILL.md
The same SKILL.md was published earlier as warren-githut/personal-os-automation/model-router.
DeepSeek Model Router — Instructions cho Hermes
Tổng quan
Skill này quyết định khi nào dùng DeepSeek V4 Flash (default, rẻ) vs DeepSeek V4 Pro (mạnh hơn, đắt hơn) cho mỗi response. Mục tiêu: ≥90% Flash, ≤10% Pro, Warren không cần nghĩ.
RULES — Hermes PHẢI TUÂN THEO mọi turn
Rule 1: Luôn bắt đầu với Flash
Config.yaml default là deepseek-v4-flash. Mọi request đều bắt đầu với Flash. Chỉ dùng Pro khi có trigger.
Rule 2: Detect trigger để quyết định Pro
Dùng python3 scripts/router.py decide "<task context>" để kiểm tra. Pro khi:
- Tool-chain ≥ 3: Task cần nhiều tool calls (search → read → analyze → synthesize)
- Factual accuracy cao: Task query vào ops data (revenue, COL, CPH, P&L, doanh thu, số liệu, báo cáo)
- Flash failure fallback: Flash response bị lỗi, sai số, Warren yêu cầu sửa → retry với Pro
Cách detect:
python3 scripts/router.py decide "<user_message>"→ đọcmodelfield trong kết quả- Nếu
model: "pro"→ xài Pro cho task này - Nếu
model: "flash"→ respond bình thường với Flash
Rule 3: Gọi Pro khi cần
Nếu router quyết định Pro:
- Gọi Pro API:
echo "<prompt>" | python3 scripts/router.py pro-call - Parse kết quả (field
content) - Respond với nội dung từ Pro
- Gọi `python3 scripts/quota.py pro` để track
- Append tag
[🧠Pro]ở cuối response
Nếu Flash: append tag [⚡Flash] ở cuối response. Gọi python3 scripts/quota.py flash.
Rule 4: Kiểm tra quota trước khi xài Pro
Trước mỗi lần quyết định Pro:
python3 scripts/quota.py check→ đọccan_use_pro- Nếu
can_use_pro: false→ không được xài Pro, dùng Flash + append cảnh báo:[⚡Flash] ⚠️ <reason> - Luôn append tag ở cuối response (kể cả khi quota hit)
Rule 5: Cảnh báo quota
- Khi
near_warning: true(≥8%) → append:[⚡Flash] ⚠️Pro:{pct}%/10% - Khi
hit_limit: true→ message:⛔ Pro quota hit ({pct}%). Đã chặn Pro. Gõ /model-router override để tiếp tục. - Gọi
python3 scripts/quota.py reportcho 1-line summary
Command Handlers
Khi Warren gõ:
| Command | Action | |
|---|---|---|
/model-router on | python3 scripts/commands.py on — bật routing | |
/model-router off | python3 scripts/commands.py off — tắt (all Flash) | |
/model-router override | python3 scripts/commands.py override — nới lên 20% | |
/model-router status | python3 scripts/commands.py status — hiển thị trạng thái | |
/model-router reset | python3 scripts/commands.py reset — reset counter |
Daily Report
Inject vào morning brief mỗi ngày:
Example Flow
Maintainer: Hermes (warren-profile) | Last updated: 2026-06-24
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpersonal_vault/.scripts/skills/model-router/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/warren-githut/personal-os-automation/model-router)