skillmds 1.0.19 → 1.0.20

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 CHANGED
@@ -1,108 +1,113 @@
1
- # Changelog
2
-
3
- All notable changes to `skillmds` are documented here. Versions follow [semver](https://semver.org).
4
-
5
- ## 1.0.19
6
-
7
- - **Clear diagnostics when the registry is blocked.** In sandboxed or proxied environments that deny network egress to `api.skillmd.com`, `skillmd add owner/name` used to fall back to GitHub and surface a misleading "repo not found" error. The CLI now tells 404 ("not in the registry" — GitHub fallback proceeds as before) apart from unreachable (DNS failure, proxy 403, 5xx): if the GitHub fallback also fails, the error names the blocked registry and says what fixes it (allowlist `api.skillmd.com`, or install via the SkillMD MCP server); if the fallback succeeds, a warning notes the copy came from GitHub, not the registry.
8
-
9
- ## 1.0.18
10
-
11
- - **Cleaner tool output for agents.** `skillmd_search`, `skillmd_trending`, and `skillmd_recommend` no longer echo site-oriented fields (`avg_rating`, `rating_count`, `install_count`, `save_count`, `verified`, `type`, `owner_avatar`, `category_slug`, and the internal `confident` ranker flag). Results now carry just what an agent needs to pick a skill: slug, title, description, category, agents, repo stars, and the install snippet.
12
- - **Quality score no longer punishes ordinary skills.** The security flags (`reads_secrets`, `network_calls`, `executes_scripts`) are pattern matches against prose and code samples, not proof of anything unsafe — they now cost 2/1/5 points respectively (was 25/8/15), so a skill that merely documents an env var or a URL keeps its high score. Verified skills are floored at 85 (unless the content fails to parse). `skillmd_lint` passes a skill's verified status through to the score.
13
-
14
- ## 1.0.16
15
-
16
- - **Installs are no longer gated on verification.** Any skill installs directly — verified or not — with no flag, no prompt, and no second step, from both the CLI (`skillmd add`) and the MCP `skillmd_install` tool. Security flags (network_calls, executes_scripts, reads_secrets, docs_only) are still shown on the result as information, but never block. `--deny <flag>` remains available as an opt-in for anyone who wants to exclude a flag; `--allow-unverified` is now a no-op kept for backward compatibility.
17
-
18
- ## 1.0.15
19
-
20
- - Search is now **browsable in the interactive menu**: arrow through results, press Enter on one to see a card, and install it to your project or user directory — all without leaving the CLI (`← Back` at each level; Esc goes up one step, never quits).
21
- - Search results are clean two-line entries showing the source repo's **star count** (e.g. `★ 223.7k`) instead of the placeholder rating, with the description truncated to fit your terminal.
22
- - Fixes for narrow terminals: result rows are width-budgeted so they don't wrap and garble the menu; the result card prints once instead of repainting on every action.
23
-
24
- ## 1.0.14
25
-
26
- - Interactive menu (`skillmds` in a terminal) no longer exits after one action — it returns to the menu until you pick **Quit**; cancelling a sub-prompt goes back to the menu instead of quitting.
27
- - "List installed skills" now shows project **and** global skills together, tagged `[agent/scope]`, replacing the misleading "Include global skills?" prompt (which actually toggled global-only vs project-only). Invalid skills show the parse reason.
28
- - The in-menu command reference now includes `info`.
29
-
30
- ## 1.0.13
31
-
32
- Safe & easy installs release.
33
-
34
- - **Packs install their full file tree.** `skillmd add owner/pack` now downloads the pack's source directory (pinned to the registry's commit; falls back to the default branch with a warning if the pin is gone upstream), so `assets/` and `references/` files referenced by SKILL.md actually exist. Hardened: symlinks are skipped, 200-file/20MB caps, temp dirs cleaned up.
35
- - **Unverified skills prompt instead of hard-blocking.** Interactive installs show the lint score and security flags and ask before installing; non-interactive installs (and `-y`) still require the explicit `--allow-unverified`. Blocked output links the skill's page for review.
36
- - **New `skillmd info <slug>`** shows verification status, security flags, rating, provenance (source repo @ commit), and the install snippet. Unknown subcommands now print a proper error instead of silently starting the MCP server.
37
- - **MCP `skillmd_install` gained the CLI's safety gates**: refuses unverified skills unless `allow_unverified: true` (only after explicit human approval), validates before writing, reports security flags, and guards against malformed skill names.
38
- - **Installs are exact.** The registry now stores the published SKILL.md verbatim (`raw_md`) and installs deliver it byte-for-byte; reconstructed frontmatter (legacy rows) is YAML-quoted so descriptions with `:`/`#`/quotes can't corrupt the file.
39
- - Description limit aligned with Claude Code's real spec (1024 chars, was 500) — valid skills are no longer flagged "(invalid SKILL.md)" by `skillmd list`, and `list` now says *why* a file is invalid.
40
-
41
- ## 1.0.12
42
-
43
- - Registry-native `skillmd` CLI shipped inside `skillmds`: `search`, `add`, `list`, `remove`, `update`, `publish`, `login`/`logout`, plus lint/scan/rules/init. (Release notes added retroactively.)
44
-
45
- ## 1.0.11
46
-
47
- - Security flags render with full readable labels, each with its own marker: `⚑ Executes Scripts ⚑ Calls Network ⚑ Reads Secrets`.
48
-
49
- ## 1.0.10
50
-
51
- - Quality score is now a composite of spec correctness, completeness, and **security risk** — skills that read secrets, execute scripts, or make network calls score lower (a risky/stub skill is no longer a green 100).
52
- - Lint output ends with a **Failed** section listing each failure's rule, message, and full path, so problems don't scroll off in a large run.
53
- - New `--errors-only` flag to show only failing skills.
54
- - Fixed emoji spacing/overlap; rule ids are grouped by severity per skill.
55
- - The closer states how many skills failed instead of a vague "Problems found".
56
-
57
- ## 1.0.9
58
-
59
- - Compact lint output: one line per skill (status dot, score, name, rule-id chips) with a single summary line, instead of a tall multi-row block per skill. Linting a single skill still shows full diagnostic messages.
60
-
61
- ## 1.0.8
62
-
63
- - `skillmds` with no command in a terminal now opens the interactive CLI menu; it only starts the MCP server when launched over piped stdio (how MCP clients run it). Previously a bare `npx skillmds` in a terminal appeared to hang on the silent MCP server.
64
-
65
- ## 1.0.7
66
-
67
- - Nicer CLI output: colored PASS/FAIL, quality-score bars, `ERROR`/`WARN`/`INFO` badges, and a summary with average score.
68
- - Running `skillmd` (or `skillmds`) with no command on a terminal now opens a guided interactive menu (lint, scan, search, init, list). Piped/CI still prints help.
69
- - Progress spinner while scanning.
70
-
71
- ## 1.0.6
72
-
73
- - Bundle the banner image in the package and serve it via jsDelivr so it renders on the npm page (the previous absolute URL was unreachable).
74
-
75
- ## 1.0.5
76
-
77
- - The `skillmds` binary now dispatches: `skillmds <command>` (lint, scan, add, …) runs the CLI, while `skillmds` with no command starts the MCP server. This makes `npx skillmds lint .` work without the `-p` flag.
78
-
79
- ## 1.0.4
80
-
81
- - `skillmd lint`/`scan` print a progress line to stderr and warn when scanning a home directory, so a directory scan never looks like a frozen blank screen.
82
- - Directory scans skip large build/OS directories (`AppData`, `node_modules`, `target`, …) and cap recursion depth, so `lint .` in a big tree terminates quickly.
83
- - Clearer message when no `SKILL.md` is found.
84
- - Bare `skillmd` (no command) prints help.
85
-
86
- ## 1.0.3
87
-
88
- - CLI (`skillmd`) and MCP server (`skillmds`) now report their version from `package.json` instead of a hardcoded string.
89
- - READMEs rewritten; added this changelog.
90
-
91
- ## 1.0.2
92
-
93
- - `skillmd lint`: skip directories that cannot be read (e.g. `EPERM` on protected system folders) instead of aborting the scan.
94
-
95
- ## 1.0.1
96
-
97
- - Fix `skillmd_lint` in the MCP server: keep `yaml` external in the bundled engine so it loads at runtime (bundling a CommonJS module into ESM raised `Dynamic require of "process"`).
98
-
99
- ## 1.0.0
100
-
101
- - Add the `skillmd` CLI, shipped alongside the MCP server in this package. Commands: `lint`/`check`, `scan`, `rules`, `init`, `search`, `add`, `list`, `remove`, `update`, `publish`/`submit`, `login`, `logout`.
102
- - Validation engine shared with the SkillMD registry: `SKILL.md` parser, lint rules `SK001`–`SK040`, security scan, quality score, and `text`/`json`/`sarif`/`github` output.
103
- - Add the `skillmd_lint` MCP tool.
104
- - MCP server and CLI authenticate with `Authorization: Bearer` tokens.
105
-
106
- ## 0.1.1
107
-
108
- - Initial MCP server: `skillmd_search`, `skillmd_get`, `skillmd_install`, `skillmd_trending`, `skillmd_recommend`, `skillmd_list_saved`.
1
+ # Changelog
2
+
3
+ All notable changes to `skillmds` are documented here. Versions follow [semver](https://semver.org).
4
+
5
+ ## 1.0.20
6
+
7
+ - **`skillmd add` now installs to every agent on your machine.** Detection is machine-level (an agent's config dir under your home, e.g. `~/.cursor`), so agents no longer need a pre-existing `skills/` folder to be targeted. The agent registry grows from 5 to **60+**: Gemini CLI, Antigravity, Kiro, Warp, GitHub Copilot, Cline, Roo Code, Goose, Trae, Qwen Code, Amp, OpenClaw, Kilo Code, Hermes (Nous Research), Continue, Devin, OpenHands, Replit, Mistral Vibe, Zed, Kimi Code, Droid (Factory), Crush, Augment, Junie, and more — with per-agent dirs matching each agent's own convention (`~/.codeium/windsurf/skills` for Windsurf, `~/.gemini/antigravity/skills` for Antigravity, etc.). Agents sharing the cross-agent `.agents/skills` convention are written once and labelled with every agent they serve. `-a/--agent` still overrides.
8
+ - Running from your home directory now behaves like `--global` (project scope rooted at `$HOME` *is* the global scope), so agents whose global skills live outside `~/<agent>/skills` get the right directory.
9
+
10
+ ## 1.0.19
11
+
12
+ - **Clear diagnostics when the registry is blocked.** In sandboxed or proxied environments that deny network egress to `api.skillmd.com`, `skillmd add owner/name` used to fall back to GitHub and surface a misleading "repo not found" error. The CLI now tells 404 ("not in the registry" — GitHub fallback proceeds as before) apart from unreachable (DNS failure, proxy 403, 5xx): if the GitHub fallback also fails, the error names the blocked registry and says what fixes it (allowlist `api.skillmd.com`, or install via the SkillMD MCP server); if the fallback succeeds, a warning notes the copy came from GitHub, not the registry.
13
+
14
+ ## 1.0.18
15
+
16
+ - **Cleaner tool output for agents.** `skillmd_search`, `skillmd_trending`, and `skillmd_recommend` no longer echo site-oriented fields (`avg_rating`, `rating_count`, `install_count`, `save_count`, `verified`, `type`, `owner_avatar`, `category_slug`, and the internal `confident` ranker flag). Results now carry just what an agent needs to pick a skill: slug, title, description, category, agents, repo stars, and the install snippet.
17
+ - **Quality score no longer punishes ordinary skills.** The security flags (`reads_secrets`, `network_calls`, `executes_scripts`) are pattern matches against prose and code samples, not proof of anything unsafe — they now cost 2/1/5 points respectively (was 25/8/15), so a skill that merely documents an env var or a URL keeps its high score. Verified skills are floored at 85 (unless the content fails to parse). `skillmd_lint` passes a skill's verified status through to the score.
18
+
19
+ ## 1.0.16
20
+
21
+ - **Installs are no longer gated on verification.** Any skill installs directly — verified or not — with no flag, no prompt, and no second step, from both the CLI (`skillmd add`) and the MCP `skillmd_install` tool. Security flags (network_calls, executes_scripts, reads_secrets, docs_only) are still shown on the result as information, but never block. `--deny <flag>` remains available as an opt-in for anyone who wants to exclude a flag; `--allow-unverified` is now a no-op kept for backward compatibility.
22
+
23
+ ## 1.0.15
24
+
25
+ - Search is now **browsable in the interactive menu**: arrow through results, press Enter on one to see a card, and install it to your project or user directory — all without leaving the CLI (`← Back` at each level; Esc goes up one step, never quits).
26
+ - Search results are clean two-line entries showing the source repo's **star count** (e.g. `★ 223.7k`) instead of the placeholder rating, with the description truncated to fit your terminal.
27
+ - Fixes for narrow terminals: result rows are width-budgeted so they don't wrap and garble the menu; the result card prints once instead of repainting on every action.
28
+
29
+ ## 1.0.14
30
+
31
+ - Interactive menu (`skillmds` in a terminal) no longer exits after one action — it returns to the menu until you pick **Quit**; cancelling a sub-prompt goes back to the menu instead of quitting.
32
+ - "List installed skills" now shows project **and** global skills together, tagged `[agent/scope]`, replacing the misleading "Include global skills?" prompt (which actually toggled global-only vs project-only). Invalid skills show the parse reason.
33
+ - The in-menu command reference now includes `info`.
34
+
35
+ ## 1.0.13
36
+
37
+ Safe & easy installs release.
38
+
39
+ - **Packs install their full file tree.** `skillmd add owner/pack` now downloads the pack's source directory (pinned to the registry's commit; falls back to the default branch with a warning if the pin is gone upstream), so `assets/` and `references/` files referenced by SKILL.md actually exist. Hardened: symlinks are skipped, 200-file/20MB caps, temp dirs cleaned up.
40
+ - **Unverified skills prompt instead of hard-blocking.** Interactive installs show the lint score and security flags and ask before installing; non-interactive installs (and `-y`) still require the explicit `--allow-unverified`. Blocked output links the skill's page for review.
41
+ - **New `skillmd info <slug>`** shows verification status, security flags, rating, provenance (source repo @ commit), and the install snippet. Unknown subcommands now print a proper error instead of silently starting the MCP server.
42
+ - **MCP `skillmd_install` gained the CLI's safety gates**: refuses unverified skills unless `allow_unverified: true` (only after explicit human approval), validates before writing, reports security flags, and guards against malformed skill names.
43
+ - **Installs are exact.** The registry now stores the published SKILL.md verbatim (`raw_md`) and installs deliver it byte-for-byte; reconstructed frontmatter (legacy rows) is YAML-quoted so descriptions with `:`/`#`/quotes can't corrupt the file.
44
+ - Description limit aligned with Claude Code's real spec (1024 chars, was 500) — valid skills are no longer flagged "(invalid SKILL.md)" by `skillmd list`, and `list` now says *why* a file is invalid.
45
+
46
+ ## 1.0.12
47
+
48
+ - Registry-native `skillmd` CLI shipped inside `skillmds`: `search`, `add`, `list`, `remove`, `update`, `publish`, `login`/`logout`, plus lint/scan/rules/init. (Release notes added retroactively.)
49
+
50
+ ## 1.0.11
51
+
52
+ - Security flags render with full readable labels, each with its own marker: `⚑ Executes Scripts ⚑ Calls Network ⚑ Reads Secrets`.
53
+
54
+ ## 1.0.10
55
+
56
+ - Quality score is now a composite of spec correctness, completeness, and **security risk** — skills that read secrets, execute scripts, or make network calls score lower (a risky/stub skill is no longer a green 100).
57
+ - Lint output ends with a **Failed** section listing each failure's rule, message, and full path, so problems don't scroll off in a large run.
58
+ - New `--errors-only` flag to show only failing skills.
59
+ - Fixed emoji spacing/overlap; rule ids are grouped by severity per skill.
60
+ - The closer states how many skills failed instead of a vague "Problems found".
61
+
62
+ ## 1.0.9
63
+
64
+ - Compact lint output: one line per skill (status dot, score, name, rule-id chips) with a single summary line, instead of a tall multi-row block per skill. Linting a single skill still shows full diagnostic messages.
65
+
66
+ ## 1.0.8
67
+
68
+ - `skillmds` with no command in a terminal now opens the interactive CLI menu; it only starts the MCP server when launched over piped stdio (how MCP clients run it). Previously a bare `npx skillmds` in a terminal appeared to hang on the silent MCP server.
69
+
70
+ ## 1.0.7
71
+
72
+ - Nicer CLI output: colored PASS/FAIL, quality-score bars, `ERROR`/`WARN`/`INFO` badges, and a summary with average score.
73
+ - Running `skillmd` (or `skillmds`) with no command on a terminal now opens a guided interactive menu (lint, scan, search, init, list). Piped/CI still prints help.
74
+ - Progress spinner while scanning.
75
+
76
+ ## 1.0.6
77
+
78
+ - Bundle the banner image in the package and serve it via jsDelivr so it renders on the npm page (the previous absolute URL was unreachable).
79
+
80
+ ## 1.0.5
81
+
82
+ - The `skillmds` binary now dispatches: `skillmds <command>` (lint, scan, add, …) runs the CLI, while `skillmds` with no command starts the MCP server. This makes `npx skillmds lint .` work without the `-p` flag.
83
+
84
+ ## 1.0.4
85
+
86
+ - `skillmd lint`/`scan` print a progress line to stderr and warn when scanning a home directory, so a directory scan never looks like a frozen blank screen.
87
+ - Directory scans skip large build/OS directories (`AppData`, `node_modules`, `target`, …) and cap recursion depth, so `lint .` in a big tree terminates quickly.
88
+ - Clearer message when no `SKILL.md` is found.
89
+ - Bare `skillmd` (no command) prints help.
90
+
91
+ ## 1.0.3
92
+
93
+ - CLI (`skillmd`) and MCP server (`skillmds`) now report their version from `package.json` instead of a hardcoded string.
94
+ - READMEs rewritten; added this changelog.
95
+
96
+ ## 1.0.2
97
+
98
+ - `skillmd lint`: skip directories that cannot be read (e.g. `EPERM` on protected system folders) instead of aborting the scan.
99
+
100
+ ## 1.0.1
101
+
102
+ - Fix `skillmd_lint` in the MCP server: keep `yaml` external in the bundled engine so it loads at runtime (bundling a CommonJS module into ESM raised `Dynamic require of "process"`).
103
+
104
+ ## 1.0.0
105
+
106
+ - Add the `skillmd` CLI, shipped alongside the MCP server in this package. Commands: `lint`/`check`, `scan`, `rules`, `init`, `search`, `add`, `list`, `remove`, `update`, `publish`/`submit`, `login`, `logout`.
107
+ - Validation engine shared with the SkillMD registry: `SKILL.md` parser, lint rules `SK001`–`SK040`, security scan, quality score, and `text`/`json`/`sarif`/`github` output.
108
+ - Add the `skillmd_lint` MCP tool.
109
+ - MCP server and CLI authenticate with `Authorization: Bearer` tokens.
110
+
111
+ ## 0.1.1
112
+
113
+ - Initial MCP server: `skillmd_search`, `skillmd_get`, `skillmd_install`, `skillmd_trending`, `skillmd_recommend`, `skillmd_list_saved`.
package/dist/cli.js CHANGED
@@ -41,7 +41,26 @@ function parseSkillMd(raw, type = "single") {
41
41
  }
42
42
 
43
43
  // ../../packages/core/src/security.ts
44
+ var UNTRUSTED_INSTALL_RE = new RegExp(
45
+ [
46
+ /(?:npx|npm|yarn|pnpm|bun)\b[^\n]*--registry[= ]/.source,
47
+ // custom npm registry
48
+ /npm\s+config\s+set\s+registry/.source,
49
+ /pip3?\s+install\b[^\n]*(?:--index-url|--extra-index-url|-i\s+https?:)/.source,
50
+ // custom pip index
51
+ /(?:curl|wget)\b[^\n|]*\|\s*(?:sudo\s+)?(?:ba|z|fi)?sh\b/.source,
52
+ // curl … | sh
53
+ /(?:iwr|irm|invoke-webrequest|invoke-restmethod)\b[^\n|]*\|\s*iex\b/.source,
54
+ // PowerShell pipe-to-exec
55
+ /bash\s+<\(\s*(?:curl|wget)/.source,
56
+ // bash <(curl …)
57
+ /(?:pip3?|npm|npx)\s+(?:install|--yes|-y)?\s*[^\n]*https?:\/\/(?!registry\.npmjs\.org|pypi\.org|files\.pythonhosted\.org)[^\s'"`]+\.(?:whl|tar\.gz|tgz|zip)\b/.source
58
+ // install from raw archive URL
59
+ ].join("|"),
60
+ "i"
61
+ );
44
62
  var RULES = [
63
+ ["untrusted_install", UNTRUSTED_INSTALL_RE],
45
64
  ["executes_scripts", /```(?:sh|bash|python|py|js|ts|ruby|rb)\b|\b(subprocess|os\.system|child_process|exec\()/i],
46
65
  ["network_calls", /\b(fetch|requests\.|urllib|axios|curl|wget|https?:\/\/|websocket)\b/i],
47
66
  ["reads_secrets", /\b(api[_-]?key|secret|token|password|os\.environ|process\.env|getenv)\b/i]
@@ -165,7 +184,10 @@ var RISK = {
165
184
  docs_only: 0,
166
185
  reads_secrets: 2,
167
186
  network_calls: 1,
168
- executes_scripts: 5
187
+ executes_scripts: 5,
188
+ // fetch-and-execute from a non-standard source — the supply-chain pattern the
189
+ // AI verdict floors to "warning"; the heaviest penalty here for the same reason
190
+ untrusted_install: 15
169
191
  };
170
192
  var VERIFIED_FLOOR = 85;
171
193
  function qualityScore(diagnostics, security, opts = {}) {
@@ -955,6 +977,8 @@ function infoCommand() {
955
977
  // ../cli/src/commands/add.ts
956
978
  import { Command as Command7, Option } from "commander";
957
979
  import { existsSync as existsSync4 } from "fs";
980
+ import { homedir as homedir4 } from "os";
981
+ import { resolve as resolve3 } from "path";
958
982
  import pc7 from "picocolors";
959
983
 
960
984
  // ../cli/src/agents.ts
@@ -962,20 +986,84 @@ import { mkdirSync as mkdirSync3, writeFileSync as writeFileSync4, rmSync as rmS
962
986
  import { homedir as homedir3 } from "os";
963
987
  import { join as join4, resolve as resolve2, dirname as dirname2, sep as sep2 } from "path";
964
988
  var AGENTS = [
965
- { id: "claude-code", segments: [".claude", "skills"] },
966
- { id: "cursor", segments: [".cursor", "skills"] },
967
- { id: "codex", segments: [".codex", "skills"] },
968
- { id: "windsurf", segments: [".windsurf", "skills"] },
969
- { id: "opencode", segments: [".opencode", "skills"] }
989
+ { id: "claude-code", project: [".claude", "skills"], global: [".claude", "skills"], detect: [[".claude"]] },
990
+ { id: "cursor", project: [".cursor", "skills"], global: [".cursor", "skills"], detect: [[".cursor"]] },
991
+ { id: "codex", project: [".codex", "skills"], global: [".codex", "skills"], detect: [[".codex"]] },
992
+ { id: "windsurf", project: [".windsurf", "skills"], global: [".codeium", "windsurf", "skills"], detect: [[".codeium", "windsurf"], [".windsurf"]] },
993
+ { id: "opencode", project: [".opencode", "skills"], global: [".config", "opencode", "skills"], detect: [[".config", "opencode"], [".opencode"]] },
994
+ { id: "gemini-cli", project: [".agents", "skills"], global: [".gemini", "skills"], detect: [[".gemini"]] },
995
+ { id: "antigravity", project: [".agents", "skills"], global: [".gemini", "antigravity", "skills"], detect: [[".gemini", "antigravity"], [".antigravity"]] },
996
+ { id: "kiro", project: [".kiro", "skills"], global: [".kiro", "skills"], detect: [[".kiro"]] },
997
+ { id: "warp", project: [".agents", "skills"], global: [".agents", "skills"], detect: [[".warp"]] },
998
+ { id: "github-copilot", project: [".agents", "skills"], global: [".copilot", "skills"], detect: [[".copilot"]] },
999
+ { id: "cline", project: [".agents", "skills"], global: [".agents", "skills"], detect: [[".cline"]] },
1000
+ { id: "roo", project: [".roo", "skills"], global: [".roo", "skills"], detect: [[".roo"]] },
1001
+ { id: "goose", project: [".goose", "skills"], global: [".config", "goose", "skills"], detect: [[".config", "goose"]] },
1002
+ { id: "trae", project: [".trae", "skills"], global: [".trae", "skills"], detect: [[".trae"]] },
1003
+ { id: "qwen-code", project: [".qwen", "skills"], global: [".qwen", "skills"], detect: [[".qwen"]] },
1004
+ { id: "amp", project: [".agents", "skills"], global: [".config", "agents", "skills"], detect: [[".config", "amp"]] },
1005
+ // — extended registry —
1006
+ { id: "openclaw", project: ["skills"], global: [".openclaw", "skills"], detect: [[".openclaw"], [".clawdbot"], [".moltbot"]] },
1007
+ { id: "kilo", project: [".kilocode", "skills"], global: [".kilocode", "skills"], detect: [[".kilocode"]] },
1008
+ { id: "hermes-agent", project: [".hermes", "skills"], global: [".hermes", "skills"], detect: [[".hermes"]] },
1009
+ { id: "continue", project: [".continue", "skills"], global: [".continue", "skills"], detect: [[".continue"]] },
1010
+ { id: "devin", project: [".devin", "skills"], global: [".config", "devin", "skills"], detect: [[".config", "devin"]] },
1011
+ { id: "openhands", project: [".openhands", "skills"], global: [".openhands", "skills"], detect: [[".openhands"]] },
1012
+ { id: "replit", project: [".agents", "skills"], global: [".config", "agents", "skills"], detect: [[".replit"]] },
1013
+ { id: "mistral-vibe", project: [".vibe", "skills"], global: [".vibe", "skills"], detect: [[".vibe"]] },
1014
+ { id: "zed", project: [".agents", "skills"], global: [".agents", "skills"], detect: [[".config", "zed"]] },
1015
+ { id: "adal", project: [".adal", "skills"], global: [".adal", "skills"], detect: [[".adal"]] },
1016
+ { id: "aider-desk", project: [".aider-desk", "skills"], global: [".aider-desk", "skills"], detect: [[".aider-desk"]] },
1017
+ { id: "antigravity-cli", project: [".agents", "skills"], global: [".gemini", "antigravity-cli", "skills"], detect: [[".gemini", "antigravity-cli"]] },
1018
+ { id: "augment", project: [".augment", "skills"], global: [".augment", "skills"], detect: [[".augment"]] },
1019
+ { id: "autohand-code", project: [".autohand", "skills"], global: [".autohand", "skills"], detect: [[".autohand"]] },
1020
+ { id: "bob", project: [".bob", "skills"], global: [".bob", "skills"], detect: [[".bob"]] },
1021
+ { id: "codearts-agent", project: [".codeartsdoer", "skills"], global: [".codeartsdoer", "skills"], detect: [[".codeartsdoer"]] },
1022
+ { id: "codebuddy", project: [".codebuddy", "skills"], global: [".codebuddy", "skills"], detect: [[".codebuddy"]] },
1023
+ { id: "codemaker", project: [".codemaker", "skills"], global: [".codemaker", "skills"], detect: [[".codemaker"]] },
1024
+ { id: "codestudio", project: [".codestudio", "skills"], global: [".codestudio", "skills"], detect: [[".codestudio"]] },
1025
+ { id: "command-code", project: [".commandcode", "skills"], global: [".commandcode", "skills"], detect: [[".commandcode"]] },
1026
+ { id: "cortex", project: [".cortex", "skills"], global: [".snowflake", "cortex", "skills"], detect: [[".snowflake", "cortex"]] },
1027
+ { id: "crush", project: [".crush", "skills"], global: [".config", "crush", "skills"], detect: [[".config", "crush"]] },
1028
+ { id: "deepagents", project: [".agents", "skills"], global: [".deepagents", "agent", "skills"], detect: [[".deepagents"]] },
1029
+ { id: "dexto", project: [".agents", "skills"], global: [".agents", "skills"], detect: [[".dexto"]] },
1030
+ { id: "droid", project: [".factory", "skills"], global: [".factory", "skills"], detect: [[".factory"]] },
1031
+ { id: "firebender", project: [".agents", "skills"], global: [".firebender", "skills"], detect: [[".firebender"]] },
1032
+ { id: "forgecode", project: [".forge", "skills"], global: [".forge", "skills"], detect: [[".forge"]] },
1033
+ { id: "iflow-cli", project: [".iflow", "skills"], global: [".iflow", "skills"], detect: [[".iflow"]] },
1034
+ { id: "inference-sh", project: [".inferencesh", "skills"], global: [".inferencesh", "skills"], detect: [[".inferencesh"]] },
1035
+ { id: "jazz", project: [".jazz", "skills"], global: [".jazz", "skills"], detect: [[".jazz"]] },
1036
+ { id: "junie", project: [".junie", "skills"], global: [".junie", "skills"], detect: [[".junie"]] },
1037
+ { id: "kimi-code-cli", project: [".agents", "skills"], global: [".agents", "skills"], detect: [[".kimi-code"], [".kimi"]] },
1038
+ { id: "kode", project: [".kode", "skills"], global: [".kode", "skills"], detect: [[".kode"]] },
1039
+ { id: "lingma", project: [".lingma", "skills"], global: [".lingma", "skills"], detect: [[".lingma"]] },
1040
+ { id: "loaf", project: [".agents", "skills"], global: [".agents", "skills"], detect: [[".loaf"]] },
1041
+ { id: "mcpjam", project: [".mcpjam", "skills"], global: [".mcpjam", "skills"], detect: [[".mcpjam"]] },
1042
+ { id: "moxby", project: [".moxby", "skills"], global: [".moxby", "skills"], detect: [[".moxby"]] },
1043
+ { id: "mux", project: [".mux", "skills"], global: [".mux", "skills"], detect: [[".mux"]] },
1044
+ { id: "neovate", project: [".neovate", "skills"], global: [".neovate", "skills"], detect: [[".neovate"]] },
1045
+ { id: "ona", project: [".ona", "skills"], global: [".ona", "skills"], detect: [[".ona"]] },
1046
+ { id: "pi", project: [".pi", "skills"], global: [".pi", "agent", "skills"], detect: [[".pi", "agent"]] },
1047
+ { id: "pochi", project: [".pochi", "skills"], global: [".pochi", "skills"], detect: [[".pochi"]] },
1048
+ { id: "qoder", project: [".qoder", "skills"], global: [".qoder", "skills"], detect: [[".qoder"]] },
1049
+ { id: "qoder-cn", project: [".qoder", "skills"], global: [".qoder-cn", "skills"], detect: [[".qoder-cn"]] },
1050
+ { id: "reasonix", project: [".reasonix", "skills"], global: [".reasonix", "skills"], detect: [[".reasonix"]] },
1051
+ { id: "rovodev", project: [".rovodev", "skills"], global: [".rovodev", "skills"], detect: [[".rovodev"]] },
1052
+ { id: "tabnine-cli", project: [".tabnine", "agent", "skills"], global: [".tabnine", "agent", "skills"], detect: [[".tabnine"]] },
1053
+ { id: "terramind", project: [".terramind", "skills"], global: [".terramind", "skills"], detect: [[".terramind"]] },
1054
+ { id: "tinycloud", project: [".tinycloud", "skills"], global: [".tinycloud", "skills"], detect: [[".tinycloud"]] },
1055
+ { id: "trae-cn", project: [".trae", "skills"], global: [".trae-cn", "skills"], detect: [[".trae-cn"]] },
1056
+ { id: "zcode", project: [".zcode", "skills"], global: [".zcode", "skills"], detect: [[".zcode"]] },
1057
+ { id: "zencoder", project: [".zencoder", "skills"], global: [".zencoder", "skills"], detect: [[".zencoder"]] }
970
1058
  ];
971
1059
  function agentDir(agentId, opts = {}) {
972
1060
  const agent = AGENTS.find((a) => a.id === agentId);
973
1061
  if (!agent) throw new Error(`Unknown agent: ${agentId}. Known: ${AGENTS.map((a) => a.id).join(", ")}`);
974
- const root = opts.global ? homedir3() : opts.cwd ?? process.cwd();
975
- return join4(root, ...agent.segments);
1062
+ return opts.global ? join4(opts.home ?? homedir3(), ...agent.global) : join4(opts.cwd ?? process.cwd(), ...agent.project);
976
1063
  }
977
1064
  function detectAgents(opts = {}) {
978
- return AGENTS.filter((a) => existsSync3(agentDir(a.id, opts))).map((a) => a.id);
1065
+ const home = opts.home ?? homedir3();
1066
+ return AGENTS.filter((a) => a.detect.some((d) => existsSync3(join4(home, ...d)))).map((a) => a.id);
979
1067
  }
980
1068
  function writeSkill(skillName, files, targetDir, opts = {}) {
981
1069
  if (!/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.test(skillName) || skillName.includes("..")) {
@@ -1003,8 +1091,11 @@ function writeSkill(skillName, files, targetDir, opts = {}) {
1003
1091
  function installedSkills(opts = {}) {
1004
1092
  const scope = opts.global ? "global" : "project";
1005
1093
  const out = [];
1094
+ const seen = /* @__PURE__ */ new Set();
1006
1095
  for (const agent of AGENTS) {
1007
1096
  const dir = agentDir(agent.id, opts);
1097
+ if (seen.has(dir)) continue;
1098
+ seen.add(dir);
1008
1099
  if (!existsSync3(dir)) continue;
1009
1100
  for (const entry of readdirSync2(dir)) {
1010
1101
  const skillMd = join4(dir, entry, "SKILL.md");
@@ -1127,8 +1218,16 @@ async function runAdd(arg, flags, deps = defaultDeps) {
1127
1218
  const written = [];
1128
1219
  const blocked = [];
1129
1220
  const lines = [];
1130
- const scope = { global: flags.global, cwd: flags.cwd };
1131
- const targets = flags.agent?.length ? flags.agent : detectAgents(scope).length ? detectAgents(scope) : ["claude-code"];
1221
+ const home = flags.home ?? homedir4();
1222
+ const isGlobal = flags.global || resolve3(flags.cwd ?? process.cwd()) === resolve3(home);
1223
+ const scope = { global: isGlobal, cwd: flags.cwd, home: flags.home };
1224
+ const detected = detectAgents(scope);
1225
+ const targets = flags.agent?.length ? flags.agent : detected.length ? detected : ["claude-code"];
1226
+ const dirAgents = /* @__PURE__ */ new Map();
1227
+ for (const agentId of targets) {
1228
+ const dir = agentDir(agentId, scope);
1229
+ dirAgents.set(dir, [...dirAgents.get(dir) ?? [], agentId]);
1230
+ }
1132
1231
  for (const c of candidates) {
1133
1232
  const result = lint(c.raw, { slug: c.slug });
1134
1233
  const allFlags = [.../* @__PURE__ */ new Set([...result.security.flags, ...c.securityFlags ?? []])];
@@ -1144,11 +1243,10 @@ async function runAdd(arg, flags, deps = defaultDeps) {
1144
1243
  continue;
1145
1244
  }
1146
1245
  const files = c.files ?? [{ path: "SKILL.md", contents: c.raw }];
1147
- for (const agentId of targets) {
1148
- const dir = agentDir(agentId, scope);
1246
+ for (const [dir, agentIds] of dirAgents) {
1149
1247
  const out = writeSkill(c.name, files, dir, { mode: "copy" });
1150
1248
  written.push({ name: c.name, dir: out });
1151
- lines.push(pc7.green(`\u2713 ${c.name} \u2192 ${out}`) + pc7.dim(` (score ${result.score}${allFlags.length ? `; ${allFlags.join(", ")}` : ""})`));
1249
+ lines.push(pc7.green(`\u2713 ${c.name} \u2192 ${out}`) + pc7.dim(` (${agentIds.join(", ")}; score ${result.score}${allFlags.length ? `; ${allFlags.join(", ")}` : ""})`));
1152
1250
  }
1153
1251
  if (c.pinMiss) {
1154
1252
  lines.push(pc7.yellow(`\u26A0 ${c.name}: pinned commit unavailable upstream \u2014 fetched the source repo's default branch instead`));
@@ -1165,7 +1263,7 @@ async function runAdd(arg, flags, deps = defaultDeps) {
1165
1263
  return { written, blocked, exitCode, output: lines.join("\n") };
1166
1264
  }
1167
1265
  function addCommand() {
1168
- return new Command7("add").description("Install a skill from the registry, a GitHub repo, or a local path (lints before writing)").argument("<source>", "registry slug (owner/name), GitHub source, or local path").option("-g, --global", "install to the user directory instead of the project").option("-a, --agent <agents...>", "target specific agents").option("-s, --skill <names...>", "install only specific skills by name ('*' for all)").option("--copy", "copy files (default)", true).option("-y, --yes", "skip confirmation prompts").addOption(new Option("--allow-unverified").hideHelp()).option("--skip-lint", "install even if the skill fails lint").option("--deny <flags...>", "refuse skills carrying any of these security flags (opt-in)").action(async (source, opts, cmd) => {
1266
+ return new Command7("add").description("Install a skill from the registry, a GitHub repo, or a local path (lints before writing)").argument("<source>", "registry slug (owner/name), GitHub source, or local path").option("-g, --global", "install to the user directory instead of the project").option("-a, --agent <agents...>", "target specific agents (default: every agent detected on this machine)").option("-s, --skill <names...>", "install only specific skills by name ('*' for all)").option("--copy", "copy files (default)", true).option("-y, --yes", "skip confirmation prompts").addOption(new Option("--allow-unverified").hideHelp()).option("--skip-lint", "install even if the skill fails lint").option("--deny <flags...>", "refuse skills carrying any of these security flags (opt-in)").action(async (source, opts, cmd) => {
1169
1267
  const merged = { ...cmd.parent?.opts(), ...opts };
1170
1268
  const run = await runAdd(source, merged);
1171
1269
  console.log(run.output);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillmds",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "description": "SkillMD for agents: the `skillmds` MCP server + the `skillmd` CLI (lint, scan, search, install, publish Agent Skills) from skillmd.com.",
5
5
  "type": "module",
6
6
  "bin": {
package/vendor/index.js CHANGED
@@ -47,7 +47,26 @@ function categorize(text) {
47
47
  }
48
48
 
49
49
  // ../../packages/core/src/security.ts
50
+ var UNTRUSTED_INSTALL_RE = new RegExp(
51
+ [
52
+ /(?:npx|npm|yarn|pnpm|bun)\b[^\n]*--registry[= ]/.source,
53
+ // custom npm registry
54
+ /npm\s+config\s+set\s+registry/.source,
55
+ /pip3?\s+install\b[^\n]*(?:--index-url|--extra-index-url|-i\s+https?:)/.source,
56
+ // custom pip index
57
+ /(?:curl|wget)\b[^\n|]*\|\s*(?:sudo\s+)?(?:ba|z|fi)?sh\b/.source,
58
+ // curl … | sh
59
+ /(?:iwr|irm|invoke-webrequest|invoke-restmethod)\b[^\n|]*\|\s*iex\b/.source,
60
+ // PowerShell pipe-to-exec
61
+ /bash\s+<\(\s*(?:curl|wget)/.source,
62
+ // bash <(curl …)
63
+ /(?:pip3?|npm|npx)\s+(?:install|--yes|-y)?\s*[^\n]*https?:\/\/(?!registry\.npmjs\.org|pypi\.org|files\.pythonhosted\.org)[^\s'"`]+\.(?:whl|tar\.gz|tgz|zip)\b/.source
64
+ // install from raw archive URL
65
+ ].join("|"),
66
+ "i"
67
+ );
50
68
  var RULES = [
69
+ ["untrusted_install", UNTRUSTED_INSTALL_RE],
51
70
  ["executes_scripts", /```(?:sh|bash|python|py|js|ts|ruby|rb)\b|\b(subprocess|os\.system|child_process|exec\()/i],
52
71
  ["network_calls", /\b(fetch|requests\.|urllib|axios|curl|wget|https?:\/\/|websocket)\b/i],
53
72
  ["reads_secrets", /\b(api[_-]?key|secret|token|password|os\.environ|process\.env|getenv)\b/i]
@@ -171,7 +190,10 @@ var RISK = {
171
190
  docs_only: 0,
172
191
  reads_secrets: 2,
173
192
  network_calls: 1,
174
- executes_scripts: 5
193
+ executes_scripts: 5,
194
+ // fetch-and-execute from a non-standard source — the supply-chain pattern the
195
+ // AI verdict floors to "warning"; the heaviest penalty here for the same reason
196
+ untrusted_install: 15
175
197
  };
176
198
  var VERIFIED_FLOOR = 85;
177
199
  function qualityScore(diagnostics, security, opts = {}) {
@@ -296,6 +318,7 @@ export {
296
318
  MAX_NAME,
297
319
  MAX_SKILL_BYTES,
298
320
  RULES2 as RULES,
321
+ UNTRUSTED_INSTALL_RE,
299
322
  categorize,
300
323
  lint,
301
324
  parseSkillMd,