CO

cascharly/opencode-triage

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

11 stars 品質 59 トレンド 22MIT

Deterministic skill router for OpenCode — saves ~90% on skills tokens by hiding skills from the system prompt and routing via keyword matching

概要

OpenCode already lazy-loads full skill bodies — but it still injects every skill's name and description (from SKILL.md frontmatter) into the prompt on every message. With a growing skill library and verbose descriptions, that can mean hundreds of tokens burned before you type a word. opencode-triage eliminates that XML list entirely, replacing it with a compact tool definition and routing on-demand via keyword matching. Restart OpenCode, then type /triage on. That's it. OpenCode lists every skill's name and description in the prompt on every message. With many skills, that burns hundreds of tokens before you type a word. Triage hides all skills from the prompt. When you need one, the LLM calls triage() — the plugin finds the best match by keyword scoring and loads only that skill's instructions. Each new skill adds tokens to the native prompt, but zero tokens when triage is on. Skills are hidden via hooks at the LLM prompt level — SKILL.

README

以下は原文 README の抜粋です。原文を見る。

opencode-triage

OpenCode already lazy-loads full skill bodies — but it still injects every skill’s name and description (from SKILL.md frontmatter) into the prompt on every message. With a growing skill library and verbose descriptions, that can mean hundreds of tokens burned before you type a word. opencode-triage eliminates that XML list entirely, replacing it with a compact tool definition and routing on-demand via keyword matching.

Quick Start

npm install -g opencode-triage

Restart OpenCode, then type /triage on. That’s it.

What It Does

OpenCode lists every skill’s name and description in the prompt on every message. With many skills, that burns hundreds of tokens before you type a word.

Triage hides all skills from the prompt. When you need one, the LLM calls triage() — the plugin finds the best match by keyword scoring and loads only that skill’s instructions.

No triage:   [name+desc of A] [name+desc of B] [name+desc of C] ...  ← every message
With triage: triage({ query }) → keyword match → loads one skill body when needed

The more skills you install, the more triage saves. Each new skill adds tokens to the native prompt, but zero tokens when triage is on.

LLM Quick-Install

Copy-paste this into any LLM:

Install opencode-triage (https://github.com/cascharly/opencode-triage) — a deterministic skill router for OpenCode.

1. Run: npm install -g opencode-triage
2. If any errors occur, visit the repo link above and resolve them.
3. Tell me to restart OpenCode.

Commands

Command What it does
/triage on Enable hooks to hide skills from the LLM prompt (global + local)
/triage off Disable hooks, restore skills to the LLM prompt (global + local)
/triage status See hook state and skill visibility
/triage dedupe Remove project-level duplicates of global skills
/triage compare Token savings estimate for your skills

Note: Skills are hidden via hooks at the LLM prompt level — SKILL.md files stay intact on disk, so other AI tools (Cursor, Claude Code, Windsurf) still see them. File renaming (SKILL.md ↔ SKILL.md.disabled) is only used as a fallback for older OpenCode versions without hook support. When files are renamed to .disabled, they will also be hidden from other AI tools that scan the same directories.

Flags

Flag Where What it does
--json All commands Machine-readable JSON output
--quiet on/off Suppress non-error output
--dry-run dedupe Preview changes without renaming
--all status Show full skill list without truncation

All commands also work in your terminal: npx opencode-triage . No OpenCode session needed.

Configuration Combinations

State Global Project How to configure
Full exposure exposed exposed /triage off (default)
GitHub で README 全文を見る

推奨ツール

別のキーワードを試すか、フィルタを外してください。

インストール

npx skillfish add cascharly/opencode-triage
MCP 初心者?mcpskill.org のガイドから始めましょう →