skills 1.3.6 → 1.3.7
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 +2 -2
- package/dist/cli.mjs +42 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -210,7 +210,7 @@ Skills can be installed to any of these agents:
|
|
|
210
210
|
|-------|-----------|--------------|-------------|
|
|
211
211
|
| Amp, Kimi Code CLI, Replit | `amp`, `kimi-cli`, `replit` | `.agents/skills/` | `~/.config/agents/skills/` |
|
|
212
212
|
| Antigravity | `antigravity` | `.agent/skills/` | `~/.gemini/antigravity/skills/` |
|
|
213
|
-
| Augment | `augment` | `.augment/
|
|
213
|
+
| Augment | `augment` | `.augment/skills/` | `~/.augment/skills/` |
|
|
214
214
|
| Claude Code | `claude-code` | `.claude/skills/` | `~/.claude/skills/` |
|
|
215
215
|
| OpenClaw | `openclaw` | `skills/` | `~/.moltbot/skills/` |
|
|
216
216
|
| Cline | `cline` | `.cline/skills/` | `~/.cline/skills/` |
|
|
@@ -316,7 +316,7 @@ The CLI searches for skills in these locations within a repository:
|
|
|
316
316
|
- `skills/.system/`
|
|
317
317
|
- `.agents/skills/`
|
|
318
318
|
- `.agent/skills/`
|
|
319
|
-
- `.augment/
|
|
319
|
+
- `.augment/skills/`
|
|
320
320
|
- `.claude/skills/`
|
|
321
321
|
- `./skills/`
|
|
322
322
|
- `.cline/skills/`
|
package/dist/cli.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import "crypto";
|
|
|
17
17
|
import { fileURLToPath } from "url";
|
|
18
18
|
import * as readline from "readline";
|
|
19
19
|
import { Writable } from "stream";
|
|
20
|
-
import { access, cp, lstat, mkdir, mkdtemp, readFile, readdir, readlink, rm, stat, symlink, writeFile } from "fs/promises";
|
|
20
|
+
import { access, cp, lstat, mkdir, mkdtemp, readFile, readdir, readlink, realpath, rm, stat, symlink, writeFile } from "fs/promises";
|
|
21
21
|
var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
22
22
|
function getOwnerRepo(parsed) {
|
|
23
23
|
if (parsed.type === "local") return null;
|
|
@@ -117,12 +117,12 @@ function parseSource(input) {
|
|
|
117
117
|
ref
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
|
-
const gitlabRepoMatch = input.match(/gitlab\.com\/(
|
|
120
|
+
const gitlabRepoMatch = input.match(/gitlab\.com\/(.+?)(?:\.git)?\/?$/);
|
|
121
121
|
if (gitlabRepoMatch) {
|
|
122
|
-
const
|
|
123
|
-
return {
|
|
122
|
+
const repoPath = gitlabRepoMatch[1];
|
|
123
|
+
if (repoPath.includes("/")) return {
|
|
124
124
|
type: "gitlab",
|
|
125
|
-
url: `https://gitlab.com/${
|
|
125
|
+
url: `https://gitlab.com/${repoPath}.git`
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
const atSkillMatch = input.match(/^([^/]+)\/([^/@]+)@(.+)$/);
|
|
@@ -566,8 +566,8 @@ const agents = {
|
|
|
566
566
|
augment: {
|
|
567
567
|
name: "augment",
|
|
568
568
|
displayName: "Augment",
|
|
569
|
-
skillsDir: ".augment/
|
|
570
|
-
globalSkillsDir: join(home, ".augment/
|
|
569
|
+
skillsDir: ".augment/skills",
|
|
570
|
+
globalSkillsDir: join(home, ".augment/skills"),
|
|
571
571
|
detectInstalled: async () => {
|
|
572
572
|
return existsSync(join(home, ".augment"));
|
|
573
573
|
}
|
|
@@ -938,10 +938,21 @@ async function cleanAndCreateDirectory(path) {
|
|
|
938
938
|
} catch {}
|
|
939
939
|
await mkdir(path, { recursive: true });
|
|
940
940
|
}
|
|
941
|
+
async function resolveParentSymlinks(path) {
|
|
942
|
+
const resolved = resolve(path);
|
|
943
|
+
const dir = dirname(resolved);
|
|
944
|
+
const base = basename(resolved);
|
|
945
|
+
try {
|
|
946
|
+
return join(await realpath(dir), base);
|
|
947
|
+
} catch {
|
|
948
|
+
return resolved;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
941
951
|
async function createSymlink(target, linkPath) {
|
|
942
952
|
try {
|
|
943
953
|
const resolvedTarget = resolve(target);
|
|
944
954
|
if (resolvedTarget === resolve(linkPath)) return true;
|
|
955
|
+
if (await resolveParentSymlinks(target) === await resolveParentSymlinks(linkPath)) return true;
|
|
945
956
|
try {
|
|
946
957
|
if ((await lstat(linkPath)).isSymbolicLink()) {
|
|
947
958
|
if (resolveSymlinkTarget(linkPath, await readlink(linkPath)) === resolvedTarget) return true;
|
|
@@ -954,7 +965,7 @@ async function createSymlink(target, linkPath) {
|
|
|
954
965
|
}
|
|
955
966
|
const linkDir = dirname(linkPath);
|
|
956
967
|
await mkdir(linkDir, { recursive: true });
|
|
957
|
-
await symlink(relative(linkDir, target), linkPath, platform() === "win32" ? "junction" : void 0);
|
|
968
|
+
await symlink(relative(await resolveParentSymlinks(linkDir), target), linkPath, platform() === "win32" ? "junction" : void 0);
|
|
958
969
|
return true;
|
|
959
970
|
} catch {
|
|
960
971
|
return false;
|
|
@@ -1000,6 +1011,12 @@ async function installSkillForAgent(skill, agentType, options = {}) {
|
|
|
1000
1011
|
}
|
|
1001
1012
|
await cleanAndCreateDirectory(canonicalDir);
|
|
1002
1013
|
await copyDirectory(skill.path, canonicalDir);
|
|
1014
|
+
if (isGlobal && isUniversalAgent(agentType)) return {
|
|
1015
|
+
success: true,
|
|
1016
|
+
path: canonicalDir,
|
|
1017
|
+
canonicalPath: canonicalDir,
|
|
1018
|
+
mode: "symlink"
|
|
1019
|
+
};
|
|
1003
1020
|
if (!await createSymlink(canonicalDir, agentDir)) {
|
|
1004
1021
|
await cleanAndCreateDirectory(agentDir);
|
|
1005
1022
|
await copyDirectory(skill.path, agentDir);
|
|
@@ -1117,6 +1134,12 @@ async function installRemoteSkillForAgent(skill, agentType, options = {}) {
|
|
|
1117
1134
|
}
|
|
1118
1135
|
await cleanAndCreateDirectory(canonicalDir);
|
|
1119
1136
|
await writeFile(join(canonicalDir, "SKILL.md"), skill.content, "utf-8");
|
|
1137
|
+
if (isGlobal && isUniversalAgent(agentType)) return {
|
|
1138
|
+
success: true,
|
|
1139
|
+
path: canonicalDir,
|
|
1140
|
+
canonicalPath: canonicalDir,
|
|
1141
|
+
mode: "symlink"
|
|
1142
|
+
};
|
|
1120
1143
|
if (!await createSymlink(canonicalDir, agentDir)) {
|
|
1121
1144
|
await cleanAndCreateDirectory(agentDir);
|
|
1122
1145
|
await writeFile(join(agentDir, "SKILL.md"), skill.content, "utf-8");
|
|
@@ -1192,6 +1215,12 @@ async function installWellKnownSkillForAgent(skill, agentType, options = {}) {
|
|
|
1192
1215
|
}
|
|
1193
1216
|
await cleanAndCreateDirectory(canonicalDir);
|
|
1194
1217
|
await writeSkillFiles(canonicalDir);
|
|
1218
|
+
if (isGlobal && isUniversalAgent(agentType)) return {
|
|
1219
|
+
success: true,
|
|
1220
|
+
path: canonicalDir,
|
|
1221
|
+
canonicalPath: canonicalDir,
|
|
1222
|
+
mode: "symlink"
|
|
1223
|
+
};
|
|
1195
1224
|
if (!await createSymlink(canonicalDir, agentDir)) {
|
|
1196
1225
|
await cleanAndCreateDirectory(agentDir);
|
|
1197
1226
|
await writeSkillFiles(agentDir);
|
|
@@ -1766,7 +1795,7 @@ async function saveSelectedAgents(agents) {
|
|
|
1766
1795
|
lock.lastSelectedAgents = agents;
|
|
1767
1796
|
await writeSkillLock(lock);
|
|
1768
1797
|
}
|
|
1769
|
-
var version$1 = "1.3.
|
|
1798
|
+
var version$1 = "1.3.7";
|
|
1770
1799
|
const isCancelled = (value) => typeof value === "symbol";
|
|
1771
1800
|
async function isSourcePrivate(source) {
|
|
1772
1801
|
const ownerRepo = parseOwnerRepo(source);
|
|
@@ -2104,7 +2133,7 @@ async function handleRemoteSkill(source, url, options, spinner) {
|
|
|
2104
2133
|
for (const r of failed) M.message(` ${import_picocolors.default.red("✗")} ${r.skill} → ${r.agent}: ${import_picocolors.default.dim(r.error)}`);
|
|
2105
2134
|
}
|
|
2106
2135
|
console.log();
|
|
2107
|
-
Se(import_picocolors.default.green("Done!"));
|
|
2136
|
+
Se(import_picocolors.default.green("Done!") + import_picocolors.default.dim(" Review skills before use; they run with full agent permissions."));
|
|
2108
2137
|
await promptForFindSkills(options, targetAgents);
|
|
2109
2138
|
}
|
|
2110
2139
|
async function handleWellKnownSkills(source, url, options, spinner) {
|
|
@@ -2370,7 +2399,7 @@ async function handleWellKnownSkills(source, url, options, spinner) {
|
|
|
2370
2399
|
for (const r of failed) M.message(` ${import_picocolors.default.red("✗")} ${r.skill} → ${r.agent}: ${import_picocolors.default.dim(r.error)}`);
|
|
2371
2400
|
}
|
|
2372
2401
|
console.log();
|
|
2373
|
-
Se(import_picocolors.default.green("Done!"));
|
|
2402
|
+
Se(import_picocolors.default.green("Done!") + import_picocolors.default.dim(" Review skills before use; they run with full agent permissions."));
|
|
2374
2403
|
await promptForFindSkills(options, targetAgents);
|
|
2375
2404
|
}
|
|
2376
2405
|
async function handleDirectUrlSkillLegacy(source, url, options, spinner) {
|
|
@@ -2552,7 +2581,7 @@ async function handleDirectUrlSkillLegacy(source, url, options, spinner) {
|
|
|
2552
2581
|
for (const r of failed) M.message(` ${import_picocolors.default.red("✗")} ${r.skill} → ${r.agent}: ${import_picocolors.default.dim(r.error)}`);
|
|
2553
2582
|
}
|
|
2554
2583
|
console.log();
|
|
2555
|
-
Se(import_picocolors.default.green("Done!"));
|
|
2584
|
+
Se(import_picocolors.default.green("Done!") + import_picocolors.default.dim(" Review skills before use; they run with full agent permissions."));
|
|
2556
2585
|
await promptForFindSkills(options, targetAgents);
|
|
2557
2586
|
}
|
|
2558
2587
|
async function runAdd(args, options = {}) {
|
|
@@ -2914,7 +2943,7 @@ async function runAdd(args, options = {}) {
|
|
|
2914
2943
|
for (const r of failed) M.message(` ${import_picocolors.default.red("✗")} ${r.skill} → ${r.agent}: ${import_picocolors.default.dim(r.error)}`);
|
|
2915
2944
|
}
|
|
2916
2945
|
console.log();
|
|
2917
|
-
Se(import_picocolors.default.green("Done!"));
|
|
2946
|
+
Se(import_picocolors.default.green("Done!") + import_picocolors.default.dim(" Review skills before use; they run with full agent permissions."));
|
|
2918
2947
|
await promptForFindSkills(options, targetAgents);
|
|
2919
2948
|
} catch (error) {
|
|
2920
2949
|
if (error instanceof GitCloneError) {
|