@agentskillshub/cli 0.2.1 β 0.2.3
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 +9 -5
- package/bin/ash.mjs +24 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@ npx @agentskillshub/cli search "scrape a website" --safe
|
|
|
11
11
|
Discovering a skill is easy. Knowing whether it's safe to run against your credentials is not. `ash` puts the trust signal *before* the install:
|
|
12
12
|
|
|
13
13
|
```
|
|
14
|
-
$
|
|
14
|
+
$ npx @agentskillshub/cli search postgres --category mcp-server --limit 2
|
|
15
15
|
|
|
16
16
|
call518/MCP-PostgreSQL-Ops 150β
π’ SAFE
|
|
17
17
|
Give AI assistants full PostgreSQL DBA superpowers β 30+ toolsβ¦
|
|
@@ -24,12 +24,16 @@ sgaunet/postgresql-mcp 5β
βͺ UNAUDITED ~23.0k tok
|
|
|
24
24
|
|
|
25
25
|
## Commands
|
|
26
26
|
|
|
27
|
+
Run via `npx @agentskillshub/cli <command>`. (A global `npm i -g` also exposes an
|
|
28
|
+
`ash` shorthand β but `ash` is the Almquist shell on Alpine/BusyBox, so the `npx`
|
|
29
|
+
form is the recommended, collision-free way to invoke it.)
|
|
30
|
+
|
|
27
31
|
| | |
|
|
28
32
|
|---|---|
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
+
| `search <query> [filters]` | Find skills. Filters: `--category` `--platform` `--min-stars` `--safe` `--limit` |
|
|
34
|
+
| `audit <owner/repo>` | Free basic trust check: security grade + plain-English verdict |
|
|
35
|
+
| `install <owner/repo>` | Install commands + "check before you install" safety line |
|
|
36
|
+
| `update` | Force-refresh the cached index |
|
|
33
37
|
|
|
34
38
|
Add `--json` to any of `search` / `audit` / `install` for machine-readable output.
|
|
35
39
|
|
package/bin/ash.mjs
CHANGED
|
@@ -45,6 +45,13 @@ const GRADE = {
|
|
|
45
45
|
// CJK detection β Chinese queries have no word boundaries, so we bigram them.
|
|
46
46
|
const CJK = /[δΈ-ιΏΏ]/;
|
|
47
47
|
|
|
48
|
+
// Generic terms that appear in ~half the catalog β they drown the distinctive
|
|
49
|
+
// part of a query. Ignored during scoring unless the whole query is generic.
|
|
50
|
+
const STOPWORDS = new Set([
|
|
51
|
+
"ai", "mcp", "mcps", "agent", "agents", "tool", "tools", "skill", "skills",
|
|
52
|
+
"server", "servers", "app", "apps", "ε·₯ε
·", "ζε‘ε¨", "ζε‘",
|
|
53
|
+
]);
|
|
54
|
+
|
|
48
55
|
// βββ tiny ANSI (auto-off when not a TTY / NO_COLOR) ββββββββββββββββββββββββββ
|
|
49
56
|
const tty = process.stdout.isTTY && !process.env.NO_COLOR;
|
|
50
57
|
const c = (code, s) => (tty ? `\x1b[${code}m${s}\x1b[0m` : s);
|
|
@@ -150,8 +157,14 @@ function scoreRow(row, tokens) {
|
|
|
150
157
|
// English-only repos via our curated scenario titles, and ranks
|
|
151
158
|
// scenario-relevant skills higher. Empty/undefined on older indexes.
|
|
152
159
|
const scen = (row.w || "").toLowerCase();
|
|
160
|
+
// When the query has a distinctive term, generic tokens (ai/mcp/agent/ε·₯ε
·β¦)
|
|
161
|
+
// match half the catalog and drown it β "ε» AI ε³" would rank vercel/ai over
|
|
162
|
+
// the actual humanizer. Skip generic tokens for scoring UNLESS the whole query
|
|
163
|
+
// is generic (then they're all we have).
|
|
164
|
+
const hasContent = tokens.some((t) => !STOPWORDS.has(t));
|
|
153
165
|
let score = 0;
|
|
154
166
|
for (const tok of tokens) {
|
|
167
|
+
if (hasContent && STOPWORDS.has(tok)) continue;
|
|
155
168
|
if (name === tok) score += 50;
|
|
156
169
|
else if (name.includes(tok)) score += 20;
|
|
157
170
|
if (full.includes(tok)) score += 8;
|
|
@@ -322,20 +335,20 @@ function fail(msg) {
|
|
|
322
335
|
process.exitCode = 1;
|
|
323
336
|
}
|
|
324
337
|
|
|
325
|
-
const
|
|
338
|
+
const RUN = "npx @agentskillshub/cli";
|
|
339
|
+
const HELP = `${bold("AgentSkillsHub CLI")} ${dim("Β· search Β· audit Β· install Β· ~20K skills")}
|
|
326
340
|
|
|
327
|
-
${bold("Usage")}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
ash --help
|
|
341
|
+
${bold("Usage")} ${dim("(globally installed? `ash <command>` also works)")}
|
|
342
|
+
${RUN} search <query> [--category <c>] [--platform <p>] [--min-stars <n>] [--safe] [--limit <n>] [--json]
|
|
343
|
+
${RUN} audit <owner/repo> [--json]
|
|
344
|
+
${RUN} install <owner/repo> [--json]
|
|
345
|
+
${RUN} update ${dim("force-refresh the cached index")}
|
|
333
346
|
|
|
334
347
|
${bold("Examples")}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
348
|
+
${RUN} search "scrape a website" --safe
|
|
349
|
+
${RUN} search postgres --category mcp-server --limit 5
|
|
350
|
+
${RUN} audit modelcontextprotocol/servers
|
|
351
|
+
${RUN} install owner/repo
|
|
339
352
|
|
|
340
353
|
${dim("Index is a static CDN file, downloaded once and cached at")} ${CACHE_DIR}
|
|
341
354
|
${dim("Refreshes every 8h. Zero backend load. Set NO_COLOR=1 to disable color.")}`;
|
package/package.json
CHANGED