skill-land 1.4.0 → 1.6.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/README.md +7 -2
- package/agents.json +9 -1
- package/package.json +1 -1
- package/skill-land.mjs +104 -16
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ npx skill-land <source> --for <agent> [options]
|
|
|
61
61
|
| `--project` | install into `./` instead of the user-global directory |
|
|
62
62
|
| `--dry-run` | resolve and report, write nothing |
|
|
63
63
|
| `--verify` | check an existing install, write nothing |
|
|
64
|
-
| `--discover` | also ask a fresh agent session to list its skills (claude-code, codex, antigravity) |
|
|
64
|
+
| `--discover` | also ask a fresh agent session to list its skills (claude-code, codex, gemini-cli, antigravity) |
|
|
65
65
|
| `--skip-security` | skip the SkillSpector scan (acknowledged, not silent) |
|
|
66
66
|
| `--strict` | refuse to install anything SkillSpector flags |
|
|
67
67
|
| `--list` | show known agents and their directories |
|
|
@@ -148,10 +148,11 @@ skill-land Magithar/SKILLmama --for codex,antigravity --discover
|
|
|
148
148
|
| Agent | Listing used | Kind |
|
|
149
149
|
|---|---|---|
|
|
150
150
|
| Antigravity | `agy -p /skills` | a real skill list |
|
|
151
|
+
| Gemini CLI | `gemini skills list` | a real skill list, with enabled/disabled state |
|
|
151
152
|
| Codex | `codex exec "list your skills"` | asks the model |
|
|
152
153
|
| Claude Code | `claude -p "list your skills"` | asks the model |
|
|
153
154
|
|
|
154
|
-
Each was tested by planting a uniquely named canary skill and confirming it appeared. Every other
|
|
155
|
+
Each was tested by planting a uniquely named canary skill and confirming it appeared, then with real skills from git. A skill that is listed but switched off (Gemini CLI prints `[Disabled]`) fails: on disk and listed is not the same as loaded. Every other
|
|
155
156
|
agent reports `NOT CHECKED`, never a pass: an unknown is not a success. A missing binary or a
|
|
156
157
|
timeout is also `NOT CHECKED`; only a completed listing that lacks the skill fails the run.
|
|
157
158
|
|
|
@@ -363,3 +364,7 @@ global install, which is what drives the warning note.
|
|
|
363
364
|
Install and verify only. No registry, no publishing, no per-platform content
|
|
364
365
|
transforms. One `SKILL.md` works across all of these agents; the failure mode here is
|
|
365
366
|
a wrong-path bug, not a content-format problem.
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
Made by [@magithar](https://x.com/magithar). Follow along for new skills and tools.
|
package/agents.json
CHANGED
|
@@ -77,7 +77,15 @@
|
|
|
77
77
|
"project": ".agents/skills",
|
|
78
78
|
"file": "SKILL.md",
|
|
79
79
|
"restart": false,
|
|
80
|
-
"broken": true
|
|
80
|
+
"broken": true,
|
|
81
|
+
"discover": {
|
|
82
|
+
"cmd": [
|
|
83
|
+
"gemini",
|
|
84
|
+
"skills",
|
|
85
|
+
"list"
|
|
86
|
+
],
|
|
87
|
+
"deterministic": true
|
|
88
|
+
}
|
|
81
89
|
},
|
|
82
90
|
"cursor": {
|
|
83
91
|
"display": "Cursor",
|
package/package.json
CHANGED
package/skill-land.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { execFileSync } from "child_process";
|
|
|
13
13
|
import { createHash } from "crypto";
|
|
14
14
|
import {
|
|
15
15
|
cpSync, existsSync, mkdirSync, mkdtempSync, readdirSync,
|
|
16
|
-
readFileSync, realpathSync, rmSync, statSync,
|
|
16
|
+
readFileSync, realpathSync, rmSync, statSync, writeFileSync,
|
|
17
17
|
} from "fs";
|
|
18
18
|
import { homedir, tmpdir } from "os";
|
|
19
19
|
import { basename, dirname, join, relative, resolve } from "path";
|
|
@@ -28,6 +28,17 @@ const fmtBytes = (n) => n < 1024 ? `${n} B`
|
|
|
28
28
|
: n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} kB` : `${(n / 1024 / 1024).toFixed(1)} MB`;
|
|
29
29
|
const die = (msg) => { console.error(`\n error ${msg}\n`); process.exit(1); };
|
|
30
30
|
|
|
31
|
+
// Status words in color for a person at a terminal; piped output and tests get
|
|
32
|
+
// the plain text, so anything matching on "OK" or "FAIL" is unaffected.
|
|
33
|
+
const COLOR = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
34
|
+
const TRUECOLOR = /truecolor|24bit/i.test(process.env.COLORTERM || "");
|
|
35
|
+
const paintIf = (code) => (s) => COLOR ? `\x1b[${code}m${s}\x1b[0m` : s;
|
|
36
|
+
const emerald = paintIf(TRUECOLOR ? "38;2;89;195;120" : "38;5;78"); // brand emerald #59C378
|
|
37
|
+
const red = paintIf(TRUECOLOR ? "38;2;239;83;80" : "38;5;203");
|
|
38
|
+
const status = (ok) => ok ? emerald("OK ") : red("FAIL");
|
|
39
|
+
// Paths under the home directory read as ~/..., the way people type them.
|
|
40
|
+
const tilde = (p) => p === homedir() || p.startsWith(homedir() + "/") ? "~" + p.slice(homedir().length) : p;
|
|
41
|
+
|
|
31
42
|
// ---------------------------------------------------------------- source
|
|
32
43
|
|
|
33
44
|
// Accepts: owner/repo | https://github.com/owner/repo | raw .md URL | local path
|
|
@@ -377,7 +388,7 @@ function runSkill(skillPath, root, quiet) {
|
|
|
377
388
|
if (quiet) {
|
|
378
389
|
process.stdout.write(` ${(fm.name || basename(dirname(skillPath))).slice(0, 28).padEnd(30)}`);
|
|
379
390
|
} else {
|
|
380
|
-
console.log(`\n source ${src.label}`);
|
|
391
|
+
console.log(`\n source ${tilde(src.label)}`);
|
|
381
392
|
console.log(` skill ${fm.name || "(no frontmatter name)"} [${files.length} file${files.length === 1 ? "" : "s"}, ${fmtBytes(totalBytes)}, SKILL.md sha ${files[0].hash.slice(0,12)}]`);
|
|
382
393
|
console.log(` from ${skillPath.replace(root, ".")}`);
|
|
383
394
|
}
|
|
@@ -426,7 +437,7 @@ function runSkill(skillPath, root, quiet) {
|
|
|
426
437
|
targetCount++;
|
|
427
438
|
if (dryRun) {
|
|
428
439
|
if (quiet) continue;
|
|
429
|
-
console.log(` would write ${destDir} (${files.length} file${files.length === 1 ? "" : "s"}, ${fmtBytes(totalBytes)})`);
|
|
440
|
+
console.log(` would write ${tilde(destDir)} (${files.length} file${files.length === 1 ? "" : "s"}, ${fmtBytes(totalBytes)})`);
|
|
430
441
|
continue;
|
|
431
442
|
}
|
|
432
443
|
|
|
@@ -481,10 +492,10 @@ function runSkill(skillPath, root, quiet) {
|
|
|
481
492
|
// absent file buries the directories that are partially installed,
|
|
482
493
|
// which are the ones worth looking at.
|
|
483
494
|
if (r.absent) {
|
|
484
|
-
console.log(` FAIL ${r.destDir} not installed${verifyOnly ? " (verify only)" : ""}`);
|
|
495
|
+
console.log(` ${red("FAIL")} ${tilde(r.destDir)} not installed${verifyOnly ? " (verify only)" : ""}`);
|
|
485
496
|
continue;
|
|
486
497
|
}
|
|
487
|
-
console.log(` ${r.passed
|
|
498
|
+
console.log(` ${status(r.passed)} ${tilde(r.destDir)} ${n}/${files.length} file${files.length === 1 ? "" : "s"}${verifyOnly ? " (verify only)" : ""}`);
|
|
488
499
|
for (const b of r.badFiles.slice(0, 10)) {
|
|
489
500
|
console.log(` x ${b.rel}`);
|
|
490
501
|
for (const c of b.checks) if (!c.pass) console.log(` ${c.name}: ${c.detail}`);
|
|
@@ -507,11 +518,11 @@ function runSkill(skillPath, root, quiet) {
|
|
|
507
518
|
if (quiet) {
|
|
508
519
|
const nf = `${files.length} file${files.length === 1 ? "" : "s"}`;
|
|
509
520
|
if (dryRun) console.log(`-- ${targetCount} target${targetCount === 1 ? "" : "s"}, ${nf} (dry run)`);
|
|
510
|
-
else console.log(`${skillFailed
|
|
521
|
+
else console.log(`${status(!skillFailed)} ${nf}`);
|
|
511
522
|
// Per directory, not per file. Flattening 3 paths x 148 files into one list
|
|
512
523
|
// buries the only thing that is actionable: which directory is wrong, and how.
|
|
513
524
|
for (const b of baseSummaries.filter((x) => !x.passed)) {
|
|
514
|
-
console.log(` x ${b.destDir} ${b.absent ? "not installed" : `${b.n}/${files.length} files`}`);
|
|
525
|
+
console.log(` x ${tilde(b.destDir)} ${b.absent ? "not installed" : `${b.n}/${files.length} files`}`);
|
|
515
526
|
}
|
|
516
527
|
}
|
|
517
528
|
return { name: skillName, fmName: fm.name, failed: skillFailed, skipped: skillSkipped };
|
|
@@ -554,8 +565,11 @@ function discover(agent, names) {
|
|
|
554
565
|
let missing = 0;
|
|
555
566
|
for (const n of names) {
|
|
556
567
|
const found = hasName(out, n);
|
|
557
|
-
|
|
558
|
-
|
|
568
|
+
// Listed but switched off is not loaded. Gemini CLI prints `name [Disabled]`.
|
|
569
|
+
const disabled = found && new RegExp(`(^|\\s)${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")} \\[Disabled\\]`, "m").test(out);
|
|
570
|
+
const ok = found && !disabled;
|
|
571
|
+
if (!ok) missing++;
|
|
572
|
+
console.log(` ${status(ok)} ${n} ${disabled ? "listed but disabled" : found ? "listed" : "not in the skill list of a fresh session"}`);
|
|
559
573
|
}
|
|
560
574
|
if (!a.discover.deterministic)
|
|
561
575
|
console.log(` note ${a.display} has no plain skill listing; this asks the model, so treat a FAIL as a lead, not proof`);
|
|
@@ -564,10 +578,75 @@ function discover(agent, names) {
|
|
|
564
578
|
return missing;
|
|
565
579
|
}
|
|
566
580
|
|
|
581
|
+
// ---------------------------------------------------------------- first run
|
|
582
|
+
|
|
583
|
+
// Shown once per machine, only to a person at a terminal: piped output, CI logs
|
|
584
|
+
// and the test harness never see it. The marker lives beside nothing else we
|
|
585
|
+
// write, and failing to write it never fails an install.
|
|
586
|
+
// Capitals drawn as scanlines: each "▀" is a bar with a dark gap under it.
|
|
587
|
+
const WORDMARK = [
|
|
588
|
+
"▀▀▀▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀▀▀▀ ▀▀▀ ▀▀ ▀▀▀▀▀▀",
|
|
589
|
+
"▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀▀▀ ▀▀ ▀▀ ▀▀",
|
|
590
|
+
"▀▀▀▀▀▀▀ ▀▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀▀▀▀ ▀▀ ▀▀▀▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀",
|
|
591
|
+
" ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀ ▀▀",
|
|
592
|
+
"▀▀▀▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀ ▀▀ ▀▀ ▀▀ ▀▀▀▀ ▀▀▀▀▀▀",
|
|
593
|
+
];
|
|
594
|
+
|
|
595
|
+
function firstRunBanner() {
|
|
596
|
+
if (!process.stdout.isTTY || process.env.CI) return;
|
|
597
|
+
const dir = join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), "skill-land");
|
|
598
|
+
const marker = join(dir, "welcomed");
|
|
599
|
+
if (existsSync(marker)) return;
|
|
600
|
+
try { mkdirSync(dir, { recursive: true }); writeFileSync(marker, new Date().toISOString() + "\n"); }
|
|
601
|
+
catch { return; } // can't remember we showed it, so don't show it on every run
|
|
602
|
+
const color = !process.env.NO_COLOR;
|
|
603
|
+
const fit = (process.stdout.columns || 80) >= 80;
|
|
604
|
+
// Rows fade from light mint at the top to brand emerald #59C378 at the bottom.
|
|
605
|
+
// Without 24-bit color (macOS Terminal sets no COLORTERM) the same fade uses
|
|
606
|
+
// the nearest 256-color steps, ending on 78 (#5FD787).
|
|
607
|
+
const truecolor = /truecolor|24bit/i.test(process.env.COLORTERM || "");
|
|
608
|
+
const TOP = [200, 245, 214], EMERALD = [89, 195, 120];
|
|
609
|
+
const FADE_256 = [194, 158, 121, 114, 78];
|
|
610
|
+
const shade = (r) => !truecolor ? `38;5;${FADE_256[r]}`
|
|
611
|
+
: "38;2;" + TOP.map((t, i) => Math.round(t + (EMERALD[i] - t) * r / (WORDMARK.length - 1))).join(";");
|
|
612
|
+
const paint = (code, s) => color ? `\x1b[${code}m${s}\x1b[0m` : s;
|
|
613
|
+
const green = (s) => paint(shade(WORDMARK.length - 1), s);
|
|
614
|
+
// Tagline in muted off-white (#B4B4AC; 256-color 249) so it reads on dark backgrounds.
|
|
615
|
+
const muted = (s) => paint(truecolor ? "38;2;180;180;172" : "38;5;249", s);
|
|
616
|
+
const dim = (s) => paint("2;" + shade(WORDMARK.length - 1), s);
|
|
617
|
+
const { version } = JSON.parse(readFileSync(join(HERE, "package.json"), "utf-8"));
|
|
618
|
+
console.log();
|
|
619
|
+
if (fit) WORDMARK.forEach((row, r) => console.log(" " + paint(shade(r), row)));
|
|
620
|
+
else console.log(" " + green("SKILL-LAND"));
|
|
621
|
+
console.log("\n " + muted("install skills · where they belong · ") + dim(`v${version}`));
|
|
622
|
+
// Full https:// URL so every terminal, macOS Terminal included, makes it clickable.
|
|
623
|
+
console.log("\n " + muted("made by ") + green("magithar"));
|
|
624
|
+
console.log(" " + muted("contact ") + green("https://x.com/magithar"));
|
|
625
|
+
}
|
|
626
|
+
|
|
567
627
|
// ---------------------------------------------------------------- main
|
|
568
628
|
|
|
569
629
|
const argv = process.argv.slice(2);
|
|
570
|
-
|
|
630
|
+
firstRunBanner();
|
|
631
|
+
// Bare `skill-land` is what a newcomer types first: show the three commands that
|
|
632
|
+
// matter, not the whole option reference.
|
|
633
|
+
if (!argv.length) {
|
|
634
|
+
console.log(`
|
|
635
|
+
Get started
|
|
636
|
+
|
|
637
|
+
1. Pick your agent skill-land --list
|
|
638
|
+
2. Install a skill skill-land owner/repo --for claude-code
|
|
639
|
+
3. Check it landed skill-land owner/repo --for claude-code --verify
|
|
640
|
+
|
|
641
|
+
Every file is copied, then read back. If anything didn't land,
|
|
642
|
+
skill-land says so and exits with an error.
|
|
643
|
+
|
|
644
|
+
All options: skill-land --help
|
|
645
|
+
`);
|
|
646
|
+
process.exit(0);
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
if (argv.includes("-h") || argv.includes("--help")) {
|
|
571
650
|
console.log(`
|
|
572
651
|
skill-land <source> --for <agent> [options]
|
|
573
652
|
|
|
@@ -582,7 +661,7 @@ if (!argv.length || argv.includes("-h") || argv.includes("--help")) {
|
|
|
582
661
|
--dry-run resolve and report, write nothing
|
|
583
662
|
--verify check an existing install, write nothing
|
|
584
663
|
--discover also ask a fresh agent session to list its skills
|
|
585
|
-
(claude-code, codex, antigravity; others: not checked)
|
|
664
|
+
(claude-code, codex, gemini-cli, antigravity; others: not checked)
|
|
586
665
|
--skip-security skip the SkillSpector scan (acknowledged, not silent)
|
|
587
666
|
--strict refuse to install anything SkillSpector flags
|
|
588
667
|
--list show known agents and their directories
|
|
@@ -594,12 +673,13 @@ if (!argv.length || argv.includes("-h") || argv.includes("--help")) {
|
|
|
594
673
|
}
|
|
595
674
|
|
|
596
675
|
if (argv.includes("--list")) {
|
|
597
|
-
console.log("\n agent directory
|
|
676
|
+
console.log("\n agent skills directory npx skills");
|
|
598
677
|
console.log(" " + "-".repeat(70));
|
|
599
678
|
for (const [k, a] of Object.entries(AGENTS)) {
|
|
600
|
-
console.log(` ${k.padEnd(17)} ${a.global.padEnd(38)} ${a.broken ? "
|
|
679
|
+
console.log(` ${k.padEnd(17)} ${a.global.padEnd(38)} ${a.broken ? "wrong dir" : "ok"}`);
|
|
601
680
|
}
|
|
602
|
-
console.log();
|
|
681
|
+
console.log("\n wrong dir `npx skills add -a <agent> -g` writes to ~/.agents/skills, which");
|
|
682
|
+
console.log(" this agent never reads. skill-land installs to the directory above.\n");
|
|
603
683
|
process.exit(0);
|
|
604
684
|
}
|
|
605
685
|
|
|
@@ -674,7 +754,15 @@ if (discoverFlag && !dryRun) {
|
|
|
674
754
|
}
|
|
675
755
|
|
|
676
756
|
if (failed) {
|
|
677
|
-
console.error(` ${failed} install(s) failed verification\n`);
|
|
757
|
+
console.error(` ${red(`✗ ${failed} install(s) failed verification`)}\n`);
|
|
678
758
|
process.exit(1);
|
|
679
759
|
}
|
|
680
|
-
|
|
760
|
+
// Close on the outcome in plain words: what is ready, and for which agent.
|
|
761
|
+
if (!dryRun) {
|
|
762
|
+
const verdict = verifyOnly ? "verified existing install" : "verified";
|
|
763
|
+
const who = targets.map((t) => AGENTS[t].display).join(", ");
|
|
764
|
+
const what = landed.length === 1 ? `${landed[0]} is` : `${landed.length} skills are`;
|
|
765
|
+
console.log(landed.length
|
|
766
|
+
? ` ${emerald(`✓ ${verdict}`)} ${what} ${verifyOnly ? "installed" : "ready"} for ${who}\n`
|
|
767
|
+
: ` ${verdict}\n`);
|
|
768
|
+
}
|