@baitong-dev/skills-mcp 0.0.4 → 0.0.5

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.
Files changed (2) hide show
  1. package/dist/index.js +5 -29
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ const mcp_helpers_1 = require("@baitong-dev/mcp-helpers");
12
12
  // eslint-disable-next-line @typescript-eslint/no-require-imports
13
13
  const yamlFront = require('yaml-front-matter');
14
14
  const MCP_NAME = 'Skills MCP';
15
- const MCP_VERSION = '0.0.4';
15
+ const MCP_VERSION = '0.0.5';
16
16
  function getSkillsRootDir() {
17
17
  const dir = path_1.default.join(mcp_helpers_1.MCP_HOME_DIR, 'skills');
18
18
  if (!fs_1.default.existsSync(dir)) {
@@ -74,21 +74,15 @@ function registerLoadSkill(server) {
74
74
  .join(', ');
75
75
  const hint = examples.length > 0 ? ` (e.g., ${examples}, ...)` : '';
76
76
  server.registerTool('load_skill', {
77
- description: metadata.length === 0
78
- ? 'Load a specialized skill that provides domain-specific instructions and workflows. No skills are currently available.'
79
- : `Load a specialized skill that provides domain-specific instructions and workflows.
77
+ description: `Load a specialized skill that provides domain-specific instructions and workflows.
80
78
 
81
79
  When you recognize that a task matches one of the available skills listed below, use this tool to load the full skill instructions.
82
80
 
83
81
  The skill will inject detailed instructions, workflows, and access to bundled resources (scripts, references, templates) into the conversation context.
84
82
 
85
- The following skills provide specialized sets of instructions for particular tasks.
83
+ Available skills are listed in system-reminder messages in the conversation.
86
84
 
87
- Invoke this tool to load a skill when a task matches one of the available skills listed below:
88
-
89
- Available skills:
90
-
91
- ${metadata.map(skill => `- ${skill.name}: ${skill.description}`).join('\n')}`,
85
+ Invoke this tool to load a skill when a task matches one of the available skills listed.`,
92
86
  inputSchema: zod_1.default.object({
93
87
  skillName: zod_1.default.string().describe(`The name of the skill from available skills${hint}`),
94
88
  toolInfo: mcp_helpers_1.Tool.Info
@@ -116,7 +110,7 @@ ${metadata.map(skill => `- ${skill.name}: ${skill.description}`).join('\n')}`,
116
110
  ]
117
111
  };
118
112
  }
119
- // 返回skill元素据,只包含name和description
113
+ // 返回skill元数据,只包含name和description
120
114
  const skillCwd = getSkillCwd(skillName);
121
115
  const skillFilePath = getSkillFilePath(skillName);
122
116
  const json = readSkillJson(skillFilePath);
@@ -136,23 +130,6 @@ ${json.__content}`
136
130
  };
137
131
  });
138
132
  }
139
- function registerRefreshSkills(server) {
140
- server.registerTool('reload_skills', {
141
- description: `Reload skills metadata. Especially after creating a new skill.`, // 尤其在创建技能后要调用下重新加载技能
142
- inputSchema: zod_1.default.object({
143
- toolInfo: mcp_helpers_1.Tool.Info
144
- })
145
- }, async () => {
146
- return {
147
- content: [
148
- {
149
- type: 'text',
150
- text: `Skills metadata reloaded.`
151
- }
152
- ]
153
- };
154
- });
155
- }
156
133
  // 创建MCP服务器实例
157
134
  const server = new mcp_js_1.McpServer({
158
135
  name: MCP_NAME,
@@ -164,7 +141,6 @@ const server = new mcp_js_1.McpServer({
164
141
  });
165
142
  // 注册所有工具
166
143
  registerLoadSkill(server);
167
- registerRefreshSkills(server);
168
144
  async function main() {
169
145
  const transport = new stdio_js_1.StdioServerTransport();
170
146
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baitong-dev/skills-mcp",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "main": "./dist/index.js",
5
5
  "bin": {
6
6
  "@baitong-dev/skills-mcp": "./dist/index.js"
@@ -19,7 +19,7 @@
19
19
  "commander": "^14.0.3",
20
20
  "yaml-front-matter": "^4.1.1",
21
21
  "zod": "^4.3.4",
22
- "@baitong-dev/mcp-helpers": "0.0.5"
22
+ "@baitong-dev/mcp-helpers": "0.0.6"
23
23
  },
24
24
  "devDependencies": {
25
25
  "typescript": "^5.9.2"