Local MCP Server for Cross-IDE AI Skill Distribution
skill-central is a local MCP (Model Context Protocol) server that communicates with AI IDEs (Cursor, Windsurf, Claude Code, etc.) via the Stdio protocol, enabling cross-IDE AI skill (prompts/tools) distribution and reuse.
A skill is a structured prompt or tool definition — organised by topic, managed in layers, matched by tags. You manage your AI's capability boundaries the same way you manage code.
- Quick Start
- Architecture
- 中文版
- CLI Commands
- JSON-RPC API
- Skill File Format
- Tag Composition
- Layered Override
- Config Resolution Order
- IDE Integration
- Custom Skill Development
- Troubleshooting
- Development
- License
npx @bobcgn/skill-central initThis scaffolds a .skills/ directory with 4 layered skill directories and a skill-central.yaml config file.
# Verify skills are loaded
npx @bobcgn/skill-central boardExpected output — 4 layers, 5 skill files (including a tool-type example):
▸ Skills (5 total)
┌─────────┬──────────────────────────┬────────────────────────────────┬──────────┬────────────────────────────────┐
│ (index) │ ID │ Name │ Type │ Tags │
├─────────┼──────────────────────────┼────────────────────────────────┼──────────┼────────────────────────────────┤
│ 0 │ 'architectural-mindset' │ 'Architectural Mindset' │ 'prompt' │ 'global' │
│ 1 │ 'debugging-expert' │ 'Debugging Expert' │ 'prompt' │ 'debug, fix, error' │
│ 2 │ 'commit-conventions' │ 'Commit Conventions' │ 'tool' │ 'git, workflow, commit' │
│ 3 │ 'container-infra' │ 'Container & Infrastructure' │ 'prompt' │ 'docker, nginx, infra, devops' │
└─────────┴──────────────────────────┴────────────────────────────────┴──────────┴────────────────────────────────┘
npx @bobcgn/skill-central mcpThe server listens on stdin for JSON-RPC messages and writes responses to stdout. All diagnostic output goes to stderr.
┌────────────────────────────────────────────────────────┐
│ AI IDE (Cursor / Windsurf / etc.) │
│ │ Stdio (JSON-RPC) │
└────────────────────────┼───────────────────────────────┘
│
┌────────────────────────┼────────────────────────────────┐
│ skill-central ▼ │
│ ┌────────────┐ ┌─────────────────┐ ┌─────────────┐ │
│ │ Entry │ │ Protocol │ │ Core │ │
│ │ index.ts │→ │ handler.ts │→ │ engine │ │
│ │ mcp.ts │ │ prompts.ts │ │ override- │ │
│ │ board.ts │ │ tools.ts │ │ tree │ │
│ │ init.ts │ │ │ │ composer │ │
│ └────────────┘ └─────────────────┘ └──────┬──────┘ │
│ │ │
│ ┌──────▼───────┐ │
│ │ Storage │ │
│ │ reader.ts │ │
│ │ parser.ts │ │
│ │ config.ts │ │
│ └──────────────┘ │
└─────────────────────────────────────────────────────────┘
| Layer | Priority | Scope |
|---|---|---|
01-global |
10 | Universal context — applies to every interaction |
02-workflows |
20 | Cross-cutting workflows (debugging, review, planning) |
03-domains |
30 | Domain-specific knowledge (infra, security, data) |
04-tech-stack |
40 | Tech-stack specifics — languages and frameworks |
npx @bobcgn/skill-central <command>| Command | Description |
|---|---|
mcp |
Start the Stdio MCP Server (silent mode, output on stderr only). For IDE integration. |
board |
Developer dashboard — print all loaded layers and skills as tables. |
init |
Scaffold .skills/ directory with sample definitions and layer config. |
After global install:
npm install -g @bobcgn/skill-central
skill-central init
skill-central board
skill-central mcpList all prompt-type skills.
// Request
{"jsonrpc":"2.0","id":1,"method":"prompts/list"}
// Response
{"result":{"prompts":[
{"name":"architectural-mindset","description":"Before writing code, always reason..."},
{"name":"debugging-expert","description":"Systematic debugging..."},
{"name":"container-infra","description":"Docker, Nginx, and infra deployment..."}
]}}Single skill lookup:
{"jsonrpc":"2.0","id":1,"method":"prompts/get","params":{"name":"container-infra"}}Template interpolation is supported: placeholders like {{name}} in the skill's prompt field are replaced with argument values:
{"method":"prompts/get","params":{"name":"my-skill","arguments":{"name":"Alice"}}}Tag-based composition (combine multiple skills, low→high priority):
{"jsonrpc":"2.0","id":1,"method":"prompts/get","params":{"name":"skills:compose","arguments":{"tags":"global,debug,docker"}}}{"jsonrpc":"2.0","id":1,"method":"tools/list"}
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"commit-conventions","arguments":{"type":"feat","summary":"add login page"}}}Tool arguments are validated against the skill's inputSchema — missing required fields or type mismatches return an error result with isError: true.
Skills can be defined in YAML (recommended) or JSON.
# .skills/04-tech-stack/languages/typescript.yaml
id: typescript-conventions
name: TypeScript Conventions
description: TypeScript coding standards for the project
type: prompt
tags:
- typescript
prompt: |
You are an expert TypeScript developer. Follow these conventions:
## Code Style
- Use strict mode — always enable `strict: true` in tsconfig.
- Prefer interfaces over type aliases for object shapes.
- Use explicit return types on public functions.| Field | Type | Required | Description |
|---|---|---|---|
id |
string | ✓ | Globally unique identifier. Used as prompt name. |
name |
string | ✓ | Human-readable label. |
description |
string | ✓ | One-line description. |
type |
"prompt" / "tool" |
✓ | Skill type. |
tags |
string[] | Categorisation tags for composition. | |
prompt |
string | for prompt | Markdown instructions sent to the AI. Supports {{placeholder}} interpolation. |
inputSchema |
object | for tool | JSON Schema input definition. Validated on tool call. |
arguments |
object[] | Declared arguments (informational, for IDE UI). | |
version |
string | Semver for change tracking. |
When an IDE calls skills:compose, the engine:
- Matches all skills whose tags overlap the requested tag set
- Sorts by layer priority (ascending — low first)
- Concatenates prompt content separated by
---
Example — tags: "debug,docker" triggers:
[docker, nginx, infra, devops] ← container-infra (priority 30)
matched via "docker"
[debug, fix, error] ← debugging-expert (priority 20)
matched via "debug"
Result: debugging guidance first, then infra standards — layered from concrete workflow to domain knowledge, combined in priority order.
When multiple layers define the same id, the highest-priority entry wins:
layers:
- name: "01-global" # priority: 10 — overridable baseline
- name: "04-tech-stack" # priority: 40 — team-wide conventions
- name: "user-override" # priority: 100 — personal preferenceThis lets teams share a common skill repository while allowing individuals to layer custom overrides — no file copying required.
1. ~/.skill-central/config.yaml ← machine-wide defaults
2. <project>/skill-central.yaml ← per-project (overrides same-named layers)
3. Built-in fallback ← { name: "project", path: ".skills", priority: 100 }
Layers with the same name are merged (later sources overwrite path/priority).
Connect skill-central to your AI IDE as an MCP tool.
.cursor/mcp.json:
{
"mcpServers": {
"skill-central": {
"command": "npx",
"args": ["@bobcgn/skill-central", "mcp"]
}
}
}.windsurf/mcp_config.json:
{
"mcpServers": {
"skill-central": {
"command": "npx",
"args": ["@bobcgn/skill-central", "mcp"]
}
}
}claude mcp add skill-central -- npx @bobcgn/skill-central mcpmkdir -p .skills/04-tech-stack/languages.skills/04-tech-stack/languages/typescript.yaml:
id: typescript-conventions
name: TypeScript Conventions
description: TypeScript coding standards
type: prompt
tags:
- typescript
prompt: |
You are an expert TypeScript developer...npx @bobcgn/skill-central board# Via direct lookup
{"method":"prompts/get","params":{"name":"typescript-conventions"}}
# Or via tag composition
{"method":"prompts/get","params":{"name":"skills:compose","arguments":{"tags":"typescript"}}}Refer to .skills/04-tech-stack/_template.yaml for a complete annotated example.
| Symptom | Likely Cause | Fix |
|---|---|---|
| Server starts but no response | stdout pollution | Check for rogue console.log calls. All output must go to stderr. |
| IDE can't connect | Wrong command in MCP config | Use npx @bobcgn/skill-central mcp as the command. |
| Skills not loading | YAML syntax error | Run npx @bobcgn/skill-central board to see load status. Check id and type fields exist. |
| Tag composition returns empty | Tags missing or mismatched | Verify skill YAML has tags:. Use board to confirm. Pass comma-separated: "tags":"kmp,android". |
| Tool call returns error | Missing or invalid arguments | Check the skill's inputSchema.required field. Arguments are validated against declared types. |
# Clone and set up
git clone https://github.com/BobcGn/skill-central.git
cd skill-central
npm install
# Dev commands
npm run dev:mcp # MCP server in watch mode
npm run dev:board # dashboard view
npm run dev:init # (re)generate sample skills
npm run build # tsc compile → dist/
npx tsc --noEmit # type-check only| Component | Choice |
|---|---|
| Runtime | Node.js 22+ (ESM) |
| Language | TypeScript 5.8 (ES2022, NodeNext) |
| MCP SDK | @modelcontextprotocol/sdk ^1.9.0 |
| CLI | commander ^14.0.0 |
| YAML | js-yaml ^4.1.1 |
| Dev Runner | tsx ^4.19.3 |
MIT