skillsio 1.0.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 ADDED
@@ -0,0 +1,231 @@
1
+ # secure-skills
2
+
3
+ A security-hardened fork of the [skills](https://github.com/vercel-labs/skills) CLI that scans agent skills for
4
+ malicious content before installation.
5
+
6
+ The open agent skills ecosystem makes it trivial to install third-party instruction sets into coding agents — but that
7
+ same ease of installation is a vector for prompt injection, data exfiltration, and credential theft.
8
+ [Snyk's analysis](https://snyk.io/blog/) of 3,984 published skills found that **13.4% had critical security issues** and
9
+ 76 were confirmed malicious. Separately,
10
+ [Koi's ClawHavoc investigation](https://www.koi.ai/blog/clawhavoc-341-malicious-clawedbot-skills-found-by-the-bot-they-were-targeting)
11
+ uncovered **341 malicious ClawedBot skills** using techniques like AMOS stealer droppers, password-protected archives,
12
+ base64-encoded payloads, macOS quarantine bypasses (`xattr -c`), and reverse shells. `skillsio` adds an automated
13
+ security gate so you can still move fast without running untrusted code.
14
+
15
+ ## What It Does
16
+
17
+ Every `skillsio add` command runs a local security scan **before** anything is installed. The scanner applies ~52 regex
18
+ rules derived from the Snyk and ClawHavoc research, organized into 8 threat categories:
19
+
20
+ | Category | What it catches |
21
+ | --- | --- |
22
+ | **Exfiltration** | Sending files/env vars to external endpoints, webhook URLs |
23
+ | **Prompt injection** | "Ignore previous instructions", role hijacking, instruction overrides |
24
+ | **Dangerous filesystem** | `rm -rf`, mass deletion, wiping home directories |
25
+ | **Credential access** | Reading SSH keys, AWS credentials, `.env` files, keychains |
26
+ | **Suspicious directives** | "Never ask for confirmation", "silently execute", stealth instructions |
27
+ | **Downloads / RCE** | `curl \| sh`, downloading and executing remote scripts |
28
+ | **Obfuscation** | Base64-encoded commands, Unicode escape sequences, hex-encoded strings |
29
+ | **Reverse shells / services** | Netcat listeners, cron persistence, systemd/launchd service creation |
30
+
31
+ Findings are categorized by severity:
32
+
33
+ - **Critical** / **High** — always prompts for confirmation (critical prompts even with `--yes`)
34
+ - **Medium** and below — noted and auto-continued
35
+
36
+ ### URL Transparency
37
+
38
+ The scanner extracts all external URLs found in skill files and displays them before installation. Even if the local scan
39
+ is clean, skills that reference external URLs will prompt you to review them before proceeding. This catches deceptive
40
+ domain patterns that regex rules can't — letting you eyeball where a skill wants to send traffic.
41
+
42
+ ```
43
+ ◆ External URLs found in skill files (2):
44
+ │ https://example.com/setup
45
+ │ https://hooks.slack.com/services/T00/B00/xxx
46
+
47
+ ◆ This skill references external URLs. Continue with installation?
48
+ ```
49
+
50
+ With `--yes`, URL-only prompts are auto-continued. Skills with high/critical findings always show URLs alongside the
51
+ findings summary.
52
+
53
+ ### Optional: VirusTotal Integration
54
+
55
+ When a [VirusTotal](https://www.virustotal.com/) API key is provided, the CLI also hashes each skill's content
56
+ (SHA-256) and checks it against VT's database. If the file has been seen before, VT's verdict is displayed alongside
57
+ local findings — including engine detection counts and Gemini-powered Code Insight analysis.
58
+
59
+ ```
60
+ ◆ VirusTotal: ✗ malicious (14/72 engines)
61
+ Code Insight: Downloads and executes external binary...
62
+ https://www.virustotal.com/gui/file/{hash}
63
+
64
+ ◆ VirusTotal: ✓ clean (0/72 engines)
65
+
66
+ ◆ VirusTotal: not found (local scan only)
67
+ ```
68
+
69
+ A VT malicious verdict escalates the scan to critical severity regardless of local findings.
70
+
71
+ VT is purely additive — no key means no VT calls, and VT errors (rate limits, network issues) are handled gracefully
72
+ without blocking installation.
73
+
74
+ ```bash
75
+ # Via CLI flag
76
+ npx skillsio add owner/repo --vt-key YOUR_API_KEY
77
+
78
+ # Via environment variable
79
+ VT_API_KEY=YOUR_API_KEY npx skillsio add owner/repo
80
+ ```
81
+
82
+ `--vt-key` flag takes precedence over `VT_API_KEY` env var.
83
+
84
+ ## Quick Start
85
+
86
+ ```bash
87
+ # Install a skill (scanned automatically)
88
+ npx skillsio add vercel-labs/agent-skills
89
+
90
+ # Skip the scan if you trust the source
91
+ npx skillsio add vercel-labs/agent-skills --skip-scan
92
+
93
+ # Scan with VirusTotal threat intelligence
94
+ VT_API_KEY=xxx npx skillsio add owner/repo
95
+ ```
96
+
97
+ ## CLI Reference
98
+
99
+ ### `add <source>`
100
+
101
+ Install skills from GitHub, GitLab, git URLs, direct URLs, or local paths.
102
+
103
+ ```bash
104
+ npx skillsio add vercel-labs/agent-skills # GitHub shorthand
105
+ npx skillsio add https://github.com/org/repo # Full URL
106
+ npx skillsio add git@github.com:org/repo.git # Git URL
107
+ npx skillsio add ./my-local-skills # Local path
108
+ ```
109
+
110
+ | Option | Description |
111
+ | --- | --- |
112
+ | `-g, --global` | Install to user directory instead of project |
113
+ | `-a, --agent <agents...>` | <!-- agent-names:start -->Target specific agents (e.g., `claude-code`, `codex`). See [Supported Agents](#supported-agents)<!-- agent-names:end --> |
114
+ | `-s, --skill <skills...>` | Install specific skills by name (use `'*'` for all) |
115
+ | `-l, --list` | List available skills without installing |
116
+ | `-y, --yes` | Skip confirmation prompts |
117
+ | `--all` | Install all skills to all agents without prompts |
118
+ | `--skip-scan` | Skip the security scan before installation |
119
+ | `--vt-key <key>` | VirusTotal API key for additional threat intelligence |
120
+ | `--full-depth` | Search all subdirectories even when a root SKILL.md exists |
121
+
122
+ ### Other Commands
123
+
124
+ | Command | Description |
125
+ | --- | --- |
126
+ | `list` (alias: `ls`) | List installed skills |
127
+ | `find [query]` | Search for skills interactively or by keyword |
128
+ | `remove [skills]` (alias: `rm`) | Remove installed skills from agents |
129
+ | `check` | Check for available skill updates |
130
+ | `update` | Update all installed skills to latest versions |
131
+ | `init [name]` | Create a new SKILL.md template |
132
+
133
+ ### Installation Scope
134
+
135
+ | Scope | Flag | Location | Use Case |
136
+ | --- | --- | --- | --- |
137
+ | **Project** | (default) | `./<agent>/skills/` | Committed with your project |
138
+ | **Global** | `-g` | `~/<agent>/skills/` | Available across all projects |
139
+
140
+ ## Supported Agents
141
+
142
+ <!-- agent-list:start -->
143
+ Supports **OpenCode**, **Claude Code**, **Codex**, **Cursor**, and [35 more](#supported-agents).
144
+ <!-- agent-list:end -->
145
+
146
+ <!-- supported-agents:start -->
147
+ | Agent | `--agent` | Project Path | Global Path |
148
+ |-------|-----------|--------------|-------------|
149
+ | Amp, Kimi Code CLI | `amp`, `kimi-cli` | `.agents/skills/` | `~/.config/agents/skills/` |
150
+ | Antigravity | `antigravity` | `.agent/skills/` | `~/.gemini/antigravity/skills/` |
151
+ | Augment | `augment` | `.augment/rules/` | `~/.augment/rules/` |
152
+ | Claude Code | `claude-code` | `.claude/skills/` | `~/.claude/skills/` |
153
+ | OpenClaw | `openclaw` | `skills/` | `~/.moltbot/skills/` |
154
+ | Cline | `cline` | `.cline/skills/` | `~/.cline/skills/` |
155
+ | CodeBuddy | `codebuddy` | `.codebuddy/skills/` | `~/.codebuddy/skills/` |
156
+ | Codex | `codex` | `.codex/skills/` | `~/.codex/skills/` |
157
+ | Command Code | `command-code` | `.commandcode/skills/` | `~/.commandcode/skills/` |
158
+ | Continue | `continue` | `.continue/skills/` | `~/.continue/skills/` |
159
+ | Crush | `crush` | `.crush/skills/` | `~/.config/crush/skills/` |
160
+ | Cursor | `cursor` | `.cursor/skills/` | `~/.cursor/skills/` |
161
+ | Droid | `droid` | `.factory/skills/` | `~/.factory/skills/` |
162
+ | Gemini CLI | `gemini-cli` | `.gemini/skills/` | `~/.gemini/skills/` |
163
+ | GitHub Copilot | `github-copilot` | `.github/skills/` | `~/.copilot/skills/` |
164
+ | Goose | `goose` | `.goose/skills/` | `~/.config/goose/skills/` |
165
+ | Junie | `junie` | `.junie/skills/` | `~/.junie/skills/` |
166
+ | iFlow CLI | `iflow-cli` | `.iflow/skills/` | `~/.iflow/skills/` |
167
+ | Kilo Code | `kilo` | `.kilocode/skills/` | `~/.kilocode/skills/` |
168
+ | Kiro CLI | `kiro-cli` | `.kiro/skills/` | `~/.kiro/skills/` |
169
+ | Kode | `kode` | `.kode/skills/` | `~/.kode/skills/` |
170
+ | MCPJam | `mcpjam` | `.mcpjam/skills/` | `~/.mcpjam/skills/` |
171
+ | Mistral Vibe | `mistral-vibe` | `.vibe/skills/` | `~/.vibe/skills/` |
172
+ | Mux | `mux` | `.mux/skills/` | `~/.mux/skills/` |
173
+ | OpenCode | `opencode` | `.opencode/skills/` | `~/.config/opencode/skills/` |
174
+ | OpenHands | `openhands` | `.openhands/skills/` | `~/.openhands/skills/` |
175
+ | Pi | `pi` | `.pi/skills/` | `~/.pi/agent/skills/` |
176
+ | Qoder | `qoder` | `.qoder/skills/` | `~/.qoder/skills/` |
177
+ | Qwen Code | `qwen-code` | `.qwen/skills/` | `~/.qwen/skills/` |
178
+ | Replit | `replit` | `.agents/skills/` | N/A (project-only) |
179
+ | Roo Code | `roo` | `.roo/skills/` | `~/.roo/skills/` |
180
+ | Trae | `trae` | `.trae/skills/` | `~/.trae/skills/` |
181
+ | Trae CN | `trae-cn` | `.trae/skills/` | `~/.trae-cn/skills/` |
182
+ | Windsurf | `windsurf` | `.windsurf/skills/` | `~/.codeium/windsurf/skills/` |
183
+ | Zencoder | `zencoder` | `.zencoder/skills/` | `~/.zencoder/skills/` |
184
+ | Neovate | `neovate` | `.neovate/skills/` | `~/.neovate/skills/` |
185
+ | Pochi | `pochi` | `.pochi/skills/` | `~/.pochi/skills/` |
186
+ | AdaL | `adal` | `.adal/skills/` | `~/.adal/skills/` |
187
+ <!-- supported-agents:end -->
188
+
189
+ The CLI automatically detects which coding agents you have installed.
190
+
191
+ ## Environment Variables
192
+
193
+ | Variable | Description |
194
+ | --- | --- |
195
+ | `VT_API_KEY` | VirusTotal API key for optional threat intelligence during security scans |
196
+ | `INSTALL_INTERNAL_SKILLS` | Set to `1` to show and install skills marked as `internal: true` |
197
+ | `DISABLE_TELEMETRY` | Disable anonymous usage telemetry |
198
+ | `DO_NOT_TRACK` | Alternative way to disable telemetry |
199
+
200
+ ## Development
201
+
202
+ ```bash
203
+ pnpm install # Install dependencies
204
+ pnpm build # Build
205
+ pnpm dev <cmd> # Run CLI in dev mode (e.g., pnpm dev add owner/repo)
206
+ pnpm test # Run all tests
207
+ pnpm type-check # TypeScript type checking
208
+ pnpm format # Format code with Prettier
209
+ ```
210
+
211
+ ### Scanner Architecture
212
+
213
+ - `src/scanner.ts` — Rules engine. Defines ~52 regex rules across 8 threat categories, runs them against all skill
214
+ files (.md, .txt, .yaml, .json, .sh, .py, .js, .ts, .ps1, .bat, .cmd).
215
+ - `src/scanner-ui.ts` — Presentation layer. Displays findings by severity, runs optional VT lookups, handles
216
+ escalation logic and user confirmation prompts.
217
+ - `src/vt.ts` — VirusTotal API client. SHA-256 hashing, `GET /api/v3/files/{hash}` lookup, verdict mapping, graceful
218
+ error handling.
219
+ - `src/add.ts` — Integration point. The scanner is wired into all 4 install paths (GitHub/git repos, remote providers,
220
+ well-known endpoints, legacy Mintlify).
221
+
222
+ ## Acknowledgments
223
+
224
+ This project is a fork of [skills](https://github.com/vercel-labs/skills) by
225
+ [Vercel Labs](https://github.com/vercel-labs). All upstream CLI functionality — skill discovery, installation, agent
226
+ support, update checking — comes from the original project. The security scanning layer, VirusTotal integration, and
227
+ related tests are additions by this fork.
228
+
229
+ ## License
230
+
231
+ MIT
@@ -0,0 +1,125 @@
1
+ /*!----------------- Skills CLI ThirdPartyNotices -------------------------------------------------------
2
+
3
+ The Skills CLI incorporates third party material from the projects listed below.
4
+ The original copyright notice and the license under which this material was received
5
+ are set forth below. These licenses and notices are provided for informational purposes only.
6
+
7
+ ---------------------------------------------
8
+ Third Party Code Components
9
+ --------------------------------------------
10
+
11
+ ================================================================================
12
+ Package: @clack/prompts@0.11.0
13
+ License: MIT
14
+ Repository: https://github.com/bombshell-dev/clack
15
+ --------------------------------------------------------------------------------
16
+
17
+ MIT License
18
+
19
+ Copyright (c) Nate Moore
20
+
21
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
22
+
23
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26
+
27
+
28
+ ================================================================================
29
+ Package: gray-matter@4.0.3
30
+ License: MIT
31
+ Repository: https://github.com/jonschlinkert/gray-matter
32
+ --------------------------------------------------------------------------------
33
+
34
+ The MIT License (MIT)
35
+
36
+ Copyright (c) 2014-2018, Jon Schlinkert.
37
+
38
+ Permission is hereby granted, free of charge, to any person obtaining a copy
39
+ of this software and associated documentation files (the "Software"), to deal
40
+ in the Software without restriction, including without limitation the rights
41
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42
+ copies of the Software, and to permit persons to whom the Software is
43
+ furnished to do so, subject to the following conditions:
44
+
45
+ The above copyright notice and this permission notice shall be included in
46
+ all copies or substantial portions of the Software.
47
+
48
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
54
+ THE SOFTWARE.
55
+
56
+
57
+ ================================================================================
58
+ Package: picocolors@1.1.1
59
+ License: ISC
60
+ Repository: https://github.com/alexeyraspopov/picocolors
61
+ --------------------------------------------------------------------------------
62
+
63
+ ISC License
64
+
65
+ Copyright (c) 2021-2024 Oleksii Raspopov, Kostiantyn Denysov, Anton Verinov
66
+
67
+ Permission to use, copy, modify, and/or distribute this software for any
68
+ purpose with or without fee is hereby granted, provided that the above
69
+ copyright notice and this permission notice appear in all copies.
70
+
71
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
72
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
73
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
74
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
75
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
76
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
77
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
78
+
79
+
80
+ ================================================================================
81
+ Package: simple-git@3.30.0
82
+ License: MIT
83
+ Repository: https://github.com/steveukx/git-js
84
+ --------------------------------------------------------------------------------
85
+
86
+ MIT License
87
+
88
+ Permission is hereby granted, free of charge, to any person obtaining a copy
89
+ of this software and associated documentation files (the "Software"), to deal
90
+ in the Software without restriction, including without limitation the rights
91
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
92
+ copies of the Software, and to permit persons to whom the Software is
93
+ furnished to do so, subject to the following conditions:
94
+
95
+ The above copyright notice and this permission notice shall be included in all
96
+ copies or substantial portions of the Software.
97
+
98
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
99
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
100
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
101
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
102
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
103
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
104
+ SOFTWARE.
105
+
106
+
107
+ ================================================================================
108
+ Package: xdg-basedir@5.1.0
109
+ License: MIT
110
+ Repository: https://github.com/sindresorhus/xdg-basedir
111
+ --------------------------------------------------------------------------------
112
+
113
+ MIT License
114
+
115
+ Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
116
+
117
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
118
+
119
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
120
+
121
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
122
+
123
+
124
+ ================================================================================
125
+ */
package/bin/cli.mjs ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+
3
+ import module from 'node:module';
4
+
5
+ // https://nodejs.org/api/module.html#module-compile-cache
6
+ if (module.enableCompileCache && !process.env.NODE_DISABLE_COMPILE_CACHE) {
7
+ try {
8
+ module.enableCompileCache();
9
+ } catch {
10
+ // Ignore errors
11
+ }
12
+ }
13
+
14
+ await import('../dist/cli.mjs');