@skilljack/mcp 0.5.1 → 0.7.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.
- package/README.md +12 -309
- package/package.json +13 -4
- package/skills/skilljack-docs/SKILL.md +431 -0
package/README.md
CHANGED
|
@@ -2,29 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
An MCP server that jacks [Agent Skills](https://agentskills.io) directly into your LLM's brain.
|
|
4
4
|
|
|
5
|
-
> **Recommended:** For best results, use an MCP client that supports `tools/listChanged` notifications (e.g., Claude Code). This enables dynamic skill discovery - when skills are added or modified, the client automatically refreshes its understanding of available skills.
|
|
6
|
-
|
|
7
|
-
## Features
|
|
8
|
-
|
|
9
|
-
- **Dynamic Skill Discovery** - Watches skill directories and automatically refreshes when skills change
|
|
10
|
-
- **Tool List Changed Notifications** - Sends `tools/listChanged` so clients can refresh available skills
|
|
11
|
-
- **Skill Tool** - Load full skill content on demand (progressive disclosure)
|
|
12
|
-
- **MCP Prompts** - Load skills via `/skill` prompt with auto-completion or per-skill prompts
|
|
13
|
-
- **MCP Resources** - Access skills via `skill://` URIs with batch collection support
|
|
14
|
-
- **Resource Subscriptions** - Real-time file watching with `notifications/resources/updated`
|
|
15
|
-
|
|
16
|
-
## Motivation
|
|
17
|
-
|
|
18
|
-
This repo demonstrates a way to approach integrating skills using existing MCP primitives.
|
|
19
|
-
|
|
20
|
-
MCP already has the building blocks:
|
|
21
|
-
- **Tools** for on-demand skill loading (the `skill` tool with dynamically updated descriptions)
|
|
22
|
-
- **Resources** for explicit skill access (`skill://` URIs)
|
|
23
|
-
- **Notifications** for real-time updates (`tools/listChanged`, `resources/updated`)
|
|
24
|
-
- **Prompts** for explicitly invoking skills by name (`/my-server-skill`)
|
|
25
|
-
|
|
26
|
-
This approach provides separation of concerns. Rather than every MCP server needing to embed skill handling, the server acts as a dedicated 'skill gateway'. Server authors can bundle skills alongside their MCP servers without modifying the servers themselves. If MCP registries support robust tool discovery, skill tools become discoverable like any other tool.
|
|
27
|
-
|
|
28
5
|
## Installation
|
|
29
6
|
|
|
30
7
|
```bash
|
|
@@ -48,309 +25,35 @@ npm run build
|
|
|
48
25
|
|
|
49
26
|
## Usage
|
|
50
27
|
|
|
51
|
-
Configure one or more skills directories containing your Agent Skills:
|
|
52
|
-
|
|
53
28
|
```bash
|
|
54
29
|
# Single directory
|
|
55
30
|
skilljack-mcp /path/to/skills
|
|
56
31
|
|
|
57
|
-
# Multiple directories
|
|
32
|
+
# Multiple directories
|
|
58
33
|
skilljack-mcp /path/to/skills /path/to/more/skills
|
|
59
|
-
skilljack-mcp /path/to/skills,/path/to/more/skills
|
|
60
34
|
|
|
61
|
-
# Using environment variable
|
|
35
|
+
# Using environment variable
|
|
62
36
|
SKILLS_DIR=/path/to/skills skilljack-mcp
|
|
63
|
-
SKILLS_DIR=/path/to/skills,/path/to/more/skills skilljack-mcp
|
|
64
|
-
```
|
|
65
37
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
**Windows note**: Use forward slashes in paths when using with MCP Inspector:
|
|
69
|
-
```bash
|
|
70
|
-
skilljack-mcp "C:/Users/you/skills"
|
|
38
|
+
# Static mode (no file watching)
|
|
39
|
+
skilljack-mcp --static /path/to/skills
|
|
71
40
|
```
|
|
72
41
|
|
|
73
|
-
##
|
|
74
|
-
|
|
75
|
-
The server implements the [Agent Skills](https://agentskills.io) progressive disclosure pattern with dynamic updates:
|
|
76
|
-
|
|
77
|
-
1. **At startup**: Discovers skills from configured directories and starts file watchers
|
|
78
|
-
2. **On connection**: Skill tool description includes available skills metadata
|
|
79
|
-
3. **On file change**: Re-discovers skills, updates tool description, sends `tools/listChanged`
|
|
80
|
-
4. **On tool call**: Agent calls `skill` tool to load full SKILL.md content
|
|
81
|
-
5. **As needed**: Agent calls `skill-resource` to load additional files
|
|
82
|
-
|
|
83
|
-
```
|
|
84
|
-
┌─────────────────────────────────────────────────────────┐
|
|
85
|
-
│ Server starts │
|
|
86
|
-
│ • Discovers skills from configured directories │
|
|
87
|
-
│ • Starts watching for SKILL.md changes │
|
|
88
|
-
│ ↓ │
|
|
89
|
-
│ MCP Client connects │
|
|
90
|
-
│ • Skill tool description includes available skills │
|
|
91
|
-
│ • Prompts registered for each skill │
|
|
92
|
-
│ ↓ │
|
|
93
|
-
│ LLM sees skill metadata in tool description │
|
|
94
|
-
│ ↓ │
|
|
95
|
-
│ SKILL.md added/modified/removed │
|
|
96
|
-
│ • Server re-discovers skills │
|
|
97
|
-
│ • Updates skill tool description │
|
|
98
|
-
│ • Updates prompt list (add/remove/modify) │
|
|
99
|
-
│ • Sends tools/listChanged notification │
|
|
100
|
-
│ • Sends prompts/listChanged notification │
|
|
101
|
-
│ • Client refreshes tool and prompt definitions │
|
|
102
|
-
│ ↓ │
|
|
103
|
-
│ User invokes /skill prompt or /skill-name prompt │
|
|
104
|
-
│ OR LLM calls "skill" tool with skill name │
|
|
105
|
-
│ ↓ │
|
|
106
|
-
│ Server returns full SKILL.md content │
|
|
107
|
-
│ ↓ │
|
|
108
|
-
│ LLM calls "skill-resource" for additional files │
|
|
109
|
-
│ • Scripts, snippets, references, assets, etc. │
|
|
110
|
-
└─────────────────────────────────────────────────────────┘
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
## Tools vs Resources vs Prompts
|
|
114
|
-
|
|
115
|
-
This server exposes skills via **tools**, **resources**, and **prompts**:
|
|
116
|
-
|
|
117
|
-
- **Tools** (`skill`, `skill-resource`) - For your agent to use autonomously. The LLM sees available skills in the tool description and calls them as needed.
|
|
118
|
-
- **Prompts** (`/skill`, `/skill-name`) - For explicit user invocation. Use `/skill` with auto-completion or select a skill directly by name.
|
|
119
|
-
- **Resources** (`skill://` URIs) - For manual selection in apps that support it (e.g., Claude Desktop's resource picker). Useful when you want to explicitly attach a skill to the conversation.
|
|
120
|
-
|
|
121
|
-
Most users will rely on tools for automatic skill activation. Prompts provide user-initiated loading with auto-completion. Resources provide an alternative for manual control.
|
|
122
|
-
|
|
123
|
-
## Progressive Disclosure Design
|
|
124
|
-
|
|
125
|
-
This server implements the [Agent Skills progressive disclosure pattern](https://agentskills.io/specification#progressive-disclosure), which structures skills for efficient context usage:
|
|
126
|
-
|
|
127
|
-
| Level | Tokens | What's loaded | When |
|
|
128
|
-
|-------|--------|---------------|------|
|
|
129
|
-
| **Metadata** | ~100 | `name` and `description` | At startup, for all skills |
|
|
130
|
-
| **Instructions** | < 5000 | Full SKILL.md body | When skill is activated |
|
|
131
|
-
| **Resources** | As needed | Files in `scripts/`, `references/`, `assets/` | On demand via `skill-resource` |
|
|
132
|
-
|
|
133
|
-
### How it works
|
|
134
|
-
|
|
135
|
-
1. **Discovery** - Server loads metadata from all skills into the `skill` tool description
|
|
136
|
-
2. **Activation** - When a skill is loaded (via tool, prompt, or resource), only the SKILL.md content is returned
|
|
137
|
-
3. **Execution** - SKILL.md references additional files; agent fetches them with `skill-resource` as needed
|
|
138
|
-
|
|
139
|
-
### Why SKILL.md documents its own resources
|
|
140
|
-
|
|
141
|
-
The server doesn't automatically list all files in a skill directory. Instead, skill authors document available resources directly in their SKILL.md (e.g., "Copy the template from `templates/server.ts`"). This design choice follows the spec because:
|
|
142
|
-
|
|
143
|
-
- **Skill authors know best** - They decide which files are relevant and when to use them
|
|
144
|
-
- **Context efficiency** - Loading everything upfront wastes tokens on files the agent may not need
|
|
145
|
-
- **Natural flow** - SKILL.md guides the agent through resources in a logical order
|
|
146
|
-
|
|
147
|
-
**For skill authors:** Reference files using relative paths from the skill root (e.g., `snippets/tool.ts`, `references/api.md`). Keep your main SKILL.md under 500 lines; move detailed reference material to separate files. See the [Agent Skills specification](https://agentskills.io/specification) for complete authoring guidelines.
|
|
148
|
-
|
|
149
|
-
## Tools
|
|
150
|
-
|
|
151
|
-
### `skill`
|
|
152
|
-
|
|
153
|
-
Load and activate an Agent Skill by name. Returns the full SKILL.md content.
|
|
154
|
-
|
|
155
|
-
**Input:**
|
|
156
|
-
```json
|
|
157
|
-
{
|
|
158
|
-
"name": "skill-name"
|
|
159
|
-
}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**Output:** Full SKILL.md content including frontmatter and instructions.
|
|
163
|
-
|
|
164
|
-
### `skill-resource`
|
|
165
|
-
|
|
166
|
-
Read files within a skill's directory (`scripts/`, `references/`, `assets/`, `snippets/`, etc.).
|
|
167
|
-
|
|
168
|
-
This follows the Agent Skills spec's progressive disclosure pattern - resources are loaded only when needed.
|
|
169
|
-
|
|
170
|
-
**Read a single file:**
|
|
171
|
-
```json
|
|
172
|
-
{
|
|
173
|
-
"skill": "mcp-server-ts",
|
|
174
|
-
"path": "snippets/tools/echo.ts"
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
**Read all files in a directory:**
|
|
179
|
-
```json
|
|
180
|
-
{
|
|
181
|
-
"skill": "algorithmic-art",
|
|
182
|
-
"path": "templates"
|
|
183
|
-
}
|
|
184
|
-
```
|
|
185
|
-
Returns all files in the directory as multiple content items.
|
|
186
|
-
|
|
187
|
-
**List available files** (pass empty path):
|
|
188
|
-
```json
|
|
189
|
-
{
|
|
190
|
-
"skill": "mcp-server-ts",
|
|
191
|
-
"path": ""
|
|
192
|
-
}
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
**Security:** Path traversal is prevented - only files within the skill directory can be accessed.
|
|
196
|
-
|
|
197
|
-
## Prompts
|
|
198
|
-
|
|
199
|
-
Skills can be loaded via MCP [Prompts](https://modelcontextprotocol.io/specification/2025-11-05/server/prompts) for explicit user invocation.
|
|
200
|
-
|
|
201
|
-
### `/skill` Prompt
|
|
202
|
-
|
|
203
|
-
Load a skill by name with auto-completion support.
|
|
204
|
-
|
|
205
|
-
**Arguments:**
|
|
206
|
-
- `name` (string, required) - Skill name with auto-completion
|
|
207
|
-
|
|
208
|
-
The prompt description includes all available skills for discoverability. As you type the skill name, matching skills are suggested.
|
|
209
|
-
|
|
210
|
-
### Per-Skill Prompts
|
|
211
|
-
|
|
212
|
-
Each discovered skill is also registered as its own prompt (e.g., `/mcp-server-ts`, `/algorithmic-art`).
|
|
42
|
+
## Configuration UI
|
|
213
43
|
|
|
214
|
-
|
|
215
|
-
- Description shows the skill's own description
|
|
216
|
-
- List updates dynamically as skills change
|
|
44
|
+

|
|
217
45
|
|
|
218
|
-
|
|
46
|
+
## Skill Display UI
|
|
219
47
|
|
|
220
|
-
|
|
48
|
+

|
|
221
49
|
|
|
222
|
-
|
|
50
|
+
## Documentation
|
|
223
51
|
|
|
224
|
-
|
|
225
|
-
- `priority: 1.0` - High priority content that should be included in context
|
|
52
|
+
For complete documentation, just ask your assistant:
|
|
226
53
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
## Resources
|
|
230
|
-
|
|
231
|
-
Skills are also accessible via MCP [Resources](https://modelcontextprotocol.io/specification/2025-11-25/server/resources#resources) using `skill://` URIs.
|
|
232
|
-
|
|
233
|
-
### URI Patterns
|
|
234
|
-
|
|
235
|
-
| URI | Returns |
|
|
236
|
-
|-----|---------|
|
|
237
|
-
| `skill://{name}` | Single skill's SKILL.md content |
|
|
238
|
-
| `skill://{name}/` | All files in skill directory (collection) |
|
|
239
|
-
|
|
240
|
-
Individual file URIs (`skill://{name}/{path}`) are not listed as resources to reduce noise. Use the `skill-resource` tool to fetch specific files on demand.
|
|
241
|
-
|
|
242
|
-
### Resource Subscriptions
|
|
243
|
-
|
|
244
|
-
Clients can subscribe to resources for real-time updates when files change.
|
|
245
|
-
|
|
246
|
-
**Capability:** `resources: { subscribe: true, listChanged: true }`
|
|
247
|
-
|
|
248
|
-
**Subscribe to a resource:**
|
|
249
|
-
```
|
|
250
|
-
→ resources/subscribe { uri: "skill://mcp-server-ts" }
|
|
251
|
-
← {} (success)
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
**Receive notifications when files change:**
|
|
255
|
-
```
|
|
256
|
-
← notifications/resources/updated { uri: "skill://mcp-server-ts" }
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
**Unsubscribe:**
|
|
260
|
-
```
|
|
261
|
-
→ resources/unsubscribe { uri: "skill://mcp-server-ts" }
|
|
262
|
-
← {} (success)
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
**How it works:**
|
|
266
|
-
1. Client subscribes to a `skill://` URI
|
|
267
|
-
2. Server resolves URI to file path(s) and starts watching with chokidar
|
|
268
|
-
3. When files change, server debounces (100ms) and sends notification
|
|
269
|
-
4. Client can re-read the resource to get updated content
|
|
270
|
-
|
|
271
|
-
## Security
|
|
272
|
-
|
|
273
|
-
**Skills are treated as trusted content.** This server reads and serves skill files directly to clients without sanitization. Only configure skills directories containing content you trust.
|
|
274
|
-
|
|
275
|
-
Protections in place:
|
|
276
|
-
- Path traversal prevention (symlink-aware)
|
|
277
|
-
- File size limits (1MB default, configurable via `MAX_FILE_SIZE_MB` env var)
|
|
278
|
-
- Directory depth limits
|
|
279
|
-
- Skill content is confined to configured directories
|
|
280
|
-
|
|
281
|
-
Not protected against:
|
|
282
|
-
- Malicious content within trusted skill directories
|
|
283
|
-
- Prompt injection via skill instructions (skills can influence LLM behavior by design)
|
|
284
|
-
|
|
285
|
-
## Dynamic Skill Discovery
|
|
286
|
-
|
|
287
|
-
The server watches skill directories for changes. When SKILL.md files are added, modified, or removed:
|
|
288
|
-
|
|
289
|
-
1. Skills are re-discovered from all configured directories
|
|
290
|
-
2. The `skill` tool's description is updated with current skill names and metadata
|
|
291
|
-
3. Per-skill prompts are added, removed, or updated accordingly
|
|
292
|
-
4. `tools/listChanged` and `prompts/listChanged` notifications are sent to connected clients
|
|
293
|
-
5. Clients that support these notifications will refresh tool and prompt definitions
|
|
294
|
-
|
|
295
|
-
## Skill Metadata Format
|
|
296
|
-
|
|
297
|
-
The `skill` tool description includes metadata for all available skills in XML format:
|
|
298
|
-
|
|
299
|
-
```markdown
|
|
300
|
-
# Skills
|
|
301
|
-
|
|
302
|
-
When a user's task matches a skill description below: 1) activate it, 2) follow its instructions completely.
|
|
303
|
-
|
|
304
|
-
<available_skills>
|
|
305
|
-
<skill>
|
|
306
|
-
<name>mcp-server-ts</name>
|
|
307
|
-
<description>Build TypeScript MCP servers with composable code snippets...</description>
|
|
308
|
-
<location>C:/path/to/mcp-server-ts/SKILL.md</location>
|
|
309
|
-
</skill>
|
|
310
|
-
</available_skills>
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
This metadata is dynamically updated when skills change - clients supporting `tools/listChanged` will automatically refresh.
|
|
314
|
-
|
|
315
|
-
## Skill Discovery
|
|
316
|
-
|
|
317
|
-
Skills are discovered at startup from the configured directories. For each directory, the server checks:
|
|
318
|
-
- The directory itself for skill subdirectories
|
|
319
|
-
- `.claude/skills/` subdirectory
|
|
320
|
-
- `skills/` subdirectory
|
|
321
|
-
|
|
322
|
-
Each skill subdirectory must contain a `SKILL.md` file with YAML frontmatter including `name` and `description` fields.
|
|
323
|
-
|
|
324
|
-
## Testing
|
|
325
|
-
|
|
326
|
-
### Manual Testing with MCP Inspector
|
|
327
|
-
|
|
328
|
-
```bash
|
|
329
|
-
npm run build
|
|
330
|
-
npm run inspector -- /path/to/skills
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
### Automated Evals (Development Only)
|
|
334
|
-
|
|
335
|
-
The `evals/` directory contains an evaluation framework for testing skill activation across different delivery modes. Evals are only available when developing from source (not included in the npm package).
|
|
336
|
-
|
|
337
|
-
```bash
|
|
338
|
-
# Clone the repo first
|
|
339
|
-
git clone https://github.com/olaservo/skilljack-mcp.git
|
|
340
|
-
cd skilljack-mcp
|
|
341
|
-
|
|
342
|
-
# Install dev dependencies (includes claude-agent-sdk for evals)
|
|
343
|
-
npm install
|
|
344
|
-
|
|
345
|
-
# Build and run evals
|
|
346
|
-
npm run build
|
|
347
|
-
npm run eval # Default: greeting task, MCP mode
|
|
348
|
-
npm run eval -- --task=xlsx-openpyxl # Specific task
|
|
349
|
-
npm run eval -- --mode=native # Native skill mode
|
|
350
|
-
npm run eval -- --mode=mcp+native # Both MCP and native enabled
|
|
351
|
-
```
|
|
54
|
+
> "how do I use skilljack?" or "how does skilljack work behind the scenes?"
|
|
352
55
|
|
|
353
|
-
|
|
56
|
+
This loads the [full reference](https://github.com/olaservo/skilljack-mcp/blob/main/skills/skilljack-docs/SKILL.md) including tools, prompts, resources, configuration options, and architecture details.
|
|
354
57
|
|
|
355
58
|
## Related
|
|
356
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skilljack/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "MCP server that discovers and serves Agent Skills. I know kung fu.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
"types": "dist/index.d.ts",
|
|
14
14
|
"files": [
|
|
15
15
|
"dist",
|
|
16
|
+
"dist/ui",
|
|
17
|
+
"skills",
|
|
16
18
|
"README.md",
|
|
17
19
|
"LICENSE"
|
|
18
20
|
],
|
|
@@ -35,7 +37,9 @@
|
|
|
35
37
|
"node": ">=18.0.0"
|
|
36
38
|
},
|
|
37
39
|
"scripts": {
|
|
38
|
-
"build": "tsc",
|
|
40
|
+
"build": "npm run build:ui && npm run build:ui:display && tsc",
|
|
41
|
+
"build:ui": "vite build",
|
|
42
|
+
"build:ui:display": "cross-env INPUT=skill-display.html vite build --emptyOutDir false",
|
|
39
43
|
"start": "node dist/index.js",
|
|
40
44
|
"dev": "tsx watch src/index.ts",
|
|
41
45
|
"inspector": "npx @modelcontextprotocol/inspector@latest node dist/index.js",
|
|
@@ -49,15 +53,20 @@
|
|
|
49
53
|
"eval:xlsx-verify": "tsx evals/eval.ts --task=xlsx-verify"
|
|
50
54
|
},
|
|
51
55
|
"dependencies": {
|
|
52
|
-
"@modelcontextprotocol/
|
|
56
|
+
"@modelcontextprotocol/ext-apps": "^1.0.0",
|
|
57
|
+
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
53
58
|
"chokidar": "^5.0.0",
|
|
59
|
+
"simple-git": "^3.27.0",
|
|
54
60
|
"yaml": "^2.7.0",
|
|
55
61
|
"zod": "^3.25.0"
|
|
56
62
|
},
|
|
57
63
|
"devDependencies": {
|
|
58
64
|
"@anthropic-ai/claude-agent-sdk": "^0.1.42",
|
|
59
65
|
"@types/node": "^22.10.0",
|
|
66
|
+
"cross-env": "^7.0.3",
|
|
60
67
|
"tsx": "^4.19.2",
|
|
61
|
-
"typescript": "^5.7.2"
|
|
68
|
+
"typescript": "^5.7.2",
|
|
69
|
+
"vite": "^6.0.0",
|
|
70
|
+
"vite-plugin-singlefile": "^2.0.0"
|
|
62
71
|
}
|
|
63
72
|
}
|
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skilljack-docs
|
|
3
|
+
description: Complete documentation for the Skilljack MCP server - tools, prompts, resources, configuration, and architecture reference.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skilljack MCP Documentation
|
|
7
|
+
|
|
8
|
+
An MCP server that jacks [Agent Skills](https://agentskills.io) directly into your LLM's brain.
|
|
9
|
+
|
|
10
|
+
> **Recommended:** For best results, use an MCP client that supports `tools/listChanged` notifications (e.g., Claude Code). This enables dynamic skill discovery - when skills are added or modified, the client automatically refreshes its understanding of available skills. Alternatively, use `--static` mode for predictable behavior with a fixed skill set.
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- **Dynamic Skill Discovery** - Watches skill directories and automatically refreshes when skills change
|
|
15
|
+
- **Tool List Changed Notifications** - Sends `tools/listChanged` so clients can refresh available skills
|
|
16
|
+
- **Skill Tool** - Load full skill content on demand (progressive disclosure)
|
|
17
|
+
- **MCP Prompts** - Load skills via `/skill` prompt with auto-completion or per-skill prompts
|
|
18
|
+
- **MCP Resources** - Access skills via `skill://` URIs with batch collection support
|
|
19
|
+
- **Resource Subscriptions** - Real-time file watching with `notifications/resources/updated`
|
|
20
|
+
- **Configuration UI** - Manage skill directories through an interactive UI in supported clients
|
|
21
|
+
|
|
22
|
+
## Motivation
|
|
23
|
+
|
|
24
|
+
This server demonstrates a way to approach integrating skills using existing MCP primitives.
|
|
25
|
+
|
|
26
|
+
MCP already has the building blocks:
|
|
27
|
+
- **Tools** for on-demand skill loading (the `skill` tool with dynamically updated descriptions)
|
|
28
|
+
- **Resources** for explicit skill access (`skill://` URIs)
|
|
29
|
+
- **Notifications** for real-time updates (`tools/listChanged`, `resources/updated`)
|
|
30
|
+
- **Prompts** for explicitly invoking skills by name (`/my-server-skill`)
|
|
31
|
+
|
|
32
|
+
This approach provides separation of concerns. Rather than every MCP server needing to embed skill handling, the server acts as a dedicated 'skill gateway'. Server authors can bundle skills alongside their MCP servers without modifying the servers themselves. If MCP registries support robust tool discovery, skill tools become discoverable like any other tool.
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
Configure one or more skills directories containing your Agent Skills:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# Single directory
|
|
40
|
+
skilljack-mcp /path/to/skills
|
|
41
|
+
|
|
42
|
+
# Multiple directories (separate args or comma-separated)
|
|
43
|
+
skilljack-mcp /path/to/skills /path/to/more/skills
|
|
44
|
+
skilljack-mcp /path/to/skills,/path/to/more/skills
|
|
45
|
+
|
|
46
|
+
# Using environment variable (comma-separated for multiple)
|
|
47
|
+
SKILLS_DIR=/path/to/skills skilljack-mcp
|
|
48
|
+
SKILLS_DIR=/path/to/skills,/path/to/more/skills skilljack-mcp
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Each directory is scanned along with its `.claude/skills/` and `skills/` subdirectories for skills. Duplicate skill names are handled by keeping the first occurrence.
|
|
52
|
+
|
|
53
|
+
### Static Mode
|
|
54
|
+
|
|
55
|
+
By default, Skilljack MCP watches skill directories for changes and notifies clients when skills are added, modified, or removed.
|
|
56
|
+
|
|
57
|
+
Enable **static mode** to freeze the skills list at startup:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
skilljack-mcp --static /path/to/skills
|
|
61
|
+
# or
|
|
62
|
+
SKILLJACK_STATIC=true skilljack-mcp /path/to/skills
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
In static mode:
|
|
66
|
+
- Skills are discovered once at startup and never refreshed
|
|
67
|
+
- No file watchers are set up for skill directories
|
|
68
|
+
- `tools.listChanged` and `prompts.listChanged` capabilities are `false`
|
|
69
|
+
- Resource subscriptions remain fully dynamic (individual skill files can still be watched)
|
|
70
|
+
|
|
71
|
+
Use static mode when you need predictable behavior or have a fixed set of skills that won't change during the session.
|
|
72
|
+
|
|
73
|
+
**Windows note**: Use forward slashes in paths when using with MCP Inspector:
|
|
74
|
+
```bash
|
|
75
|
+
skilljack-mcp "C:/Users/you/skills"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Configuration UI
|
|
79
|
+
|
|
80
|
+
In MCP clients that support [MCP Apps](https://blog.modelcontextprotocol.io/posts/2026-01-26-mcp-apps/) (like Claude Desktop), you can manage skill directories through an interactive UI.
|
|
81
|
+
|
|
82
|
+
**To open the configuration UI**, ask your assistant to show the skilljack config:
|
|
83
|
+
|
|
84
|
+
> "show me the skilljack config"
|
|
85
|
+
|
|
86
|
+
The UI displays:
|
|
87
|
+
- Current skill directories with skill counts
|
|
88
|
+
- Status indicators showing which directories are from config vs command-line
|
|
89
|
+
- Options to add new directories or remove existing ones
|
|
90
|
+
|
|
91
|
+
Changes made through the UI are persisted to the server's configuration. Clients that support `tools/listChanged` notifications will see updates immediately; others may require reconnection.
|
|
92
|
+
|
|
93
|
+
## Skill Display UI
|
|
94
|
+
|
|
95
|
+
View all available skills and customize their invocation settings through the skill display UI.
|
|
96
|
+
|
|
97
|
+
**To open the skill display UI**, ask your assistant:
|
|
98
|
+
|
|
99
|
+
> "what skills are configured in skilljack?"
|
|
100
|
+
|
|
101
|
+
The UI displays:
|
|
102
|
+
- All discovered skills with name, description, and file path
|
|
103
|
+
- **Source indicators** showing whether each skill is from a local directory or GitHub repository
|
|
104
|
+
- **Invocation toggles** to enable/disable Assistant (model auto-invoke) and User (prompts menu) visibility
|
|
105
|
+
- **Customized badge** when settings differ from frontmatter defaults
|
|
106
|
+
|
|
107
|
+
Skills from GitHub repositories show the org/repo name (e.g., `modelcontextprotocol/ext-apps`), making it easy to identify where each skill originates.
|
|
108
|
+
|
|
109
|
+
## How It Works
|
|
110
|
+
|
|
111
|
+
The server implements the [Agent Skills](https://agentskills.io) progressive disclosure pattern with dynamic updates:
|
|
112
|
+
|
|
113
|
+
1. **At startup**: Discovers skills from configured directories and starts file watchers
|
|
114
|
+
2. **On connection**: Skill tool description includes available skills metadata
|
|
115
|
+
3. **On file change**: Re-discovers skills, updates tool description, sends `tools/listChanged`
|
|
116
|
+
4. **On tool call**: Agent calls `skill` tool to load full SKILL.md content
|
|
117
|
+
5. **As needed**: Agent calls `skill-resource` to load additional files
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
┌─────────────────────────────────────────────────────────┐
|
|
121
|
+
│ Server starts │
|
|
122
|
+
│ • Discovers skills from configured directories │
|
|
123
|
+
│ • Starts watching for SKILL.md changes │
|
|
124
|
+
│ ↓ │
|
|
125
|
+
│ MCP Client connects │
|
|
126
|
+
│ • Skill tool description includes available skills │
|
|
127
|
+
│ • Prompts registered for each skill │
|
|
128
|
+
│ ↓ │
|
|
129
|
+
│ LLM sees skill metadata in tool description │
|
|
130
|
+
│ ↓ │
|
|
131
|
+
│ SKILL.md added/modified/removed │
|
|
132
|
+
│ • Server re-discovers skills │
|
|
133
|
+
│ • Updates skill tool description │
|
|
134
|
+
│ • Updates prompt list (add/remove/modify) │
|
|
135
|
+
│ • Sends tools/listChanged notification │
|
|
136
|
+
│ • Sends prompts/listChanged notification │
|
|
137
|
+
│ • Client refreshes tool and prompt definitions │
|
|
138
|
+
│ ↓ │
|
|
139
|
+
│ User invokes /skill prompt or /skill-name prompt │
|
|
140
|
+
│ OR LLM calls "skill" tool with skill name │
|
|
141
|
+
│ ↓ │
|
|
142
|
+
│ Server returns full SKILL.md content │
|
|
143
|
+
│ ↓ │
|
|
144
|
+
│ LLM calls "skill-resource" for additional files │
|
|
145
|
+
│ • Scripts, snippets, references, assets, etc. │
|
|
146
|
+
└─────────────────────────────────────────────────────────┘
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Tools vs Resources vs Prompts
|
|
150
|
+
|
|
151
|
+
This server exposes skills via **tools**, **resources**, and **prompts**:
|
|
152
|
+
|
|
153
|
+
- **Tools** (`skill`, `skill-resource`) - For your agent to use autonomously. The LLM sees available skills in the tool description and calls them as needed.
|
|
154
|
+
- **Prompts** (`/skill`, `/skill-name`) - For explicit user invocation. Use `/skill` with auto-completion or select a skill directly by name.
|
|
155
|
+
- **Resources** (`skill://` URIs) - For manual selection in apps that support it (e.g., Claude Desktop's resource picker). Useful when you want to explicitly attach a skill to the conversation.
|
|
156
|
+
|
|
157
|
+
Most users will rely on tools for automatic skill activation. Prompts provide user-initiated loading with auto-completion. Resources provide an alternative for manual control.
|
|
158
|
+
|
|
159
|
+
## Progressive Disclosure Design
|
|
160
|
+
|
|
161
|
+
This server implements the [Agent Skills progressive disclosure pattern](https://agentskills.io/specification#progressive-disclosure), which structures skills for efficient context usage:
|
|
162
|
+
|
|
163
|
+
| Level | Tokens | What's loaded | When |
|
|
164
|
+
|-------|--------|---------------|------|
|
|
165
|
+
| **Metadata** | ~100 | `name` and `description` | At startup, for all skills |
|
|
166
|
+
| **Instructions** | < 5000 | Full SKILL.md body | When skill is activated |
|
|
167
|
+
| **Resources** | As needed | Files in `scripts/`, `references/`, `assets/` | On demand via `skill-resource` |
|
|
168
|
+
|
|
169
|
+
### How it works
|
|
170
|
+
|
|
171
|
+
1. **Discovery** - Server loads metadata from all skills into the `skill` tool description
|
|
172
|
+
2. **Activation** - When a skill is loaded (via tool, prompt, or resource), only the SKILL.md content is returned
|
|
173
|
+
3. **Execution** - SKILL.md references additional files; agent fetches them with `skill-resource` as needed
|
|
174
|
+
|
|
175
|
+
### Why SKILL.md documents its own resources
|
|
176
|
+
|
|
177
|
+
The server doesn't automatically list all files in a skill directory. Instead, skill authors document available resources directly in their SKILL.md (e.g., "Copy the template from `templates/server.ts`"). This design choice follows the spec because:
|
|
178
|
+
|
|
179
|
+
- **Skill authors know best** - They decide which files are relevant and when to use them
|
|
180
|
+
- **Context efficiency** - Loading everything upfront wastes tokens on files the agent may not need
|
|
181
|
+
- **Natural flow** - SKILL.md guides the agent through resources in a logical order
|
|
182
|
+
|
|
183
|
+
**For skill authors:** Reference files using relative paths from the skill root (e.g., `snippets/tool.ts`, `references/api.md`). Keep your main SKILL.md under 500 lines; move detailed reference material to separate files. See the [Agent Skills specification](https://agentskills.io/specification) for complete authoring guidelines.
|
|
184
|
+
|
|
185
|
+
## Tools
|
|
186
|
+
|
|
187
|
+
### `skill`
|
|
188
|
+
|
|
189
|
+
Load and activate an Agent Skill by name. Returns the full SKILL.md content.
|
|
190
|
+
|
|
191
|
+
**Input:**
|
|
192
|
+
```json
|
|
193
|
+
{
|
|
194
|
+
"name": "skill-name"
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Output:** Full SKILL.md content including frontmatter and instructions.
|
|
199
|
+
|
|
200
|
+
### `skill-resource`
|
|
201
|
+
|
|
202
|
+
Read files within a skill's directory (`scripts/`, `references/`, `assets/`, `snippets/`, etc.).
|
|
203
|
+
|
|
204
|
+
This follows the Agent Skills spec's progressive disclosure pattern - resources are loaded only when needed.
|
|
205
|
+
|
|
206
|
+
**Read a single file:**
|
|
207
|
+
```json
|
|
208
|
+
{
|
|
209
|
+
"skill": "mcp-server-ts",
|
|
210
|
+
"path": "snippets/tools/echo.ts"
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**Read all files in a directory:**
|
|
215
|
+
```json
|
|
216
|
+
{
|
|
217
|
+
"skill": "algorithmic-art",
|
|
218
|
+
"path": "templates"
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
Returns all files in the directory as multiple content items.
|
|
222
|
+
|
|
223
|
+
**List available files** (pass empty path):
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"skill": "mcp-server-ts",
|
|
227
|
+
"path": ""
|
|
228
|
+
}
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**Security:** Path traversal is prevented - only files within the skill directory can be accessed.
|
|
232
|
+
|
|
233
|
+
## Prompts
|
|
234
|
+
|
|
235
|
+
Skills can be loaded via MCP [Prompts](https://modelcontextprotocol.io/specification/2025-11-05/server/prompts) for explicit user invocation.
|
|
236
|
+
|
|
237
|
+
### `/skill` Prompt
|
|
238
|
+
|
|
239
|
+
Load a skill by name with auto-completion support.
|
|
240
|
+
|
|
241
|
+
**Arguments:**
|
|
242
|
+
- `name` (string, required) - Skill name with auto-completion
|
|
243
|
+
|
|
244
|
+
The prompt description includes all available skills for discoverability. As you type the skill name, matching skills are suggested.
|
|
245
|
+
|
|
246
|
+
### Per-Skill Prompts
|
|
247
|
+
|
|
248
|
+
Each discovered skill is also registered as its own prompt (e.g., `/mcp-server-ts`, `/algorithmic-art`).
|
|
249
|
+
|
|
250
|
+
- No arguments needed - just select and invoke
|
|
251
|
+
- Description shows the skill's own description
|
|
252
|
+
- List updates dynamically as skills change
|
|
253
|
+
|
|
254
|
+
**Example:** If you have a skill named `mcp-server-ts`, you can invoke it directly as `/mcp-server-ts`.
|
|
255
|
+
|
|
256
|
+
### Content Annotations
|
|
257
|
+
|
|
258
|
+
Prompt responses include MCP [content annotations](https://modelcontextprotocol.io/specification/2025-11-25/server/prompts#embedded-resources) for proper handling:
|
|
259
|
+
|
|
260
|
+
- `audience: ["assistant"]` - Content is intended for the LLM, not the user
|
|
261
|
+
- `priority: 1.0` - High priority content that should be included in context
|
|
262
|
+
|
|
263
|
+
Prompts return embedded resources with the skill's `skill://` URI, allowing clients to track the content source.
|
|
264
|
+
|
|
265
|
+
## Resources
|
|
266
|
+
|
|
267
|
+
Skills are also accessible via MCP [Resources](https://modelcontextprotocol.io/specification/2025-11-25/server/resources#resources) using `skill://` URIs.
|
|
268
|
+
|
|
269
|
+
### URI Patterns
|
|
270
|
+
|
|
271
|
+
| URI | Returns |
|
|
272
|
+
|-----|---------|
|
|
273
|
+
| `skill://{name}` | Single skill's SKILL.md content |
|
|
274
|
+
| `skill://{name}/` | All files in skill directory (collection) |
|
|
275
|
+
|
|
276
|
+
Individual file URIs (`skill://{name}/{path}`) are not listed as resources to reduce noise. Use the `skill-resource` tool to fetch specific files on demand.
|
|
277
|
+
|
|
278
|
+
### Resource Subscriptions
|
|
279
|
+
|
|
280
|
+
Clients can subscribe to resources for real-time updates when files change.
|
|
281
|
+
|
|
282
|
+
**Capability:** `resources: { subscribe: true, listChanged: true }`
|
|
283
|
+
|
|
284
|
+
**Subscribe to a resource:**
|
|
285
|
+
```
|
|
286
|
+
→ resources/subscribe { uri: "skill://mcp-server-ts" }
|
|
287
|
+
← {} (success)
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**Receive notifications when files change:**
|
|
291
|
+
```
|
|
292
|
+
← notifications/resources/updated { uri: "skill://mcp-server-ts" }
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**Unsubscribe:**
|
|
296
|
+
```
|
|
297
|
+
→ resources/unsubscribe { uri: "skill://mcp-server-ts" }
|
|
298
|
+
← {} (success)
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
**How it works:**
|
|
302
|
+
1. Client subscribes to a `skill://` URI
|
|
303
|
+
2. Server resolves URI to file path(s) and starts watching with chokidar
|
|
304
|
+
3. When files change, server debounces (100ms) and sends notification
|
|
305
|
+
4. Client can re-read the resource to get updated content
|
|
306
|
+
|
|
307
|
+
## Security
|
|
308
|
+
|
|
309
|
+
**Skills are treated as trusted content.** This server reads and serves skill files directly to clients without sanitization. Only configure skills directories containing content you trust.
|
|
310
|
+
|
|
311
|
+
Protections in place:
|
|
312
|
+
- Path traversal prevention (symlink-aware)
|
|
313
|
+
- File size limits (1MB default, configurable via `MAX_FILE_SIZE_MB` env var)
|
|
314
|
+
- Directory depth limits
|
|
315
|
+
- Skill content is confined to configured directories
|
|
316
|
+
|
|
317
|
+
Not protected against:
|
|
318
|
+
- Malicious content within trusted skill directories
|
|
319
|
+
- Prompt injection via skill instructions (skills can influence LLM behavior by design)
|
|
320
|
+
|
|
321
|
+
## Dynamic Skill Discovery
|
|
322
|
+
|
|
323
|
+
The server watches skill directories for changes. When SKILL.md files are added, modified, or removed:
|
|
324
|
+
|
|
325
|
+
1. Skills are re-discovered from all configured directories
|
|
326
|
+
2. The `skill` tool's description is updated with current skill names and metadata
|
|
327
|
+
3. Per-skill prompts are added, removed, or updated accordingly
|
|
328
|
+
4. `tools/listChanged` and `prompts/listChanged` notifications are sent to connected clients
|
|
329
|
+
5. Clients that support these notifications will refresh tool and prompt definitions
|
|
330
|
+
|
|
331
|
+
## Skill Metadata Format
|
|
332
|
+
|
|
333
|
+
The `skill` tool description includes metadata for all available skills in XML format:
|
|
334
|
+
|
|
335
|
+
```markdown
|
|
336
|
+
# Skills
|
|
337
|
+
|
|
338
|
+
When a user's task matches a skill description below: 1) activate it, 2) follow its instructions completely.
|
|
339
|
+
|
|
340
|
+
<available_skills>
|
|
341
|
+
<skill>
|
|
342
|
+
<name>mcp-server-ts</name>
|
|
343
|
+
<description>Build TypeScript MCP servers with composable code snippets...</description>
|
|
344
|
+
<location>C:/path/to/mcp-server-ts/SKILL.md</location>
|
|
345
|
+
</skill>
|
|
346
|
+
</available_skills>
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
This metadata is dynamically updated when skills change - clients supporting `tools/listChanged` will automatically refresh.
|
|
350
|
+
|
|
351
|
+
## Skill Discovery
|
|
352
|
+
|
|
353
|
+
Skills are discovered at startup from the configured directories. For each directory, the server checks:
|
|
354
|
+
- The directory itself for skill subdirectories
|
|
355
|
+
- `.claude/skills/` subdirectory
|
|
356
|
+
- `skills/` subdirectory
|
|
357
|
+
|
|
358
|
+
Each skill subdirectory must contain a `SKILL.md` file with YAML frontmatter including `name` and `description` fields.
|
|
359
|
+
|
|
360
|
+
## Skill Visibility Control
|
|
361
|
+
|
|
362
|
+
Control which skills appear in tools vs prompts using optional frontmatter fields:
|
|
363
|
+
|
|
364
|
+
| Frontmatter | In Tool Description | In Prompts Menu | Use Case |
|
|
365
|
+
|-------------|---------------------|-----------------|----------|
|
|
366
|
+
| (default) | Yes | Yes | Normal skills |
|
|
367
|
+
| `disable-model-invocation: true` | No | Yes | User-triggered workflows (deploy, commit) |
|
|
368
|
+
| `user-invocable: false` | Yes | No | Background context (model auto-loads when relevant) |
|
|
369
|
+
|
|
370
|
+
### Example: User-Only Skill
|
|
371
|
+
|
|
372
|
+
Hide from model auto-discovery, require explicit user invocation via `/skill-name` prompt:
|
|
373
|
+
|
|
374
|
+
```yaml
|
|
375
|
+
---
|
|
376
|
+
name: deploy
|
|
377
|
+
description: Deploy to production
|
|
378
|
+
disable-model-invocation: true
|
|
379
|
+
---
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
### Example: Model-Only Skill
|
|
383
|
+
|
|
384
|
+
Hide from prompts menu, model uses automatically when relevant:
|
|
385
|
+
|
|
386
|
+
```yaml
|
|
387
|
+
---
|
|
388
|
+
name: codebase-context
|
|
389
|
+
description: Background information about this codebase
|
|
390
|
+
user-invocable: false
|
|
391
|
+
---
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
Note: Resources (`skill://` URIs) always include all skills regardless of these settings, allowing explicit access when needed.
|
|
395
|
+
|
|
396
|
+
## Testing
|
|
397
|
+
|
|
398
|
+
### Manual Testing with MCP Inspector
|
|
399
|
+
|
|
400
|
+
```bash
|
|
401
|
+
npm run build
|
|
402
|
+
npm run inspector -- /path/to/skills
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
### Automated Evals (Development Only)
|
|
406
|
+
|
|
407
|
+
The `evals/` directory contains an evaluation framework for testing skill activation across different delivery modes. Evals are only available when developing from source (not included in the npm package).
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
# Clone the repo first
|
|
411
|
+
git clone https://github.com/olaservo/skilljack-mcp.git
|
|
412
|
+
cd skilljack-mcp
|
|
413
|
+
|
|
414
|
+
# Install dev dependencies (includes claude-agent-sdk for evals)
|
|
415
|
+
npm install
|
|
416
|
+
|
|
417
|
+
# Build and run evals
|
|
418
|
+
npm run build
|
|
419
|
+
npm run eval # Default: greeting task, MCP mode
|
|
420
|
+
npm run eval -- --task=xlsx-openpyxl # Specific task
|
|
421
|
+
npm run eval -- --mode=native # Native skill mode
|
|
422
|
+
npm run eval -- --mode=mcp+native # Both MCP and native enabled
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
See [evals/README.md](https://github.com/olaservo/skilljack-mcp/blob/main/evals/README.md) for details on available tasks, modes, and findings about activation behavior differences.
|
|
426
|
+
|
|
427
|
+
## Related
|
|
428
|
+
|
|
429
|
+
- [Agent Skills Specification](https://agentskills.io)
|
|
430
|
+
- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
|
|
431
|
+
- [Example MCP Clients](https://modelcontextprotocol.io/clients)
|