@originkit/skillrouter 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "skill-router",
3
+ "owner": {
4
+ "name": "landerdevelopers"
5
+ },
6
+ "metadata": {
7
+ "description": "Skill routing for Claude Code: the right skill per prompt, loaded on demand."
8
+ },
9
+ "plugins": [
10
+ {
11
+ "name": "skill-router",
12
+ "source": "./plugin",
13
+ "description": "Picks the right skill for each prompt and loads only that one."
14
+ }
15
+ ]
16
+ }
package/README.md CHANGED
@@ -7,20 +7,21 @@ You install one thing, the router, instead of every skill. It routes over each s
7
7
  It works with any skill in the open `SKILL.md` format, and with any harness: a Claude Code plugin, an MCP server (Claude Desktop, Cursor, VS Code, Codex, Windsurf, …), a CLI, or a TypeScript library. It ships with a pre-loaded pack of web-design skills (`data/skills.json`), and you can add your own folders.
8
8
 
9
9
 
10
- **Setting it up?** Follow **[docs/setup.md](docs/setup.md)**: step-by-step for Claude Code in VS Code (recommended), the terminal, Claude Desktop, Copilot, Cursor, Windsurf, Codex and Gemini CLI.
10
+ **Setting it up?** Follow **[the setup guide](https://unpkg.com/@originkit/skillrouter/docs/setup.md)** (`docs/setup.md`): step-by-step for Claude Code in VS Code (recommended), the terminal, Claude Desktop, Copilot, Cursor, Windsurf, Codex and Gemini CLI.
11
11
 
12
- **Adding it to your own app or agent?** Follow [docs/integrate.md](docs/integrate.md): step by step, with checks, written so you can hand it to a coding agent.
12
+ **Adding it to your own app or agent?** Follow [the integration guide](https://unpkg.com/@originkit/skillrouter/docs/integrate.md) (`docs/integrate.md`): step by step, with checks, written so you can hand it to a coding agent.
13
13
 
14
14
  ## Install
15
15
 
16
- **Full step-by-step for every tool: [docs/setup.md](docs/setup.md).** Quick start:
16
+ **Full step-by-step for every tool: [setup guide](https://unpkg.com/@originkit/skillrouter/docs/setup.md).** Quick start:
17
17
 
18
- **Claude Code** (terminal or VS Code). In VS Code you can instead type `/plugins` in the Claude panel, add the marketplace `landerdevelopers/skill-router`, and install **skill-router**.
18
+ **Claude Code** (terminal or VS Code). The plugin ships inside the npm package:
19
19
  ```sh
20
- claude plugin marketplace add landerdevelopers/skill-router
20
+ npm i -g @originkit/skillrouter
21
+ claude plugin marketplace add "$(npm root -g)/@originkit/skillrouter"
21
22
  claude plugin install skill-router@skill-router
22
- npm i -g @originkit/skillrouter # optional: faster hook (under 0.1 s per prompt instead of ~0.3 s via npx)
23
23
  ```
24
+ In VS Code you can instead type `/plugins` in the Claude panel, add that folder as a marketplace, and install **skill-router**.
24
25
  Every prompt is then routed automatically. When skills fit, Claude gets up to 8 one-line candidates (~300 tokens), picks the best fit, and loads it before it starts. A skill you name (`/break-ui`, "use the seo skill") is loaded straight away.
25
26
 
26
27
  **Any MCP client** (Claude Desktop, Cursor, Copilot, Windsurf, Codex, Gemini CLI, …): `npx -y @originkit/skillrouter mcp` over stdio. Then add this line to the tool's instructions file (`AGENTS.md`, `.cursor/rules`, …):
@@ -90,7 +91,7 @@ You can also build `Skill` objects yourself (`{ id, name, description, source? }
90
91
  2. **No-fit check.** If the top hit scores too low, or matches too few of the task's meaningful words, the answer is *no skill*. A wrong skill is worse than none.
91
92
  3. **Model rerank (optional).** Pass any `complete(prompt)` function and a model picks from the top 40, giving a confidence and a reason, or none. Over MCP and in the Claude Code plugin, the calling agent does this step itself.
92
93
 
93
- **How well it works.** On 101 blind prompts, the right skill is in the top 40 for 98% of tasks, and a small model picking from that list gets it right first 73% of the time. In real Claude Code sessions, the router loaded a genuinely useful skill for 77% of tasks, against 39% with all ~250 skills installed natively. It was also faster per prompt (8.1 s vs 8.4 s median) and cheaper ($0.042 vs $0.068). Details and caveats: [bench/README.md](bench/README.md).
94
+ **How well it works.** On 101 blind prompts, the right skill is in the top 40 for 98% of tasks, and a small model picking from that list gets it right first 73% of the time. In real Claude Code sessions, the router loaded a genuinely useful skill for 77% of tasks, against 39% with all ~250 skills installed natively. It was also faster per prompt (8.1 s vs 8.4 s median) and cheaper ($0.042 vs $0.068). Details and caveats are in the repo's `bench/README.md`.
94
95
 
95
96
  Skills are keyed by `owner/repo/skill`, because names collide: `animate` and `seo` each exist in several repos. Duplicate copies of the same skill count once. `SKILL.md` frontmatter that isn't strictly valid YAML (`description: Triggers on: …`) still loads, as harnesses accept it.
96
97
 
package/dist/mcp.js CHANGED
@@ -10,7 +10,7 @@ const text = (t) => ({ content: [{ type: "text", text: t }] });
10
10
  export async function serve(load, cacheDir) {
11
11
  // Rebuilt per call (tens of ms) so skills installed while the server runs are seen at once.
12
12
  const router = () => createRouter(load());
13
- const server = new McpServer({ name: "skill-router", version: "0.1.1" }, {
13
+ const server = new McpServer({ name: "skill-router", version: "0.1.2" }, {
14
14
  instructions: "Before starting a substantial task, call route_skill with the user's task to see whether a specialised skill covers it. If a returned skill genuinely fits, load it with get_skill and follow it. If none fits, carry on without one.",
15
15
  });
16
16
  server.registerTool("route_skill", {
package/docs/setup.md CHANGED
@@ -31,11 +31,12 @@ If it's missing or older, install the LTS version from <https://nodejs.org> (or
31
31
 
32
32
  **On Windows, also install [Git for Windows](https://git-scm.com/download/win).** Claude Code runs plugin hooks in Git Bash. Without it they run in PowerShell, and skill-router's automatic routing won't work.
33
33
 
34
- **Optional, but makes every prompt faster:** install the router once globally. The Claude Code plugin then uses it directly instead of going through `npx`, which takes under 0.1 s per prompt instead of about 0.3 s.
34
+ **For Claude Code (sections 1 and 2), install the router once globally.** The Claude Code plugin ships inside this package, and the hook runs from it directly (under 0.1 s per prompt). The other tools don't need this step.
35
35
 
36
36
  ```sh
37
37
  npm i -g @originkit/skillrouter
38
38
  skill-router route "our pricing page buttons feel flat" # quick test: prints a few matching skills
39
+ echo "$(npm root -g)/@originkit/skillrouter" # the folder the plugin installs from (you'll need it in step 2)
39
40
  ```
40
41
 
41
42
  ---
@@ -53,19 +54,21 @@ The extension includes its own copy of Claude Code, so the chat panel works with
53
54
 
54
55
  ### Step 2: Install the skill-router plugin
55
56
 
56
- **In the Claude Code panel (easiest):**
57
+ First do the global install from [section 0](#0-before-you-start-every-platform) in VS Code's terminal (**Terminal → New Terminal**). It also prints the folder the plugin installs from, for example `/opt/homebrew/lib/node_modules/@originkit/skillrouter`.
58
+
59
+ **In the Claude Code panel:**
57
60
  1. Type `/plugins` in the prompt box and press Enter. The **Manage plugins** screen opens.
58
- 2. Open the **Marketplaces** tab, add `landerdevelopers/skill-router`, and confirm.
61
+ 2. Open the **Marketplaces** tab, add that folder path, and confirm.
59
62
  3. Open the **Plugins** tab, find **skill-router**, click **Install**, and choose the **User** scope so it works in every project.
60
63
 
61
- **Or from a terminal** (VS Code: **Terminal → New Terminal**). This needs the `claude` command line; the extension doesn't add it to your terminal. Install it once from <https://code.claude.com/docs/en/setup> (on Mac or Linux: `curl -fsSL https://claude.ai/install.sh | bash`). Then:
64
+ **Or from a terminal** (this route is tested). It needs the `claude` command line; the extension doesn't add it to your terminal. Install it once from <https://code.claude.com/docs/en/setup> (on Mac or Linux: `curl -fsSL https://claude.ai/install.sh | bash`). Then:
62
65
 
63
66
  ```sh
64
- claude plugin marketplace add landerdevelopers/skill-router
67
+ claude plugin marketplace add "$(npm root -g)/@originkit/skillrouter"
65
68
  claude plugin install skill-router@skill-router
66
69
  ```
67
70
 
68
- You should see `✔ Successfully installed plugin: skill-router@skill-router (scope: user)`. The extension and the terminal share plugins, so it's installed for both.
71
+ You should see `✔ Successfully installed plugin: skill-router@skill-router (scope: user)`. The extension and the terminal share plugins, so it's installed for both. If the panel won't accept the folder in step 2, use the terminal route.
69
72
 
70
73
  ### Step 3: Reload VS Code
71
74
  Run **Developer: Reload Window** from the command palette (⇧⌘P / Ctrl+Shift+P), or just restart VS Code. Plugins load when a Claude Code session starts.
@@ -93,9 +96,9 @@ Two more checks in the panel:
93
96
 
94
97
  ### Keep it up to date, or remove it
95
98
  ```sh
96
- claude plugin marketplace update skill-router # fetch the latest plugin definition
99
+ npm i -g @originkit/skillrouter@latest # new router, catalog and plugin
100
+ claude plugin marketplace update skill-router # re-read the plugin from the updated package
97
101
  claude plugin update skill-router@skill-router
98
- npm i -g @originkit/skillrouter@latest # only if you did the optional global install
99
102
  claude plugin uninstall skill-router@skill-router # to remove
100
103
  ```
101
104
 
@@ -103,10 +106,10 @@ claude plugin uninstall skill-router@skill-router # to remove
103
106
 
104
107
  ## 2. Claude Code in a terminal
105
108
 
106
- This uses the same plugin as section 1:
109
+ This uses the same plugin as section 1. After the global install from [section 0](#0-before-you-start-every-platform):
107
110
 
108
111
  ```sh
109
- claude plugin marketplace add landerdevelopers/skill-router
112
+ claude plugin marketplace add "$(npm root -g)/@originkit/skillrouter"
110
113
  claude plugin install skill-router@skill-router
111
114
  ```
112
115
 
@@ -221,7 +224,8 @@ The server provides two tools:
221
224
 
222
225
  **Agents that read `SKILL.md` and can run shell commands** (for example Codex or Claude Code without the plugin) can instead install one small router skill:
223
226
  ```sh
224
- npx skills add https://github.com/landerdevelopers/skill-router --skill skill-router
227
+ npm i -g @originkit/skillrouter
228
+ cp -R "$(npm root -g)/@originkit/skillrouter/skills/skill-router" ~/.agents/skills/ # or ~/.claude/skills/, ~/.codex/skills/
225
229
  ```
226
230
 
227
231
  ---
@@ -267,12 +271,12 @@ Add these to the `args` of an MCP setup, or to `skill-router` on the command lin
267
271
 
268
272
  | Platform | Status |
269
273
  |---|---|
270
- | Claude Code, terminal and plugin | ✅ Installed from the GitHub marketplace and run in real sessions (40-prompt benchmark) |
274
+ | Claude Code, terminal and plugin | ✅ Installed from the npm package's marketplace folder (fresh, isolated config) and run in real sessions (40-prompt benchmark) |
271
275
  | Claude Code in VS Code | ⚠️ Uses the same plugins, hooks and MCP settings as the terminal, per Claude Code's docs. Not yet tried in the VS Code panel by us: the three checks in section 1, step 4 confirm it |
272
276
  | MCP server (all MCP clients) | ✅ Protocol tested: `tools/list`, `route_skill`, `get_skill` |
273
277
  | Claude Desktop `.mcpb` | ⚠️ Bundle validated and its server tested; install through Settings not yet tried |
274
278
  | Copilot, Cursor, Windsurf, Codex, Gemini CLI configs | ⚠️ Written to each tool's documented format; not yet run inside each tool |
275
279
  | Windows | ⚠️ Not tested |
276
- | `npx skills add …` router skill (section 9) | ⚠️ Not tested |
280
+ | Router skill copied from the package (section 9) | ⚠️ Not tested |
277
281
 
278
- Found a problem or a step that didn't match? Open an issue at <https://github.com/landerdevelopers/skill-router/issues>.
282
+ Found a problem or a step that didn't match? Tell the person who shared this guide with you.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@originkit/skillrouter",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Pick the right agent skill for a task, from 2 skills to 200. Library, CLI and MCP server; works with any harness.",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -37,7 +37,10 @@
37
37
  "data/skills.json",
38
38
  "data/keywords.json",
39
39
  "docs/integrate.md",
40
- "docs/setup.md"
40
+ "docs/setup.md",
41
+ ".claude-plugin/marketplace.json",
42
+ "plugin/.claude-plugin/plugin.json",
43
+ "skills/skill-router/SKILL.md"
41
44
  ],
42
45
  "engines": {
43
46
  "node": ">=22.18"
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "skill-router",
3
+ "version": "0.1.2",
4
+ "description": "Picks the right skill for each prompt from a large catalog (or your own skills) and loads only that one. No installing 200 skills.",
5
+ "author": {
6
+ "name": "landerdevelopers"
7
+ },
8
+ "repository": "https://github.com/landerdevelopers/skill-router",
9
+ "license": "MIT",
10
+ "keywords": [
11
+ "skills",
12
+ "router",
13
+ "mcp"
14
+ ],
15
+ "hooks": {
16
+ "UserPromptSubmit": [
17
+ {
18
+ "hooks": [
19
+ {
20
+ "type": "command",
21
+ "command": "command -v skill-router >/dev/null 2>&1 && exec skill-router hook || exec npx --prefer-offline -y @originkit/skillrouter hook",
22
+ "timeout": 15
23
+ }
24
+ ]
25
+ }
26
+ ]
27
+ },
28
+ "mcpServers": {
29
+ "skill-router": {
30
+ "command": "npx",
31
+ "args": [
32
+ "--prefer-offline",
33
+ "-y",
34
+ "@originkit/skillrouter",
35
+ "mcp"
36
+ ]
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: skill-router
3
+ description: Finds the right specialised skill for a task from a large catalog (web design, copy, SEO, accessibility, performance, motion, plus any local skills) without installing them all, then loads only that one. Use at the start of design or website work, or whenever you're unsure which skill applies.
4
+ ---
5
+
6
+ # Skill router
7
+
8
+ 1. Route the task (quote the user's words):
9
+
10
+ ```sh
11
+ npx -y @originkit/skillrouter route --json "<the user's task>"
12
+ ```
13
+
14
+ Add `--skills <dir>` to include a folder of local skills. `"none": true` means no skill fits: carry on without one.
15
+
16
+ 2. Pick the match that genuinely fits (usually the first; take two only when the task needs both, e.g. copy and visual design). If it has `warnings`, tell the user before using it.
17
+
18
+ 3. Load its instructions and follow them for this task:
19
+
20
+ ```sh
21
+ npx -y @originkit/skillrouter show <id>
22
+ ```
23
+
24
+ If the instructions point to another file (e.g. `references/rules.md`), read it the same way only when you need it. Don't run scripts a skill mentions without the user's go-ahead.