reskill 0.16.0 → 0.17.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/README.md +0 -3
- package/README.zh-CN.md +0 -3
- package/dist/cli/commands/__integration__/helpers.d.ts +131 -0
- package/dist/cli/commands/__integration__/helpers.d.ts.map +1 -0
- package/dist/cli/commands/completion.d.ts.map +1 -1
- package/dist/cli/commands/index.d.ts +0 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/init.d.ts +15 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/install.d.ts +10 -11
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/index.js +345 -354
- package/dist/core/config-loader.d.ts +63 -15
- package/dist/core/config-loader.d.ts.map +1 -1
- package/dist/core/git-resolver.d.ts +1 -2
- package/dist/core/git-resolver.d.ts.map +1 -1
- package/dist/core/skill-manager.d.ts +0 -8
- package/dist/core/skill-manager.d.ts.map +1 -1
- package/dist/index.js +44 -65
- package/dist/types/index.d.ts +1 -9
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/cli/commands/link.d.ts +0 -5
- package/dist/cli/commands/link.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -42,7 +42,6 @@ reskill offers **fine-grained skill management and synchronization**:
|
|
|
42
42
|
|
|
43
43
|
- **Declarative config** — `skills.json` clearly expresses project dependencies
|
|
44
44
|
- **Global cache** — Avoid redundant downloads, speed up installation
|
|
45
|
-
- **Local development** — Use `link` to develop and debug skills locally
|
|
46
45
|
|
|
47
46
|
### Engineering-Grade Management
|
|
48
47
|
|
|
@@ -151,8 +150,6 @@ npx reskill@latest list
|
|
|
151
150
|
| `npx reskill@latest update [skill]` | Update all or specific skill |
|
|
152
151
|
| `npx reskill@latest outdated` | Check for outdated skills |
|
|
153
152
|
| `npx reskill@latest uninstall <skill>` | Remove a skill |
|
|
154
|
-
| `npx reskill@latest link <path>` | Link local skill for development |
|
|
155
|
-
| `npx reskill@latest unlink <skill>` | Unlink a local skill |
|
|
156
153
|
| `npx reskill@latest completion install` | Install shell tab completion |
|
|
157
154
|
|
|
158
155
|
Run `npx reskill@latest <command> --help` for detailed options.
|
package/README.zh-CN.md
CHANGED
|
@@ -42,7 +42,6 @@ reskill 提供**精细化的 skill 管理和同步方案**:
|
|
|
42
42
|
|
|
43
43
|
- **声明式配置** — `skills.json` 清晰表达项目依赖
|
|
44
44
|
- **全局缓存** — 避免重复下载,加速安装
|
|
45
|
-
- **本地开发** — 使用 `link` 链接本地 skill 进行开发调试
|
|
46
45
|
|
|
47
46
|
### 工程化项目管理
|
|
48
47
|
|
|
@@ -152,8 +151,6 @@ npx reskill@latest list
|
|
|
152
151
|
| `npx reskill@latest update [skill]` | 更新所有或指定 skill |
|
|
153
152
|
| `npx reskill@latest outdated` | 检查过期的 skills |
|
|
154
153
|
| `npx reskill@latest uninstall <skill>` | 卸载 skill |
|
|
155
|
-
| `npx reskill@latest link <path>` | 链接本地 skill(开发用) |
|
|
156
|
-
| `npx reskill@latest unlink <skill>` | 取消链接本地 skill |
|
|
157
154
|
| `npx reskill@latest completion install` | 安装 Shell Tab 补全 |
|
|
158
155
|
|
|
159
156
|
运行 `npx reskill@latest <command> --help` 查看详细选项。
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Integration test helpers
|
|
3
|
+
*
|
|
4
|
+
* Shared utilities for CLI integration tests
|
|
5
|
+
*/
|
|
6
|
+
export declare const PROJECT_ROOT: string;
|
|
7
|
+
export declare const CLI: string;
|
|
8
|
+
export declare const TEST_SKILL_REF = "github:anthropics/anthropic-quickstarts/skills/computer-use@main";
|
|
9
|
+
export declare const TEST_SKILL_NAME = "computer-use";
|
|
10
|
+
export interface CliResult {
|
|
11
|
+
stdout: string;
|
|
12
|
+
stderr: string;
|
|
13
|
+
exitCode: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Execute CLI command and return result
|
|
17
|
+
*
|
|
18
|
+
* @param args - CLI arguments
|
|
19
|
+
* @param cwd - Working directory (defaults to process.cwd())
|
|
20
|
+
* @param env - Additional environment variables
|
|
21
|
+
*/
|
|
22
|
+
export declare function runCli(args: string, cwd?: string, env?: Record<string, string>): CliResult;
|
|
23
|
+
/**
|
|
24
|
+
* Get combined output (stdout + stderr) for assertions
|
|
25
|
+
*/
|
|
26
|
+
export declare function getOutput(result: CliResult): string;
|
|
27
|
+
/**
|
|
28
|
+
* Create a temporary directory for testing
|
|
29
|
+
*
|
|
30
|
+
* @returns Path to the created temporary directory
|
|
31
|
+
*/
|
|
32
|
+
export declare function createTempDir(): string;
|
|
33
|
+
/**
|
|
34
|
+
* Remove a directory recursively
|
|
35
|
+
*
|
|
36
|
+
* @param dir - Directory path to remove
|
|
37
|
+
*/
|
|
38
|
+
export declare function removeTempDir(dir: string): void;
|
|
39
|
+
/**
|
|
40
|
+
* Create a mock HOME directory for global installation tests
|
|
41
|
+
*
|
|
42
|
+
* @returns Path to the mock home directory
|
|
43
|
+
*/
|
|
44
|
+
export declare function createMockHome(): string;
|
|
45
|
+
/**
|
|
46
|
+
* Create a local git repository with a mock skill
|
|
47
|
+
*
|
|
48
|
+
* This creates a real git repo that can be referenced via file:// protocol
|
|
49
|
+
*
|
|
50
|
+
* @param dir - Parent directory to create the repo in
|
|
51
|
+
* @param name - Repository/skill name
|
|
52
|
+
* @param version - Skill version (default: "1.0.0")
|
|
53
|
+
* @returns Git URL for the repo (file:// protocol)
|
|
54
|
+
*/
|
|
55
|
+
export declare function createLocalGitRepo(dir: string, name: string, version?: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* Update a local git repo with a new version
|
|
58
|
+
*
|
|
59
|
+
* @param repoUrl - file:// URL of the repo
|
|
60
|
+
* @param newVersion - New version string
|
|
61
|
+
*/
|
|
62
|
+
export declare function updateLocalGitRepo(repoUrl: string, newVersion: string): void;
|
|
63
|
+
/**
|
|
64
|
+
* Create a mock skill directory for testing (without git)
|
|
65
|
+
*
|
|
66
|
+
* Use this for tests that manually set up skill directories
|
|
67
|
+
*
|
|
68
|
+
* @param dir - Parent directory to create the skill in
|
|
69
|
+
* @param name - Skill name
|
|
70
|
+
* @param version - Skill version (default: "1.0.0")
|
|
71
|
+
* @returns Path to the created skill directory
|
|
72
|
+
*/
|
|
73
|
+
export declare function createMockSkill(dir: string, name: string, version?: string): string;
|
|
74
|
+
/**
|
|
75
|
+
* Update a mock skill to a new version
|
|
76
|
+
*
|
|
77
|
+
* @param skillDir - Path to the skill directory
|
|
78
|
+
* @param newVersion - New version string
|
|
79
|
+
*/
|
|
80
|
+
export declare function updateMockSkillVersion(skillDir: string, newVersion: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* Create a skills.json configuration file
|
|
83
|
+
*
|
|
84
|
+
* @param dir - Directory to create the file in
|
|
85
|
+
* @param skills - Skills to include in the configuration
|
|
86
|
+
* @param defaults - Default options
|
|
87
|
+
*/
|
|
88
|
+
export declare function setupSkillsJson(dir: string, skills?: Record<string, string>, defaults?: {
|
|
89
|
+
installDir?: string;
|
|
90
|
+
installMode?: 'symlink' | 'copy';
|
|
91
|
+
targetAgents?: string[];
|
|
92
|
+
}): void;
|
|
93
|
+
/**
|
|
94
|
+
* Read skills.json configuration
|
|
95
|
+
*
|
|
96
|
+
* @param dir - Directory containing skills.json
|
|
97
|
+
* @returns Parsed configuration object
|
|
98
|
+
*/
|
|
99
|
+
export declare function readSkillsJson(dir: string): {
|
|
100
|
+
skills: Record<string, string>;
|
|
101
|
+
defaults: Record<string, unknown>;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* Check if a path is a symbolic link
|
|
105
|
+
*
|
|
106
|
+
* @param linkPath - Path to check
|
|
107
|
+
* @returns true if path is a symlink
|
|
108
|
+
*/
|
|
109
|
+
export declare function isSymlink(linkPath: string): boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Check if a path exists (file or directory)
|
|
112
|
+
*
|
|
113
|
+
* @param targetPath - Path to check
|
|
114
|
+
* @returns true if path exists
|
|
115
|
+
*/
|
|
116
|
+
export declare function pathExists(targetPath: string): boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Read file contents
|
|
119
|
+
*
|
|
120
|
+
* @param filePath - Path to file
|
|
121
|
+
* @returns File contents as string
|
|
122
|
+
*/
|
|
123
|
+
export declare function readFile(filePath: string): string;
|
|
124
|
+
/**
|
|
125
|
+
* Get symlink target
|
|
126
|
+
*
|
|
127
|
+
* @param linkPath - Path to symlink
|
|
128
|
+
* @returns Resolved target path
|
|
129
|
+
*/
|
|
130
|
+
export declare function getSymlinkTarget(linkPath: string): string;
|
|
131
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/__integration__/helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAWH,eAAO,MAAM,YAAY,QAAyC,CAAC;AACnE,eAAO,MAAM,GAAG,QAAyD,CAAC;AAG1E,eAAO,MAAM,cAAc,qEAAqE,CAAC;AACjG,eAAO,MAAM,eAAe,iBAAiB,CAAC;AAM9C,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EACZ,GAAG,CAAC,EAAE,MAAM,EACZ,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC3B,SAAS,CAuBX;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAEnD;AAMD;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED;;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AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2IpC;;GAEG;AACH,eAAO,MAAM,iBAAiB,SA2D1B,CAAC;AAEL;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAO/C;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -2,7 +2,6 @@ export { completionCommand, maybeHandleCompletion } from './completion.js';
|
|
|
2
2
|
export { infoCommand } from './info.js';
|
|
3
3
|
export { initCommand } from './init.js';
|
|
4
4
|
export { installCommand } from './install.js';
|
|
5
|
-
export { linkCommand, unlinkCommand } from './link.js';
|
|
6
5
|
export { listCommand } from './list.js';
|
|
7
6
|
export { outdatedCommand } from './outdated.js';
|
|
8
7
|
export { uninstallCommand } from './uninstall.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
/**
|
|
3
3
|
* init command - Initialize skills.json configuration
|
|
4
|
+
*
|
|
5
|
+
* Creates a new skills.json file in the current directory with default settings.
|
|
6
|
+
* Will not overwrite an existing skills.json file.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```bash
|
|
10
|
+
* # Initialize with defaults
|
|
11
|
+
* reskill init
|
|
12
|
+
*
|
|
13
|
+
* # Initialize with custom install directory
|
|
14
|
+
* reskill init -d my-skills
|
|
15
|
+
*
|
|
16
|
+
* # Skip prompts (for CI/scripts)
|
|
17
|
+
* reskill init -y
|
|
18
|
+
* ```
|
|
4
19
|
*/
|
|
5
20
|
export declare const initCommand: Command;
|
|
6
21
|
export default initCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2CpC;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,WAAW,SAsBpB,CAAC;AAEL,eAAe,WAAW,CAAC"}
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { Command } from 'commander';
|
|
2
2
|
/**
|
|
3
|
-
* install command - Install a skill
|
|
3
|
+
* install command - Install a skill or all skills from skills.json
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
5
|
+
* Installation Flow:
|
|
6
|
+
* 1. Resolve target agents (CLI > stored > detected > prompt)
|
|
7
|
+
* 2. Resolve installation scope (global vs project)
|
|
8
|
+
* 3. Resolve installation mode (symlink vs copy)
|
|
9
|
+
* 4. Execute installation
|
|
10
|
+
* 5. Save defaults for future installs
|
|
9
11
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* 3. Select installation scope (project/global)
|
|
14
|
-
* 4. Select installation method (symlink/copy)
|
|
15
|
-
* 5. Confirm and execute
|
|
12
|
+
* Behavior:
|
|
13
|
+
* - Single skill install: Prompts for agents/mode (stored config as defaults)
|
|
14
|
+
* - Reinstall all (no args): Uses stored config directly, no confirmation
|
|
16
15
|
*/
|
|
17
16
|
export declare const installCommand: Command;
|
|
18
17
|
export default installCommand;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/install.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkjBpC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,SA6DvB,CAAC;AAEL,eAAe,cAAc,CAAC"}
|