@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.
Files changed (3) hide show
  1. package/README.md +9 -5
  2. package/bin/ash.mjs +24 -11
  3. 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
- $ ash search postgres --category mcp-server --limit 2
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
- | `ash search <query> [filters]` | Find skills. Filters: `--category` `--platform` `--min-stars` `--safe` `--limit` |
30
- | `ash audit <owner/repo>` | Free basic trust check: security grade + plain-English verdict |
31
- | `ash install <owner/repo>` | Install commands + "check before you install" safety line |
32
- | `ash update` | Force-refresh the cached index |
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 HELP = `${bold("ash")} β€” AgentSkillsHub CLI ${dim("Β· search Β· audit Β· install Β· ~20K skills")}
338
+ const RUN = "npx @agentskillshub/cli";
339
+ const HELP = `${bold("AgentSkillsHub CLI")} ${dim("Β· search Β· audit Β· install Β· ~20K skills")}
326
340
 
327
- ${bold("Usage")}
328
- ash search <query> [--category <c>] [--platform <p>] [--min-stars <n>] [--safe] [--limit <n>] [--json]
329
- ash audit <owner/repo> [--json]
330
- ash install <owner/repo> [--json]
331
- ash update force-refresh the cached index
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
- ash search "scrape a website" --safe
336
- ash search postgres --category mcp-server --limit 5
337
- ash audit modelcontextprotocol/servers
338
- ash install owner/repo
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentskillshub/cli",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Search, audit, and install open-source AI agent skills & MCP servers from the terminal β€” security-graded, quality-scored.",
5
5
  "type": "module",
6
6
  "bin": {