skill-library-mcp 1.3.4 → 2.0.0

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
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume|clear|compact",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "'${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd' session-start",
10
+ "async": false
11
+ }
12
+ ]
13
+ }
14
+ ]
15
+ }
16
+ }
@@ -0,0 +1,36 @@
1
+ : << 'CMDBLOCK'
2
+ @echo off
3
+ REM Cross-platform polyglot wrapper for hook scripts.
4
+ REM On Windows: cmd.exe runs the batch portion, which finds and calls bash.
5
+ REM On Unix: the shell interprets this as a script (: is a no-op in bash).
6
+
7
+ if "%~1"=="" (
8
+ echo run-hook.cmd: missing script name >&2
9
+ exit /b 1
10
+ )
11
+
12
+ set "HOOK_DIR=%~dp0"
13
+
14
+ if exist "C:\Program Files\Git\bin\bash.exe" (
15
+ "C:\Program Files\Git\bin\bash.exe" "%HOOK_DIR%%~1" %2 %3 %4 %5 %6 %7 %8 %9
16
+ exit /b %ERRORLEVEL%
17
+ )
18
+ if exist "C:\Program Files (x86)\Git\bin\bash.exe" (
19
+ "C:\Program Files (x86)\Git\bin\bash.exe" "%HOOK_DIR%%~1" %2 %3 %4 %5 %6 %7 %8 %9
20
+ exit /b %ERRORLEVEL%
21
+ )
22
+
23
+ where bash >nul 2>nul
24
+ if %ERRORLEVEL% equ 0 (
25
+ bash "%HOOK_DIR%%~1" %2 %3 %4 %5 %6 %7 %8 %9
26
+ exit /b %ERRORLEVEL%
27
+ )
28
+
29
+ exit /b 0
30
+ CMDBLOCK
31
+
32
+ # Unix: run the named script directly
33
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
34
+ SCRIPT_NAME="$1"
35
+ shift
36
+ exec bash "${SCRIPT_DIR}/${SCRIPT_NAME}" "$@"
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env bash
2
+ # SessionStart hook for skill-library plugin
3
+
4
+ set -euo pipefail
5
+
6
+ escape_for_json() {
7
+ local s="$1"
8
+ s="${s//\\/\\\\}"
9
+ s="${s//\"/\\\"}"
10
+ s="${s//$'\n'/\\n}"
11
+ s="${s//$'\r'/\\r}"
12
+ s="${s//$'\t'/\\t}"
13
+ printf '%s' "$s"
14
+ }
15
+
16
+ read -r -d '' CONTEXT << 'SKILLEOF' || true
17
+ You have access to a skill library with 15,000+ skills via MCP tools.
18
+
19
+ **IMPORTANT: Before responding to any task, check if a relevant skill exists.**
20
+
21
+ Use these MCP tools from the skill-library server:
22
+ - `search_skill({ query: "..." })` — Search for skills by keyword. Use natural language.
23
+ - `load_skill({ name: "...", include_resources: true })` — Load the full skill content.
24
+ - `list_categories()` — Browse all 13 skill categories.
25
+
26
+ **When to search:**
27
+ - Starting any new task (even simple ones — a skill may have best practices)
28
+ - Working with a specific framework, library, or tool
29
+ - Debugging, testing, deploying, or architecting
30
+ - Any domain you're not 100% certain about
31
+
32
+ **How to use:**
33
+ 1. Search with a short query related to your task
34
+ 2. If results look relevant, load the top skill
35
+ 3. Follow the skill's guidance in your response
36
+
37
+ Don't skip this step. A 2-second search can prevent minutes of suboptimal work.
38
+ SKILLEOF
39
+
40
+ session_context="<IMPORTANT>\nYou have a skill library.\n\n$(escape_for_json "$CONTEXT")\n</IMPORTANT>"
41
+
42
+ cat <<EOF
43
+ {
44
+ "additional_context": "${session_context}",
45
+ "hookSpecificOutput": {
46
+ "hookEventName": "SessionStart",
47
+ "additionalContext": "${session_context}"
48
+ }
49
+ }
50
+ EOF
51
+
52
+ exit 0
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "skill-library-mcp",
3
3
  "version": "1.3.3",
4
- "description": "On-demand access to 14,500+ curated skills for AI coding assistants via MCP",
4
+ "description": "On-demand access to 15,000+ curated skills for AI coding assistants via MCP",
5
5
  "owner": {
6
6
  "name": "modbender"
7
7
  },
8
8
  "plugins": [
9
9
  {
10
10
  "name": "skill-library",
11
- "description": "On-demand access to 14,500+ curated skills for AI coding assistants. Search, browse categories, and load skills without polluting your context window.",
11
+ "description": "On-demand access to 15,000+ curated skills for AI coding assistants. Search, browse categories, and load skills without polluting your context window.",
12
12
  "source": "./",
13
13
  "category": "productivity",
14
14
  "keywords": ["skills", "mcp", "skill-library", "claude-code", "ai"]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-library",
3
- "description": "On-demand access to 14,500+ curated skills for AI coding assistants. Search, browse categories, and load skills without polluting your context window.",
3
+ "description": "On-demand access to 15,000+ curated skills for AI coding assistants. Search, browse categories, and load skills without polluting your context window.",
4
4
  "version": "1.3.3",
5
5
  "author": {
6
6
  "name": "modbender"
package/README.md CHANGED
@@ -1,16 +1,16 @@
1
1
  # Skill Library MCP
2
2
 
3
- **14,500+ ready-to-use skills for AI coding assistants, served on demand via MCP.**
3
+ **15,000+ ready-to-use skills for AI coding assistants, served on demand via MCP.**
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/skill-library-mcp)](https://www.npmjs.com/package/skill-library-mcp)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
7
  [![Node.js](https://img.shields.io/badge/node-%3E%3D22-brightgreen)](https://nodejs.org)
8
8
 
9
- An MCP server that provides on-demand skill loading for AI coding assistants. Instead of stuffing your system prompt with every skill you might need, this server indexes 14,500+ skills and serves only the ones relevant to your current task — keeping context windows lean and responses focused.
9
+ An MCP server that provides on-demand skill loading for AI coding assistants. Instead of stuffing your system prompt with every skill you might need, this server indexes 15,000+ skills and serves only the ones relevant to your current task — keeping context windows lean and responses focused.
10
10
 
11
11
  ## Why?
12
12
 
13
- - **14,500+ skills** covering frontend, backend, DevOps, security, testing, databases, AI/ML, automation, and more
13
+ - **15,000+ skills** covering frontend, backend, DevOps, security, testing, databases, AI/ML, automation, and more
14
14
  - **On-demand loading** — skills are fetched only when needed, not crammed into every conversation
15
15
  - **IDF-weighted search** — finds the right skill even from natural language queries like "help me debug a memory leak"
16
16
  - **Browse by category** — 13 categories to discover skills you didn't know existed
@@ -22,61 +22,22 @@ An MCP server that provides on-demand skill loading for AI coding assistants. In
22
22
 
23
23
  ### Claude Code Plugin (Recommended)
24
24
 
25
- **CLI:**
26
-
27
- First, add the repository as a marketplace source, then install the plugin:
25
+ Add the marketplace source, then install the plugin:
28
26
 
29
27
  ```bash
30
- claude plugin marketplace add https://github.com/modbender/skill-library-mcp.git
31
- claude plugin install skill-library
28
+ claude plugin marketplace add https://github.com/modbender/skill-library-mcp.git --scope user
29
+ claude plugin install skill-library --scope user
32
30
  ```
33
31
 
34
32
  The MCP server starts automatically when Claude Code launches. No manual configuration needed.
35
33
 
36
- To install for a specific scope:
37
-
38
- ```bash
39
- claude plugin install skill-library --scope user # Default, available everywhere
40
- claude plugin install skill-library --scope project # Project-only, shared with collaborators
41
- ```
42
-
43
- **Desktop UI:**
44
-
45
- 1. Open Claude Desktop settings
46
- 2. Go to **Plugins** and click **Add marketplace by URL**
47
- 3. Enter the repository URL:
48
- ```
49
- https://github.com/modbender/skill-library-mcp.git
50
- ```
51
- 4. Install **skill-library** from the marketplace list
52
-
53
- **Local development:**
34
+ ### Claude Code (MCP Server)
54
35
 
55
36
  ```bash
56
- claude --plugin-dir /path/to/skill-library-mcp
37
+ claude mcp add skill-library --scope user -- npx -y skill-library-mcp
57
38
  ```
58
39
 
59
- ### MCP Server (Manual)
60
-
61
- For other tools or manual Claude Code setup, add to your MCP configuration:
62
-
63
- <details>
64
- <summary><strong>Claude Code (CLI)</strong></summary>
65
-
66
- Add to `~/.claude/settings.json`:
67
-
68
- ```json
69
- {
70
- "mcpServers": {
71
- "skill-library": {
72
- "command": "npx",
73
- "args": ["-y", "skill-library-mcp"]
74
- }
75
- }
76
- }
77
- ```
78
-
79
- </details>
40
+ ### MCP Server (Other Tools)
80
41
 
81
42
  <details>
82
43
  <summary><strong>Claude Desktop</strong></summary>
@@ -150,13 +111,6 @@ Add to `.vscode/mcp.json`:
150
111
 
151
112
  </details>
152
113
 
153
- <details>
154
- <summary><strong>Antigravity</strong></summary>
155
-
156
- See [Antigravity docs](https://docs.antigravity.dev) for MCP server configuration format.
157
-
158
- </details>
159
-
160
114
  <details>
161
115
  <summary><strong>Manual installation</strong></summary>
162
116
 
@@ -210,7 +164,7 @@ list_categories()
210
164
 
211
165
  ## Skill Categories
212
166
 
213
- The library includes 14,500+ skills across 13 categories:
167
+ The library includes 15,000+ skills across 13 categories:
214
168
 
215
169
  | Category | Examples |
216
170
  |----------|----------|
@@ -249,7 +203,7 @@ Skills can optionally include a `resources/` directory with additional `.md` fil
249
203
 
250
204
  Contributions are welcome! To add a new skill:
251
205
 
252
- 1. Create a directory under `skills/` with your skill name
206
+ 1. Create a directory under `data/` with your skill name
253
207
  2. Add a `SKILL.md` file with YAML frontmatter (`name`, `description`)
254
208
  3. Run `pnpm dedup` to check for duplicates
255
209
  4. Submit a PR
@@ -262,7 +216,7 @@ pnpm test # Run tests
262
216
  pnpm build # Build to dist/
263
217
  pnpm dev # Run server locally
264
218
  pnpm dedup # Check for duplicate skills
265
- pnpm validate-skills # Validate skills/ directory structure
219
+ pnpm validate-skills # Validate data/ directory structure
266
220
  pnpm fix-skills # Fix broken skills (dry run by default)
267
221
  pnpm clean-skills # Remove invalid skill dirs (dry run by default)
268
222
  make ci # Run test + validate + build
package/dist/index.js CHANGED
@@ -201,26 +201,38 @@ function searchSkills(index, query, limit = 20) {
201
201
  for (const entry of index.entries) {
202
202
  let score = 0;
203
203
  let matchedTokens = 0;
204
+ const nameLower = entry.frontmatter.name.toLowerCase();
205
+ const descLower = entry.frontmatter.description.toLowerCase();
204
206
  for (const qt of queryTokens) {
205
207
  const idfWeight = index.idfScores.get(qt) ?? defaultIdf;
206
208
  let bestTokenScore = 0;
207
209
  for (const st of entry.searchTokens) {
208
210
  if (st === qt) {
209
211
  bestTokenScore = Math.max(bestTokenScore, idfWeight);
210
- } else if (qt.length >= 2 && st.length >= 2 && (st.includes(qt) || qt.includes(st))) {
211
- bestTokenScore = Math.max(bestTokenScore, idfWeight * 0.5);
212
+ } else if (qt.length >= 3 && st.length >= 3) {
213
+ if (st.includes(qt)) {
214
+ const overlap = qt.length / st.length;
215
+ bestTokenScore = Math.max(bestTokenScore, idfWeight * overlap * 0.5);
216
+ } else if (qt.includes(st)) {
217
+ const overlap = st.length / qt.length;
218
+ bestTokenScore = Math.max(bestTokenScore, idfWeight * overlap * 0.5);
219
+ }
212
220
  }
213
221
  }
214
222
  if (bestTokenScore > 0) matchedTokens++;
215
223
  score += bestTokenScore;
216
224
  }
217
- if (entry.frontmatter.name.toLowerCase().includes(queryLower)) {
218
- score += 2;
225
+ if (nameLower.includes(queryLower)) {
226
+ score += 3;
219
227
  }
220
- if (entry.frontmatter.description.toLowerCase().includes(queryLower)) {
221
- score += 1;
228
+ for (const qt of queryTokens) {
229
+ if (nameLower.includes(qt)) score += 1;
230
+ }
231
+ if (descLower.includes(queryLower)) {
232
+ score += 1.5;
222
233
  }
223
- score = score / Math.max(matchedTokens, 1);
234
+ const coverage = matchedTokens / queryTokens.length;
235
+ score *= 1 + coverage;
224
236
  if (score >= 0.5) {
225
237
  results.push({
226
238
  name: entry.frontmatter.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-library-mcp",
3
- "version": "1.3.4",
3
+ "version": "2.0.0",
4
4
  "description": "MCP server providing on-demand skill loading for AI coding assistants",
5
5
  "license": "MIT",
6
6
  "type": "module",