skill-linker 4.1.4 → 4.2.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/CHANGELOG.md +106 -0
- package/LICENSE +21 -0
- package/README.md +5 -1
- package/package.json +4 -2
- package/src/cli.js +2 -0
- package/src/commands/list.js +39 -5
- package/src/utils/agents.js +11 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [4.2.0] - 2026-06-02
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `list --skills` flag: flat-lists every individual skill across the whole
|
|
15
|
+
library (supports `--json`).
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Agent auto-detection (when `--agent` is omitted) now also detects agents by
|
|
20
|
+
their project skills directory in the current folder, not just the global
|
|
21
|
+
directory.
|
|
22
|
+
|
|
23
|
+
## [4.1.4] - 2026-06-02
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- `--skill` with a relative path (e.g. `./my-skill`) no longer creates a
|
|
28
|
+
broken, self-referential symlink; the source is resolved to an absolute
|
|
29
|
+
path before linking.
|
|
30
|
+
- `--from` with a `/tree/<branch>/<path>` URL now actually clones that
|
|
31
|
+
branch instead of silently cloning the default branch.
|
|
32
|
+
|
|
33
|
+
## [4.1.3] - 2026-06-02
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- Rewrote the README to be newcomer-friendly: explains what a Skill is,
|
|
38
|
+
adds a copy-paste "golden" example, documents `--agent` auto-detection,
|
|
39
|
+
multi-skill subpath installs, and manual uninstall.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- Corrected stale `install` usage docs that still marked `--skill` as
|
|
44
|
+
required and used the wrong `list --repo` name format.
|
|
45
|
+
|
|
46
|
+
## [4.1.2] - 2026-06-02
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
|
|
50
|
+
- Unit tests (`node --test`) for GitHub URL parsing and file-system utils.
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- `--skill` is now optional: provide either `--skill <path>` or
|
|
55
|
+
`--from <url>` (at least one required).
|
|
56
|
+
- `install` exits with a non-zero status when one or more links fail, so
|
|
57
|
+
automation can detect partial failures.
|
|
58
|
+
|
|
59
|
+
### Fixed
|
|
60
|
+
|
|
61
|
+
- `createSymlink` refuses to overwrite a real (non-symlink) file or
|
|
62
|
+
directory, preventing silent data loss on `--yes` overwrite.
|
|
63
|
+
|
|
64
|
+
### Removed
|
|
65
|
+
|
|
66
|
+
- Deleted the obsolete `legacy-link-skill.sh` and a stale duplicate
|
|
67
|
+
`SKILL.md` at the repo root.
|
|
68
|
+
|
|
69
|
+
## [4.1.1] - 2026-02-26
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
|
|
73
|
+
- Agent skill definition so the tool can install itself.
|
|
74
|
+
|
|
75
|
+
## [4.1.0] - 2026-02-26
|
|
76
|
+
|
|
77
|
+
### Added
|
|
78
|
+
|
|
79
|
+
- Release SOP document and `release.sh` helper script.
|
|
80
|
+
|
|
81
|
+
## [4.0.4] - 2025
|
|
82
|
+
|
|
83
|
+
### Fixed
|
|
84
|
+
|
|
85
|
+
- Corrected the OpenCode global skills path to `~/.config/opencode/skills/`.
|
|
86
|
+
|
|
87
|
+
## [4.0.0] - 2025
|
|
88
|
+
|
|
89
|
+
### Changed
|
|
90
|
+
|
|
91
|
+
- **Breaking:** removed interactive mode; the tool is now CLI-only.
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
|
|
95
|
+
- Agent alias support for common names (e.g. `claude`, `gh-copilot`).
|
|
96
|
+
- Shallow clone and rebase for faster git operations.
|
|
97
|
+
|
|
98
|
+
[Unreleased]: https://github.com/raybird/skill-linker/compare/v4.2.0...HEAD
|
|
99
|
+
[4.2.0]: https://github.com/raybird/skill-linker/compare/v4.1.4...v4.2.0
|
|
100
|
+
[4.1.4]: https://github.com/raybird/skill-linker/compare/v4.1.3...v4.1.4
|
|
101
|
+
[4.1.3]: https://github.com/raybird/skill-linker/compare/v4.1.2...v4.1.3
|
|
102
|
+
[4.1.2]: https://github.com/raybird/skill-linker/compare/v4.1.1...v4.1.2
|
|
103
|
+
[4.1.1]: https://github.com/raybird/skill-linker/compare/v4.1.0...v4.1.1
|
|
104
|
+
[4.1.0]: https://github.com/raybird/skill-linker/compare/v4.0.4...v4.1.0
|
|
105
|
+
[4.0.4]: https://github.com/raybird/skill-linker/compare/v4.0.0...v4.0.4
|
|
106
|
+
[4.0.0]: https://github.com/raybird/skill-linker/compare/v3.0.8...v4.0.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Raybird
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -82,7 +82,7 @@ Options:
|
|
|
82
82
|
|
|
83
83
|
> `--skill` 與 `--from` 至少要提供一個(兩者皆可省略其一)。
|
|
84
84
|
>
|
|
85
|
-
> **`--agent` 省略時**:會自動安裝到所有「已偵測到」的 Agent ——
|
|
85
|
+
> **`--agent` 省略時**:會自動安裝到所有「已偵測到」的 Agent —— 也就是其**全域目錄**(如 `~/.claude/skills`)或**當前專案目錄**(如 `./.cursor/skills`)已存在的工具。
|
|
86
86
|
|
|
87
87
|
範例:
|
|
88
88
|
|
|
@@ -107,6 +107,7 @@ Usage: skill-linker list [options]
|
|
|
107
107
|
|
|
108
108
|
Options:
|
|
109
109
|
-r, --repo <name> 指定 Repository 名稱(格式為 owner/repo)
|
|
110
|
+
--skills 平鋪列出整個 Library 中的每一個 skill
|
|
110
111
|
--json JSON 輸出格式
|
|
111
112
|
```
|
|
112
113
|
|
|
@@ -116,6 +117,9 @@ Options:
|
|
|
116
117
|
# 列出 Library 中所有 Repos
|
|
117
118
|
npx skill-linker list
|
|
118
119
|
|
|
120
|
+
# 平鋪列出所有 repo 底下的每一個 skill(owner/repo/skill)
|
|
121
|
+
npx skill-linker list --skills
|
|
122
|
+
|
|
119
123
|
# 列出特定 Repo 的 Skills(名稱為 owner/repo)
|
|
120
124
|
npx skill-linker list --repo anthropics/skills
|
|
121
125
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skill-linker",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"description": "CLI to link AI Agent Skills to various agents (Claude, Copilot, Antigravity, Cursor, etc.)",
|
|
5
5
|
"main": "bin/cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -41,6 +41,8 @@
|
|
|
41
41
|
"bin/",
|
|
42
42
|
"src/",
|
|
43
43
|
"skills/",
|
|
44
|
-
"README.md"
|
|
44
|
+
"README.md",
|
|
45
|
+
"CHANGELOG.md",
|
|
46
|
+
"LICENSE"
|
|
45
47
|
]
|
|
46
48
|
}
|
package/src/cli.js
CHANGED
|
@@ -42,10 +42,12 @@ program
|
|
|
42
42
|
.command("list")
|
|
43
43
|
.description("List available skills in library")
|
|
44
44
|
.option("-r, --repo <name>", "Repository name to list skills from")
|
|
45
|
+
.option("--skills", "List every individual skill across the whole library")
|
|
45
46
|
.option("--json", "Output as JSON")
|
|
46
47
|
.action(async (options) => {
|
|
47
48
|
await list({
|
|
48
49
|
repo: options.repo,
|
|
50
|
+
skills: options.skills || false,
|
|
49
51
|
json: options.json || false,
|
|
50
52
|
});
|
|
51
53
|
});
|
package/src/commands/list.js
CHANGED
|
@@ -2,6 +2,7 @@ const chalk = require("chalk");
|
|
|
2
2
|
const path = require("path");
|
|
3
3
|
const {
|
|
4
4
|
findRepos,
|
|
5
|
+
findSkills,
|
|
5
6
|
listDirectories,
|
|
6
7
|
dirExists,
|
|
7
8
|
} = require("../utils/file-system");
|
|
@@ -11,16 +12,19 @@ const { DEFAULT_LIB_PATH } = require("../utils/git");
|
|
|
11
12
|
* List command - shows repos and skills (CLI mode only)
|
|
12
13
|
* @param {Object} options - Command options
|
|
13
14
|
* @param {string} [options.repo] - Repository name to list
|
|
15
|
+
* @param {boolean} [options.skills] - List individual skills across the library
|
|
14
16
|
* @param {boolean} [options.json] - Output as JSON
|
|
17
|
+
* @param {string} [options.libPath] - Library root (defaults to DEFAULT_LIB_PATH)
|
|
15
18
|
*/
|
|
16
19
|
async function list(options = {}) {
|
|
17
20
|
const repoName = options.repo;
|
|
18
21
|
const outputJson = options.json || false;
|
|
22
|
+
const libPath = options.libPath || DEFAULT_LIB_PATH;
|
|
19
23
|
|
|
20
|
-
if (!dirExists(
|
|
24
|
+
if (!dirExists(libPath)) {
|
|
21
25
|
console.error(
|
|
22
26
|
chalk.red("[ERROR]"),
|
|
23
|
-
`Skill library not found: ${
|
|
27
|
+
`Skill library not found: ${libPath}`,
|
|
24
28
|
);
|
|
25
29
|
console.log(
|
|
26
30
|
chalk.blue("[INFO]"),
|
|
@@ -29,12 +33,12 @@ async function list(options = {}) {
|
|
|
29
33
|
process.exit(1);
|
|
30
34
|
}
|
|
31
35
|
|
|
32
|
-
const repos = findRepos(
|
|
36
|
+
const repos = findRepos(libPath);
|
|
33
37
|
|
|
34
38
|
if (repos.length === 0) {
|
|
35
39
|
console.log(
|
|
36
40
|
chalk.yellow("[WARNING]"),
|
|
37
|
-
`No repos found in ${
|
|
41
|
+
`No repos found in ${libPath}`,
|
|
38
42
|
);
|
|
39
43
|
console.log(
|
|
40
44
|
chalk.blue("[INFO]"),
|
|
@@ -43,6 +47,36 @@ async function list(options = {}) {
|
|
|
43
47
|
return;
|
|
44
48
|
}
|
|
45
49
|
|
|
50
|
+
// Flat listing: every individual skill across the whole library.
|
|
51
|
+
// Only applies when no specific --repo was requested.
|
|
52
|
+
if (options.skills && !repoName) {
|
|
53
|
+
const skills = findSkills(libPath);
|
|
54
|
+
|
|
55
|
+
if (outputJson) {
|
|
56
|
+
console.log(
|
|
57
|
+
JSON.stringify(
|
|
58
|
+
skills.map((s) => ({ name: s.name, path: s.path })),
|
|
59
|
+
null,
|
|
60
|
+
2,
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
console.log("");
|
|
67
|
+
console.log(
|
|
68
|
+
chalk.blue("[INFO]"),
|
|
69
|
+
`Skills in library (${libPath}):`,
|
|
70
|
+
);
|
|
71
|
+
console.log("");
|
|
72
|
+
skills.forEach((skill, index) => {
|
|
73
|
+
console.log(` ${index + 1}. ${chalk.cyan(skill.name)}`);
|
|
74
|
+
console.log(` ${chalk.dim(skill.path)}`);
|
|
75
|
+
});
|
|
76
|
+
console.log("");
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
46
80
|
// CLI mode: use provided repo name
|
|
47
81
|
if (repoName) {
|
|
48
82
|
const selectedRepo = repos.find(
|
|
@@ -134,7 +168,7 @@ async function list(options = {}) {
|
|
|
134
168
|
console.log("");
|
|
135
169
|
console.log(
|
|
136
170
|
chalk.blue("[INFO]"),
|
|
137
|
-
`Repositories in library (${
|
|
171
|
+
`Repositories in library (${libPath}):`,
|
|
138
172
|
);
|
|
139
173
|
console.log("");
|
|
140
174
|
|
package/src/utils/agents.js
CHANGED
|
@@ -74,15 +74,22 @@ function findAgentIndex(nameOrAlias) {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
|
-
* Detect which agents are installed
|
|
77
|
+
* Detect which agents are installed / in use.
|
|
78
|
+
*
|
|
79
|
+
* An agent counts as detected if EITHER its global skills directory exists,
|
|
80
|
+
* OR its project skills directory exists under the given working directory.
|
|
81
|
+
* The latter lets project-only setups be auto-detected when --agent is omitted.
|
|
82
|
+
*
|
|
83
|
+
* @param {string} [cwd] - Working directory to check project dirs against
|
|
78
84
|
* @returns {Array} List of detected agent indices
|
|
79
85
|
*/
|
|
80
|
-
function detectInstalledAgents() {
|
|
86
|
+
function detectInstalledAgents(cwd = process.cwd()) {
|
|
81
87
|
const installed = [];
|
|
82
88
|
|
|
83
89
|
AGENTS.forEach((agent, index) => {
|
|
84
|
-
|
|
85
|
-
|
|
90
|
+
const globalExists = fs.existsSync(agent.globalDir);
|
|
91
|
+
const projectExists = fs.existsSync(path.join(cwd, agent.projectDir));
|
|
92
|
+
if (globalExists || projectExists) {
|
|
86
93
|
installed.push(index);
|
|
87
94
|
}
|
|
88
95
|
});
|