@rishildi/ldi-process-skills 0.1.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 +133 -0
- package/build/index.d.ts +13 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +24 -0
- package/build/server.d.ts +12 -0
- package/build/server.d.ts.map +1 -0
- package/build/server.js +183 -0
- package/build/skills/embedded.d.ts +10 -0
- package/build/skills/embedded.d.ts.map +1 -0
- package/build/skills/embedded.js +220 -0
- package/build/skills/registry.d.ts +35 -0
- package/build/skills/registry.d.ts.map +1 -0
- package/build/skills/registry.js +90 -0
- package/package.json +48 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill registry — loads embedded skills and provides lookup methods
|
|
3
|
+
* for the MCP server to resolve tool calls into skill instructions.
|
|
4
|
+
*/
|
|
5
|
+
import { type SkillFile } from "./embedded.js";
|
|
6
|
+
export interface SkillDefinition {
|
|
7
|
+
/** Skill name (directory name, e.g. "create-fabric-lakehouse") */
|
|
8
|
+
name: string;
|
|
9
|
+
/** Parsed title from the SKILL.md frontmatter */
|
|
10
|
+
title: string;
|
|
11
|
+
/** Parsed description from the SKILL.md frontmatter */
|
|
12
|
+
description: string;
|
|
13
|
+
/** Full SKILL.md content */
|
|
14
|
+
skillMd: string;
|
|
15
|
+
/** All files in the skill package */
|
|
16
|
+
files: SkillFile[];
|
|
17
|
+
}
|
|
18
|
+
declare class SkillRegistry {
|
|
19
|
+
private skills;
|
|
20
|
+
constructor();
|
|
21
|
+
private loadAll;
|
|
22
|
+
/** Get all registered skills */
|
|
23
|
+
getAll(): SkillDefinition[];
|
|
24
|
+
/** Look up a skill by its tool name */
|
|
25
|
+
get(toolName: string): SkillDefinition | undefined;
|
|
26
|
+
/** Get a specific file from a skill (e.g. "assets/notebook-template.py") */
|
|
27
|
+
getFile(toolName: string, relativePath: string): string | undefined;
|
|
28
|
+
/** Get all files matching a prefix (e.g. "references/") */
|
|
29
|
+
getFilesByPrefix(toolName: string, prefix: string): SkillFile[];
|
|
30
|
+
/** List all tool names */
|
|
31
|
+
listToolNames(): string[];
|
|
32
|
+
}
|
|
33
|
+
export declare const registry: SkillRegistry;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/skills/registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAuC,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAEpF,MAAM,WAAW,eAAe;IAC9B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,qCAAqC;IACrC,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AA0CD,cAAM,aAAa;IACjB,OAAO,CAAC,MAAM,CAA2C;;IAMzD,OAAO,CAAC,OAAO;IAoBf,gCAAgC;IAChC,MAAM,IAAI,eAAe,EAAE;IAI3B,uCAAuC;IACvC,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAIlD,4EAA4E;IAC5E,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAMnE,2DAA2D;IAC3D,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,EAAE;IAM/D,0BAA0B;IAC1B,aAAa,IAAI,MAAM,EAAE;CAG1B;AAED,eAAO,MAAM,QAAQ,eAAsB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill registry — loads embedded skills and provides lookup methods
|
|
3
|
+
* for the MCP server to resolve tool calls into skill instructions.
|
|
4
|
+
*/
|
|
5
|
+
import { EMBEDDED_SKILLS } from "./embedded.js";
|
|
6
|
+
/**
|
|
7
|
+
* Parse YAML-ish frontmatter from a SKILL.md file.
|
|
8
|
+
* Extracts name and description fields.
|
|
9
|
+
*/
|
|
10
|
+
function parseFrontmatter(content) {
|
|
11
|
+
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
12
|
+
if (!match)
|
|
13
|
+
return { name: "", description: "" };
|
|
14
|
+
const yaml = match[1];
|
|
15
|
+
const nameMatch = yaml.match(/^name:\s*(.+)$/m);
|
|
16
|
+
const descMatch = yaml.match(/description:\s*>\s*\n([\s\S]*?)(?=\n\w|\n---)/);
|
|
17
|
+
const descInline = yaml.match(/^description:\s*['"]?(.+?)['"]?\s*$/m);
|
|
18
|
+
return {
|
|
19
|
+
name: nameMatch?.[1]?.trim() ?? "",
|
|
20
|
+
description: (descMatch?.[1] ?? descInline?.[1] ?? "")
|
|
21
|
+
.replace(/\n\s*/g, " ")
|
|
22
|
+
.trim(),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Convert a skill directory name to a tool-friendly name.
|
|
27
|
+
* "create-fabric-lakehouse" -> "create_fabric_lakehouse"
|
|
28
|
+
*/
|
|
29
|
+
function toToolName(skillName) {
|
|
30
|
+
return skillName.replace(/-/g, "_");
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Convert a skill directory name to a human title.
|
|
34
|
+
* "create-fabric-lakehouse" -> "Create Fabric Lakehouse"
|
|
35
|
+
*/
|
|
36
|
+
function toTitle(skillName) {
|
|
37
|
+
return skillName
|
|
38
|
+
.split("-")
|
|
39
|
+
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
|
40
|
+
.join(" ");
|
|
41
|
+
}
|
|
42
|
+
class SkillRegistry {
|
|
43
|
+
skills = new Map();
|
|
44
|
+
constructor() {
|
|
45
|
+
this.loadAll();
|
|
46
|
+
}
|
|
47
|
+
loadAll() {
|
|
48
|
+
for (const embedded of EMBEDDED_SKILLS) {
|
|
49
|
+
const skillMdFile = embedded.files.find((f) => f.relativePath === "SKILL.md");
|
|
50
|
+
if (!skillMdFile)
|
|
51
|
+
continue;
|
|
52
|
+
const frontmatter = parseFrontmatter(skillMdFile.content);
|
|
53
|
+
const toolName = toToolName(embedded.name);
|
|
54
|
+
this.skills.set(toolName, {
|
|
55
|
+
name: embedded.name,
|
|
56
|
+
title: toTitle(embedded.name),
|
|
57
|
+
description: frontmatter.description || `Skill: ${embedded.name}`,
|
|
58
|
+
skillMd: skillMdFile.content,
|
|
59
|
+
files: embedded.files,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** Get all registered skills */
|
|
64
|
+
getAll() {
|
|
65
|
+
return Array.from(this.skills.values());
|
|
66
|
+
}
|
|
67
|
+
/** Look up a skill by its tool name */
|
|
68
|
+
get(toolName) {
|
|
69
|
+
return this.skills.get(toolName);
|
|
70
|
+
}
|
|
71
|
+
/** Get a specific file from a skill (e.g. "assets/notebook-template.py") */
|
|
72
|
+
getFile(toolName, relativePath) {
|
|
73
|
+
const skill = this.skills.get(toolName);
|
|
74
|
+
if (!skill)
|
|
75
|
+
return undefined;
|
|
76
|
+
return skill.files.find((f) => f.relativePath === relativePath)?.content;
|
|
77
|
+
}
|
|
78
|
+
/** Get all files matching a prefix (e.g. "references/") */
|
|
79
|
+
getFilesByPrefix(toolName, prefix) {
|
|
80
|
+
const skill = this.skills.get(toolName);
|
|
81
|
+
if (!skill)
|
|
82
|
+
return [];
|
|
83
|
+
return skill.files.filter((f) => f.relativePath.startsWith(prefix));
|
|
84
|
+
}
|
|
85
|
+
/** List all tool names */
|
|
86
|
+
listToolNames() {
|
|
87
|
+
return Array.from(this.skills.keys());
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
export const registry = new SkillRegistry();
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rishildi/ldi-process-skills",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "LDI Process Skills MCP Server — brings curated, step-by-step process skills to your AI agents.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"ldi-process-skills": "./build/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"build"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"embed": "npx tsx scripts/embed-skills.ts",
|
|
14
|
+
"prebuild": "npm run embed",
|
|
15
|
+
"build": "tsc && chmod 755 build/index.js",
|
|
16
|
+
"build:compile": "npm run embed && bun build src/index.ts --compile --outfile dist/ldi-process-skills",
|
|
17
|
+
"dev": "tsc --watch",
|
|
18
|
+
"inspect": "npx @modelcontextprotocol/inspector node build/index.js",
|
|
19
|
+
"start": "node build/index.js",
|
|
20
|
+
"prepublishOnly": "npm run build"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
24
|
+
"zod": "^3.25.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/node": "^22.0.0",
|
|
28
|
+
"typescript": "^5.8.0"
|
|
29
|
+
},
|
|
30
|
+
"engines": {
|
|
31
|
+
"node": ">=18"
|
|
32
|
+
},
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "https://github.com/rishildi/ldi-process-skills.git"
|
|
36
|
+
},
|
|
37
|
+
"license": "UNLICENSED",
|
|
38
|
+
"private": false,
|
|
39
|
+
"keywords": [
|
|
40
|
+
"mcp",
|
|
41
|
+
"process-skills",
|
|
42
|
+
"agent-skills",
|
|
43
|
+
"data-platform",
|
|
44
|
+
"learn-data-insights"
|
|
45
|
+
],
|
|
46
|
+
"author": "Learn Data Insights",
|
|
47
|
+
"homepage": "https://learndatainsights.com"
|
|
48
|
+
}
|