@nano-step/skill-manager 5.0.0 → 5.0.1

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/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const MANAGER_VERSION = "5.0.0";
1
+ export declare const MANAGER_VERSION = "5.0.1";
2
2
  export interface SkillManifest {
3
3
  name: string;
4
4
  version: string;
package/dist/utils.js CHANGED
@@ -13,7 +13,7 @@ exports.writeText = writeText;
13
13
  const path_1 = __importDefault(require("path"));
14
14
  const os_1 = __importDefault(require("os"));
15
15
  const fs_extra_1 = __importDefault(require("fs-extra"));
16
- exports.MANAGER_VERSION = "5.0.0";
16
+ exports.MANAGER_VERSION = "5.0.1";
17
17
  async function detectOpenCodePaths() {
18
18
  const homeConfig = path_1.default.join(os_1.default.homedir(), ".config", "opencode");
19
19
  const cwd = process.cwd();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nano-step/skill-manager",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "CLI tool that installs and manages AI agent skills, MCP tool routing, and workflow configurations.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,6 +19,8 @@
19
19
  "keywords": [
20
20
  "nano-step",
21
21
  "opencode",
22
+ "skill",
23
+ "skill-manager",
22
24
  "mcp",
23
25
  "model-context-protocol",
24
26
  "ai",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "title": "Agent Skill Tools Cache v2.0.0",
4
- "description": "Cache file for MCP tool routing. Generated by /agent-skill-refresh command using semantic AI categorization.",
4
+ "description": "Cache file for tool routing. Generated by /skill-refresh command using semantic AI categorization.",
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "version": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "title": "Agent Skill Workflow Definition",
4
- "description": "Schema for defining prerequisite workflows in Agent Skill Manager",
4
+ "description": "Schema for defining prerequisite workflows in Skill Manager",
5
5
  "type": "object",
6
6
  "properties": {
7
7
  "enabled": {
@@ -12,7 +12,7 @@
12
12
 
13
13
  ## Automatic Retry Mechanism
14
14
 
15
- The agent-skill-manager automatically retries failed tool executions before returning errors.
15
+ The skill-manager automatically retries failed tool executions before returning errors.
16
16
 
17
17
  ### Retry Configuration
18
18
  - Maximum attempts: 3
@@ -67,7 +67,7 @@ Template:
67
67
  ```
68
68
  Error: Tool not found: <tool-id>
69
69
  Suggestions: <tool-a>, <tool-b>, <tool-c>
70
- Next: confirm the intended tool or run /agent-skill-refresh.
70
+ Next: confirm the intended tool or run /skill-refresh.
71
71
  ```
72
72
 
73
73
  ## Execution Failure Handling
@@ -113,18 +113,18 @@ Next: confirm retry with new parameters
113
113
 
114
114
  ## Cache Missing Recovery
115
115
  Symptoms:
116
- - `.opencode/agent-skill-tools.json` missing.
116
+ - `.opencode/skill-tools.json` missing.
117
117
  - Cache file invalid or unreadable.
118
118
 
119
119
  Recovery steps:
120
120
  1. Inform that cache is missing or invalid.
121
- 2. Recommend /agent-skill-refresh to regenerate.
121
+ 2. Recommend /skill-refresh to regenerate.
122
122
  3. Proceed with dynamic tool discovery if possible.
123
123
 
124
124
  Template:
125
125
  ```
126
- Cache missing or invalid at .opencode/agent-skill-tools.json
127
- Suggestion: run /agent-skill-refresh
126
+ Cache missing or invalid at .opencode/skill-tools.json
127
+ Suggestion: run /skill-refresh
128
128
  Fallback: dynamic discovery enabled
129
129
  ```
130
130
 
@@ -247,7 +247,7 @@ Decision tree (text form):
247
247
  - Yes -> request corrected params.
248
248
  - No -> continue.
249
249
  5. Is cache missing?
250
- - Yes -> recommend /agent-skill-refresh and use dynamic discovery.
250
+ - Yes -> recommend /skill-refresh and use dynamic discovery.
251
251
  - No -> continue.
252
252
  6. Unknown failure
253
253
  - Provide generic error template and ask for clarification.
@@ -6,7 +6,7 @@
6
6
 
7
7
  This skill uses **semantic categorization**:
8
8
 
9
- 1. **Tool discovery** - `/agent-skill-refresh` enumerates all tools available to the agent
9
+ 1. **Tool discovery** - `/skill-refresh` enumerates all tools available to the agent
10
10
  2. **Semantic analysis** - the AI reads each tool's **name + description**
11
11
  3. **Dynamic grouping** - tools are grouped into categories based on what they do
12
12
 
@@ -31,12 +31,12 @@ categories are **labels**, not fixed contracts, and can evolve with the tool set
31
31
 
32
32
  - Categories are **not hard-coded**
33
33
  - Category names are **derived from the tools** at refresh time
34
- - Custom MCP servers are handled automatically
35
- - The system works with any MCP configuration (MetaMCP, standalone, or custom)
34
+ - Custom tool servers are handled automatically
35
+ - The system works with any tool configuration (MetaMCP, standalone, or custom)
36
36
 
37
37
  ## Cache File (v2.0.0) - How to Read It
38
38
 
39
- The `/agent-skill-refresh` command writes a cache file using the v2.0.0 schema. This
39
+ The `/skill-refresh` command writes a cache file using the v2.0.0 schema. This
40
40
  file is the **source of truth** for the current categorization state.
41
41
 
42
42
  ### Schema Overview
@@ -3,11 +3,11 @@
3
3
  # Do not include category catalogs, result summarization, or error templates here.
4
4
 
5
5
  ## Cache Access and Reading
6
- Cache location: .opencode/agent-skill-tools.json
7
- Purpose: fast tool routing without reloading full MCP schemas.
6
+ Cache location: .opencode/skill-tools.json
7
+ Purpose: fast tool routing without reloading full tool schemas.
8
8
 
9
9
  How to read the cache:
10
- 1. Check if file exists at project root `.opencode/agent-skill-tools.json`.
10
+ 1. Check if file exists at project root `.opencode/skill-tools.json`.
11
11
  2. Parse JSON into a structured object.
12
12
  3. Validate minimal fields: version, refreshed_at, tool_count, categories.
13
13
  4. If missing or malformed, fall back to dynamic discovery.
@@ -18,10 +18,10 @@ Cache staleness heuristic:
18
18
 
19
19
  ## Cache Schema (TypeScript Interface)
20
20
  ```ts
21
- interface AgentSkillToolCache {
21
+ interface SkillToolCache {
22
22
  version: string;
23
23
  refreshed_at: string; // ISO string
24
- mcp_servers: string[];
24
+ tool_sources: string[];
25
25
  tool_count: number;
26
26
  categories: {
27
27
  [name: string]: {
@@ -156,7 +156,7 @@ params: { fullPage: true }
156
156
  ## When to Avoid Cache
157
157
  - During tool upgrades or when discrepancies are reported.
158
158
  - When a tool id from cache fails execution.
159
- - When the user references a new MCP server prefix.
159
+ - When the user references a new tool server prefix.
160
160
 
161
161
  ## Execution Prerequisites
162
162
  - Ensure selected tool exists in cache or registry.
@@ -234,7 +234,7 @@ Tool: sequentialthinking { thought: "...", thoughtNumber: 1, totalThoughts: 4, n
234
234
  ## Cache Refresh Recommendation Text
235
235
  Recommended message:
236
236
  ```
237
- Cache appears stale or missing. Run /agent-skill-refresh to rebuild tool metadata.
237
+ Cache appears stale or missing. Run /skill-refresh to rebuild tool metadata.
238
238
  ```
239
239
 
240
240
  ## Execution Output Metadata (Internal)
@@ -70,7 +70,7 @@ Each prerequisite step has:
70
70
 
71
71
  ## Session State
72
72
 
73
- Completed prerequisites are tracked in `.opencode/.agent-skill-session.json`:
73
+ Completed prerequisites are tracked in `.opencode/.skill-session.json`:
74
74
 
75
75
  ```json
76
76
  {
@@ -202,26 +202,26 @@ Also matched: 'custom-db-workflow'
202
202
 
203
203
  ## Managing Workflows
204
204
 
205
- Use `/agent-skill-workflow` command:
205
+ Use `/skill-workflow` command:
206
206
 
207
207
  ```bash
208
208
  # List all workflows
209
- /agent-skill-workflow list
209
+ /skill-workflow list
210
210
 
211
211
  # Add from template
212
- /agent-skill-workflow add --template database
212
+ /skill-workflow add --template database
213
213
 
214
214
  # Add custom workflow
215
- /agent-skill-workflow add my-workflow
215
+ /skill-workflow add my-workflow
216
216
 
217
217
  # Edit existing
218
- /agent-skill-workflow edit my-workflow
218
+ /skill-workflow edit my-workflow
219
219
 
220
220
  # Disable temporarily
221
- /agent-skill-workflow disable my-workflow
221
+ /skill-workflow disable my-workflow
222
222
 
223
223
  # Remove
224
- /agent-skill-workflow remove my-workflow
224
+ /skill-workflow remove my-workflow
225
225
  ```
226
226
 
227
227
  ## Best Practices
@@ -230,4 +230,4 @@ Use `/agent-skill-workflow` command:
230
230
  2. **Use enforce sparingly** - Only for critical safety workflows
231
231
  3. **Keep prerequisites minimal** - Each step adds latency
232
232
  4. **Mark optional steps** - Use `required: false` for nice-to-have steps
233
- 5. **Review session state** - Check `.agent-skill-session.json` if prerequisites seem stuck
233
+ 5. **Review session state** - Check `.skill-session.json` if prerequisites seem stuck
package/dist/install.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function install(): Promise<void>;
package/dist/install.js DELETED
@@ -1,35 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.install = install;
7
- const path_1 = __importDefault(require("path"));
8
- const chalk_1 = __importDefault(require("chalk"));
9
- const fs_extra_1 = __importDefault(require("fs-extra"));
10
- const utils_1 = require("./utils");
11
- async function install() {
12
- const paths = await (0, utils_1.detectOpenCodePaths)();
13
- await (0, utils_1.ensureDirExists)(paths.commandDir);
14
- await (0, utils_1.ensureDirExists)(paths.skillsDir);
15
- const skillTargetDir = path_1.default.join(paths.skillsDir, utils_1.SKILL_DIR_NAME);
16
- const commandTargetPath = path_1.default.join(paths.commandDir, "agent-skill-refresh.md");
17
- await fs_extra_1.default.copy(paths.templateSkillDir, skillTargetDir, { overwrite: true });
18
- const commandTemplate = await (0, utils_1.readText)(paths.templateCommandPath);
19
- await (0, utils_1.writeText)(commandTargetPath, commandTemplate);
20
- const agentTemplate = await (0, utils_1.readJsonFile)(paths.templateAgentPath, {});
21
- const agentConfig = await (0, utils_1.readJsonFile)(paths.agentConfigPath, {});
22
- const agents = (agentConfig.agents || {});
23
- const templateAgents = (agentTemplate.agents || agentTemplate);
24
- agentConfig.agents = { ...agents, ...templateAgents };
25
- await (0, utils_1.writeJsonFile)(paths.agentConfigPath, agentConfig);
26
- await (0, utils_1.writeJsonFile)(paths.versionFilePath, { version: utils_1.PACKAGE_VERSION, installedAt: new Date().toISOString() });
27
- const state = await (0, utils_1.getInstallationState)(paths);
28
- if (!state.skillInstalled || !state.commandInstalled || !state.agentInstalled) {
29
- throw new Error("Installation verification failed. Some files were not installed.");
30
- }
31
- if (Object.keys(agentConfig).length > 0 && Object.prototype.hasOwnProperty.call(agentConfig, utils_1.AGENT_ID)) {
32
- console.log(chalk_1.default.yellow("agent-skill-manager agent already existed; configuration was updated."));
33
- }
34
- console.log(chalk_1.default.green("Agent skill manager installed successfully."));
35
- }
package/dist/remove.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function remove(): Promise<void>;
package/dist/remove.js DELETED
@@ -1,32 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.remove = remove;
7
- const path_1 = __importDefault(require("path"));
8
- const chalk_1 = __importDefault(require("chalk"));
9
- const fs_extra_1 = __importDefault(require("fs-extra"));
10
- const utils_1 = require("./utils");
11
- async function remove() {
12
- const paths = await (0, utils_1.detectOpenCodePaths)();
13
- const skillTargetDir = path_1.default.join(paths.skillsDir, utils_1.SKILL_DIR_NAME);
14
- const commandTargetPath = path_1.default.join(paths.commandDir, "agent-skill-refresh.md");
15
- if (await fs_extra_1.default.pathExists(skillTargetDir)) {
16
- await fs_extra_1.default.remove(skillTargetDir);
17
- }
18
- if (await fs_extra_1.default.pathExists(commandTargetPath)) {
19
- await fs_extra_1.default.remove(commandTargetPath);
20
- }
21
- const agentConfig = await (0, utils_1.readJsonFile)(paths.agentConfigPath, {});
22
- const agents = (agentConfig.agents || {});
23
- if (Object.prototype.hasOwnProperty.call(agents, utils_1.AGENT_ID)) {
24
- delete agents[utils_1.AGENT_ID];
25
- agentConfig.agents = agents;
26
- await (0, utils_1.writeJsonFile)(paths.agentConfigPath, agentConfig);
27
- }
28
- if (await fs_extra_1.default.pathExists(paths.versionFilePath)) {
29
- await fs_extra_1.default.remove(paths.versionFilePath);
30
- }
31
- console.log(chalk_1.default.green("Agent skill manager removed successfully."));
32
- }
package/dist/update.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function update(): Promise<void>;
package/dist/update.js DELETED
@@ -1,53 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.update = update;
7
- const path_1 = __importDefault(require("path"));
8
- const chalk_1 = __importDefault(require("chalk"));
9
- const fs_extra_1 = __importDefault(require("fs-extra"));
10
- const utils_1 = require("./utils");
11
- async function update() {
12
- const paths = await (0, utils_1.detectOpenCodePaths)();
13
- await (0, utils_1.ensureDirExists)(paths.commandDir);
14
- await (0, utils_1.ensureDirExists)(paths.skillsDir);
15
- const skillTargetDir = path_1.default.join(paths.skillsDir, utils_1.SKILL_DIR_NAME);
16
- const commandTargetPath = path_1.default.join(paths.commandDir, "agent-skill-refresh.md");
17
- await (0, utils_1.ensureDirExists)(skillTargetDir);
18
- const state = await (0, utils_1.getInstallationState)(paths);
19
- if (state.installedVersion === utils_1.PACKAGE_VERSION) {
20
- console.log(chalk_1.default.green("Agent skill manager is already up to date."));
21
- return;
22
- }
23
- const [skillCustomized, commandCustomized] = await Promise.all([
24
- (0, utils_1.directoryDiffersFromTemplate)(skillTargetDir, paths.templateSkillDir),
25
- (0, utils_1.fileDiffersFromTemplate)(commandTargetPath, paths.templateCommandPath),
26
- ]);
27
- if (skillCustomized || commandCustomized) {
28
- console.log(chalk_1.default.yellow("Detected customized files. Backups will be created before update."));
29
- }
30
- if (await fs_extra_1.default.pathExists(skillTargetDir)) {
31
- console.log(chalk_1.default.yellow("Backing up existing skill directory before update."));
32
- const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
33
- const backupDir = `${skillTargetDir}.backup-${timestamp}.bak`;
34
- await fs_extra_1.default.copy(skillTargetDir, backupDir, { overwrite: true });
35
- }
36
- if (await fs_extra_1.default.pathExists(commandTargetPath)) {
37
- await (0, utils_1.backupFile)(commandTargetPath, "backup");
38
- }
39
- if (await fs_extra_1.default.pathExists(paths.agentConfigPath)) {
40
- await (0, utils_1.backupFile)(paths.agentConfigPath, "backup");
41
- }
42
- await fs_extra_1.default.copy(paths.templateSkillDir, skillTargetDir, { overwrite: true });
43
- const commandTemplate = await fs_extra_1.default.readFile(paths.templateCommandPath, "utf8");
44
- await fs_extra_1.default.writeFile(commandTargetPath, commandTemplate, "utf8");
45
- const agentTemplate = await (0, utils_1.readJsonFile)(paths.templateAgentPath, {});
46
- const agentConfig = await (0, utils_1.readJsonFile)(paths.agentConfigPath, {});
47
- const agents = (agentConfig.agents || {});
48
- const templateAgents = (agentTemplate.agents || agentTemplate);
49
- agentConfig.agents = { ...agents, ...templateAgents };
50
- await (0, utils_1.writeJsonFile)(paths.agentConfigPath, agentConfig);
51
- await (0, utils_1.writeJsonFile)(paths.versionFilePath, { version: utils_1.PACKAGE_VERSION, updatedAt: new Date().toISOString() });
52
- console.log(chalk_1.default.green("Agent skill manager updated successfully."));
53
- }