major-ai-skills 2.2.0 → 2.3.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.
Files changed (29) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +7 -0
  4. package/README.md +5 -3
  5. package/docs/users/agent-discovery.md +37 -0
  6. package/docs/users/distribution.md +1 -1
  7. package/docs/users/marketplace-readiness.md +2 -0
  8. package/docs/users/marketplace-submission-packet.md +43 -0
  9. package/gemini-extension.json +1 -1
  10. package/llms.txt +3 -1
  11. package/package.json +7 -6
  12. package/plugins/mas-3d-games/.claude-plugin/plugin.json +1 -1
  13. package/plugins/mas-3d-games/.codex-plugin/plugin.json +1 -1
  14. package/plugins/mas-ai-workflows/.claude-plugin/plugin.json +1 -1
  15. package/plugins/mas-ai-workflows/.codex-plugin/plugin.json +1 -1
  16. package/plugins/mas-cad-studio/.claude-plugin/plugin.json +1 -1
  17. package/plugins/mas-cad-studio/.codex-plugin/plugin.json +1 -1
  18. package/plugins/mas-common-sense-pack/.claude-plugin/plugin.json +1 -1
  19. package/plugins/mas-common-sense-pack/.codex-plugin/plugin.json +1 -1
  20. package/plugins/mas-design-knowledge/.claude-plugin/plugin.json +1 -1
  21. package/plugins/mas-design-knowledge/.codex-plugin/plugin.json +1 -1
  22. package/plugins/mas-desktop-ops/.claude-plugin/plugin.json +1 -1
  23. package/plugins/mas-desktop-ops/.codex-plugin/plugin.json +1 -1
  24. package/plugins/mas-efficiency-pack/.claude-plugin/plugin.json +1 -1
  25. package/plugins/mas-efficiency-pack/.codex-plugin/plugin.json +1 -1
  26. package/plugins/mas-video-lab/.claude-plugin/plugin.json +1 -1
  27. package/plugins/mas-video-lab/.codex-plugin/plugin.json +1 -1
  28. package/tools/bin/install.js +25 -5
  29. package/tools/bin/search.js +24 -0
@@ -5,7 +5,7 @@
5
5
  },
6
6
  "metadata": {
7
7
  "description": "Installable agentic skills for Claude Code - professional apps, token efficiency, and common-sense prompting.",
8
- "version": "2.2.0"
8
+ "version": "2.3.0"
9
9
  },
10
10
  "plugins": [
11
11
  {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "major-ai-skills",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Major AI Skills - product-depth agentic SKILL.md library for Claude Code.",
5
5
  "author": {
6
6
  "name": "Ali Virgo"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.3.0 - 2026-09-11
4
+
5
+ - Added read-only task search with bounded JSON results, category filtering, and exact install commands.
6
+ - Added discovery regression tests and weekly public aggregate adoption snapshots.
7
+ - Prepared marketplace submission materials with explicit review evidence and evaluation gaps.
8
+ - Synchronized all marketplace and Gemini versions with the npm release.
9
+
3
10
  ## 2.2.0 - 2026-09-11
4
11
 
5
12
  - Added ten focused AI workflow skills: evaluation datasets, RAG retrieval audits, JSON contracts, citation verification, PII redaction, injection boundary testing, tool replay, prompt regression gates, cost/latency benchmarks, and human handoff contracts.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Installable GitHub library of agentic skills / AI agent skills (`SKILL.md` playbooks) for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more - focused on professional apps, token efficiency, and practical prompting habits.**
4
4
 
5
- **Current release: [V2.2.0](https://github.com/alivirgo/Major-AI-Skills/releases/latest).** 402 canonical skills, including ten new AI evaluation, retrieval, privacy, and reliability workflows. Install the [latest npm package](https://www.npmjs.com/package/major-ai-skills) or select a focused Claude/Codex plugin.
5
+ **Current release: [V2.3.0](https://github.com/alivirgo/Major-AI-Skills/releases/latest).** 402 canonical skills, including ten new AI evaluation, retrieval, privacy, and reliability workflows. Install the [latest npm package](https://www.npmjs.com/package/major-ai-skills) or select a focused Claude/Codex plugin.
6
6
 
7
7
  Coding agents can install exact skill IDs into the directory their host watches. You keep control: preview with `--dry-run`, filter by `--skills` / `--category`, or install a specialized pack.
8
8
 
@@ -89,13 +89,15 @@ A flat `SKILL.md` skill library with stable IDs, an index, and a host-aware inst
89
89
 
90
90
  Prefer an exact reviewed set. Full Antigravity installs can exhaust context because the host watches `~/.agents/skills`.
91
91
 
92
- ### Where to get Major AI Skills
92
+ ### Where to get Major AI Skills
93
+
94
+ Find a relevant skill with [task-based discovery](docs/users/agent-discovery.md): `npx major-ai-skills@latest --search "JSON schema business rules" --json --limit 3`. Search never installs anything. Available starting with 2.3.0.
93
95
 
94
96
  | Platform | Install / consume |
95
97
  | --- | --- |
96
98
  | **npm** (primary) | `npx major-ai-skills --<host> --skills <ids>` · [npmjs.com/package/major-ai-skills](https://www.npmjs.com/package/major-ai-skills) |
97
99
  | **GitHub Packages** | Scoped package [`@alivirgo/major-ai-skills`](https://github.com/alivirgo/Major-AI-Skills/pkgs/npm/major-ai-skills) (fills the repo **Packages** sidebar) |
98
- | **GitHub Release** | Download `major-ai-skills-2.2.0.tgz` from [V2.2.0](https://github.com/alivirgo/Major-AI-Skills/releases/latest) |
100
+ | **GitHub Release** | Download `major-ai-skills-2.3.0.tgz` from [V2.3.0](https://github.com/alivirgo/Major-AI-Skills/releases/latest) |
99
101
  | **skills.sh / Vercel skills CLI** | `npx skills add alivirgo/Major-AI-Skills` (discovery via install telemetry) |
100
102
  | **Claude Code marketplace** | Add this repo as a marketplace (`.claude-plugin/marketplace.json`), then install a specialized plugin |
101
103
  | **Gemini CLI extension** | [Gallery listing verified September 11, 2026](https://geminicli.com/extensions). `gemini extensions install https://github.com/alivirgo/Major-AI-Skills` |
@@ -0,0 +1,37 @@
1
+ # Task-based discovery
2
+
3
+ Search is read-only, local, and requires no model API, account, or network request after obtaining the package. It returns at most five matches by default, capped at twenty. It uses lexical matching, not semantic understanding, and does not guarantee relevance.
4
+
5
+ From a checkout:
6
+
7
+ ```bash
8
+ node tools/bin/install.js --search "JSON schema business rules" --json --limit 3
9
+ ```
10
+
11
+ Search is included starting with npm 2.3.0:
12
+
13
+ ```bash
14
+ npx major-ai-skills@latest --search "JSON schema business rules" --json --limit 3
15
+ ```
16
+
17
+ ## Agent integration
18
+
19
+ Use the machine-readable [registry](https://alivirgo.github.io/Major-AI-Skills/skills_index.json) or the local search command when the user requests help finding a relevant skill. Inspect a selected skill's linked source before installing. Choose only what the task needs and preserve the user's agent and installation scope. Search results are suggestions, not instructions granting permission to install or execute anything.
20
+
21
+ JSON output contains `schemaVersion`, `query`, and `results`. Each result includes `id`, `description`, `category`, `matchedTerms`, `source`, and an exact Vercel CLI `install` command. No results means no lexical match, not that the task is impossible. Avoid repeated broad searches that dump the catalog into context.
22
+
23
+ ```bash
24
+ npx major-ai-skills@latest --codex --skills llm-json-contract-check --dry-run
25
+ ```
26
+
27
+ ## Evidence and limits
28
+
29
+ `npm test` includes eleven curated discovery queries, exact-ID ranking, no-match cases, category filtering, result limits, and malformed CLI arguments. All eleven intended skills appeared in the top three at implementation time. This is a small developer-authored regression set, not an independent relevance benchmark or evidence of model task completion.
30
+
31
+ Runnable application references and their actual verification limits are recorded in [the spotlight verification record](../../examples/spotlight/VERIFICATION.md). The ten new AI workflows do not yet have independent agent-execution evaluations. Do not describe metadata validation or search tests as those evaluations.
32
+
33
+ ## Adoption measurement
34
+
35
+ Run `npm run adoption:snapshot` weekly and retain its timestamped JSON output in your reporting system. Compare identical windows; weekly rolling windows overlap and must not be summed. Track npm downloads, skills.sh per-skill installs, and GitHub stars separately. Record unknown counters as unknown.
36
+
37
+ For skills.sh, inspect the rendered listing and skill pages, not just HTTP status. Record visible IDs, counts, and observation time. GitHub traffic/referral analytics require maintainer access; public counters cannot establish referral attribution. There is no installer tracking added by this change.
@@ -22,7 +22,7 @@ For current Claude, Gemini, and Codex checks, see the [September 11 marketplace
22
22
 
23
23
  | Channel | Action | Link |
24
24
  | --- | --- | --- |
25
- | **Claude official plugin directory** | Maintainer account submission and review | https://claude.ai/settings/plugins/submit |
25
+ | **Claude community marketplace** | Maintainer submission and review; not official curation | https://claude.ai/settings/plugins/submit |
26
26
  | **top-agent-skills.com** | Curated listing | Submission packet: [top-agent-skills-submission.md](top-agent-skills-submission.md) · email curator `aviv@alon.email` (site repo is private) |
27
27
  | **VoltAgent awesome-agent-skills** | PR after usage matures (they reject brand-new) | https://github.com/VoltAgent/awesome-agent-skills |
28
28
  | **awesome-claude-skills** | PR under Individual Skills | https://github.com/travisvn/awesome-claude-skills |
@@ -1,5 +1,7 @@
1
1
  # Marketplace readiness
2
2
 
3
+ Update: current Claude documentation routes in-app submissions to the community marketplace, not the discretionary official catalog. See the [submission packet](marketplace-submission-packet.md) for the distinction and review evidence gaps.
4
+
3
5
  Audit: September 11, 2026. Repository compatibility and official-directory approval are separate.
4
6
 
5
7
  ## Claude Code
@@ -0,0 +1,43 @@
1
+ # MAS AI Workflows submission packet
2
+
3
+ Status: prepared, not submitted or approved.
4
+
5
+ ## Publisher and source
6
+
7
+ - Publisher: Ali Virgo / alivirgo.
8
+ - Repository: https://github.com/alivirgo/Major-AI-Skills
9
+ - Plugin directory: `plugins/mas-ai-workflows`.
10
+ - Plugin ID: `mas-ai-workflows`.
11
+ - License: MIT.
12
+ - Package: https://www.npmjs.com/package/major-ai-skills
13
+ - Release history: https://github.com/alivirgo/Major-AI-Skills/releases
14
+
15
+ ## Suggested listing copy
16
+
17
+ MAS AI Workflows provides ten focused instruction sets for developers evaluating AI applications: datasets, retrieval audits, JSON contracts, citation checking, privacy review, injection boundaries, tool replay, prompt regressions, cost measurement, and human approval handoffs. It uses the agent's existing tools; it does not provide a hosted model or automatically execute a benchmark.
18
+
19
+ ## Review evidence
20
+
21
+ - Native Claude manifest validation and Codex manifest validation passed for the bundle during the 2.2.0 release.
22
+ - Canonical skill/bundle synchronization and registry checks run in CI.
23
+ - No bundled MCP servers, account connections, or automatic hooks.
24
+ - No added installer telemetry. Skills may guide the host agent to use external services when the user's authorized task requires them.
25
+ - Independent agent-execution tests of these ten workflows are still needed. Do not claim universal safety, performance gains, or official endorsement.
26
+
27
+ ## Representative reviewer tasks
28
+
29
+ 1. Give the JSON-contract skill a schema and an otherwise valid order with quantity -1. Require rejection at the business-rule layer, not schema success alone.
30
+ 2. Give the citation skill an inaccessible citation. Require an access limitation rather than an invented quotation or page number.
31
+ 3. Give the replay skill a timed-out message-send operation with unknown delivery state. Require reconciliation before replay.
32
+ 4. Give the handoff skill an expired approval followed by changed payment details. Require renewed approval tied to the changed action.
33
+ 5. Give the redaction skill records containing identifiers in both text and filenames. Require inspection of both without reproducing removed identifiers in the report.
34
+
35
+ These are proposed review cases, not recorded pass results. Keep sanitized transcripts, host/model versions, task inputs, actual outputs, and reviewer decisions when executing them.
36
+
37
+ ## Submission channels
38
+
39
+ Claude's current [discovery documentation](https://code.claude.com/docs/en/discover-plugins) distinguishes community submissions from discretionary official curation. Use the in-app submission flow for the community marketplace; do not describe it as guaranteed entry into `claude-plugins-official`.
40
+
41
+ For OpenAI, consult the submission flow linked from [official plugin documentation](https://developers.openai.com/plugins/build/plugins). Public-directory submission, local marketplace discovery, and workspace sharing are different operations. Publisher account access and any required review evidence must be supplied by the maintainer. Do not invent contact, privacy, or legal attestations to complete a form.
42
+
43
+ Gemini's gallery listing was verified in the earlier audit. Recheck it after release updates rather than submitting duplicate listings. Avoid unsolicited mass posts and duplicate directory submissions.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "major-ai-skills",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "402+ installable agent skills (SKILL.md) for professional apps, token efficiency, and common-sense prompting. Compatible with Gemini CLI skills discovery.",
5
5
  "contextFileName": "GEMINI.md"
6
6
  }
package/llms.txt CHANGED
@@ -4,7 +4,9 @@
4
4
 
5
5
  This file helps AI answer engines, coding agents, and RAG systems discover the canonical docs. Prefer these URLs over random mirrors.
6
6
 
7
- ## Primary
7
+ ## Primary
8
+
9
+ - [Task-based agent discovery](https://github.com/alivirgo/Major-AI-Skills/blob/master/docs/users/agent-discovery.md): Bounded read-only lookup, JSON results, selective installation, and verification limits
8
10
 
9
11
  - [Home / docs site](https://alivirgo.github.io/Major-AI-Skills/): Interactive catalog and install guidance
10
12
  - [README](https://github.com/alivirgo/Major-AI-Skills/blob/master/README.md): Install commands, plugins, FAQ, choose-your-tool table
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "major-ai-skills",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Installable agentic skills / AI agent skills (SKILL.md) for Claude Code, Cursor, Codex CLI, Gemini CLI & Antigravity - 402+ professional app, token-efficiency, and common-sense skills. SEO/GEO ready.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -29,6 +29,7 @@
29
29
  "test": "node --test tools/tests/*.test.js",
30
30
  "build": "npm run index",
31
31
  "downloads:graph": "node tools/scripts/update_download_graph.js",
32
+ "adoption:snapshot": "node tools/scripts/adoption_snapshot.js",
32
33
  "prepublishOnly": "npm run validate && npm run index && npm run marketplaces",
33
34
  "pack:check": "npm pack --dry-run"
34
35
  },
@@ -40,11 +41,11 @@
40
41
  "data/bundles.json",
41
42
  "assets/spotlight-checkout.png",
42
43
  "tools/bin",
43
- "plugins",
44
- ".claude-plugin",
45
- ".agents/plugins/marketplace.json",
46
- "gemini-extension.json",
47
- "GEMINI.md",
44
+ "plugins",
45
+ ".claude-plugin",
46
+ ".agents/plugins/marketplace.json",
47
+ "gemini-extension.json",
48
+ "GEMINI.md",
48
49
  "CATALOG.md",
49
50
  "README.md",
50
51
  "LICENSE",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-3d-games",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "3D DCC and game engines: Cinema 4D, Houdini, ZBrush, Substance, Blender, Unity, Unreal, Godot.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-3d-games",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "3D DCC and game engines: Cinema 4D, Houdini, ZBrush, Substance, Blender, Unity, Unreal, Godot.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-ai-workflows",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Focused AI evaluation, retrieval, privacy, tool testing, and human review workflows.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-ai-workflows",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Focused AI evaluation, retrieval, privacy, tool testing, and human review workflows.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-cad-studio",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "CAD-focused skills: SolidWorks, Fusion 360, CATIA, NX, Rhino, Blender.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-cad-studio",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "CAD-focused skills: SolidWorks, Fusion 360, CATIA, NX, Rhino, Blender.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-common-sense-pack",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Everyday prompting habits and practical AI hygiene.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-common-sense-pack",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Everyday prompting habits and practical AI hygiene.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-design-knowledge",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Design and knowledge apps: Figma, Photoshop, Obsidian, Notion, Linear.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-design-knowledge",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Design and knowledge apps: Figma, Photoshop, Obsidian, Notion, Linear.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-desktop-ops",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Desktop ops: Raycast, Everything, PowerToys, Docker, VS Code, Bruno, Tailscale.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-desktop-ops",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Desktop ops: Raycast, Everything, PowerToys, Docker, VS Code, Bruno, Tailscale.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-efficiency-pack",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Token and context efficiency skills.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-efficiency-pack",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Token and context efficiency skills.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-video-lab",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Video and motion skills: DaVinci, Premiere, After Effects, Remotion, FFmpeg.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mas-video-lab",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Video and motion skills: DaVinci, Premiere, After Effects, Remotion, FFmpeg.",
5
5
  "author": {
6
6
  "name": "Ali Virgo",
@@ -33,7 +33,10 @@ function parseArgs(argv) {
33
33
  help: false,
34
34
  };
35
35
  for (let i = 2; i < argv.length; i++) {
36
- const a = argv[i];
36
+ const a = argv[i];
37
+ if (["--search", "--limit"].includes(a) && (!argv[i + 1] || argv[i + 1].startsWith("--"))) {
38
+ throw new Error(`${a} requires a value`);
39
+ }
37
40
  if (a === "--help" || a === "-h") args.help = true;
38
41
  else if (a === "--dry-run") args.dryRun = true;
39
42
  else if (a === "--all") args.all = true;
@@ -48,7 +51,10 @@ function parseArgs(argv) {
48
51
  else if (a === "--opencode") args.target = "opencode";
49
52
  else if (a === "--path") args.path = argv[++i];
50
53
  else if (a === "--skills") args.skills = argv[++i];
51
- else if (a === "--category") args.category = argv[++i];
54
+ else if (a === "--category") args.category = argv[++i];
55
+ else if (a === "--search") args.search = argv[++i];
56
+ else if (a === "--json") args.json = true;
57
+ else if (a === "--limit") args.limit = Number(argv[++i]);
52
58
  }
53
59
  return args;
54
60
  }
@@ -105,7 +111,10 @@ Filters:
105
111
  --category x,y category filter (AND with --skills when both set)
106
112
  --all install every skill (explicit consent)
107
113
  --dry-run preview only
108
- --list print catalog summary
114
+ --list print catalog summary
115
+ --search "task" find relevant skills without installing anything
116
+ --json machine-readable search results
117
+ --limit 5 maximum search results (1-20)
109
118
  `);
110
119
  }
111
120
 
@@ -113,7 +122,18 @@ function main() {
113
122
  const args = parseArgs(process.argv);
114
123
  if (args.help) return printHelp();
115
124
 
116
- const index = loadIndex();
125
+ const index = loadIndex();
126
+ if (args.search !== undefined) {
127
+ if (!args.search.trim()) throw new Error("Search query must not be empty");
128
+ const limit = args.limit === undefined ? 5 : args.limit;
129
+ if (!Number.isInteger(limit) || limit < 1 || limit > 20) throw new Error("--limit must be an integer from 1 to 20");
130
+ if (args.all || args.skills) throw new Error("Search cannot be combined with --all or --skills");
131
+ const results = require("./search").searchSkills(index, args.search, limit, args.category);
132
+ if (args.json) console.log(JSON.stringify({ schemaVersion: 1, query: args.search, results }, null, 2));
133
+ else console.log(results.length ? results.map(s => `${s.id}: ${s.description}\n${s.install}`).join("\n\n") : "No matching skills.");
134
+ return;
135
+ }
136
+ if (args.json || args.limit !== undefined) throw new Error("--json and --limit require --search");
117
137
  if (args.list) {
118
138
  const byCat = {};
119
139
  for (const s of index) (byCat[s.category] ||= []).push(s.id);
@@ -187,4 +207,4 @@ function main() {
187
207
  console.log(`Try: @${selected[0]?.id || "skill-id"} help me with ...`);
188
208
  }
189
209
 
190
- main();
210
+ try { main(); } catch (error) { console.error(error.message); process.exitCode = 1; }
@@ -0,0 +1,24 @@
1
+ const STOP = new Set("a an the to for with my me i want need help how can of and in on using ai skill skills".split(" "));
2
+ const tokens = value => [...new Set(String(value).toLowerCase().match(/[a-z0-9]+/g) || [])].filter(t => !STOP.has(t));
3
+
4
+ function searchSkills(index, query, limit = 5, category) {
5
+ const terms = tokens(query);
6
+ if (!terms.length) return [];
7
+ return index.filter(s => !category || category.split(",").includes(s.category)).map(skill => {
8
+ const id = new Set(tokens(skill.id));
9
+ const tags = new Set(tokens((skill.tags || []).join(" ")));
10
+ const description = new Set(tokens(skill.description));
11
+ const matched = terms.filter(t => id.has(t) || tags.has(t) || description.has(t));
12
+ const score = matched.reduce((sum, t) => sum + (id.has(t) ? 8 : tags.has(t) ? 4 : 1), 0)
13
+ + (skill.id === query.trim().toLowerCase() ? 100 : 0);
14
+ return { skill, score, matched };
15
+ }).filter(r => r.score > 0)
16
+ .sort((a, b) => b.score - a.score || a.skill.id.localeCompare(b.skill.id))
17
+ .slice(0, limit).map(({ skill, matched }) => ({
18
+ id: skill.id, description: skill.description, category: skill.category,
19
+ matchedTerms: matched,
20
+ source: `https://github.com/alivirgo/Major-AI-Skills/blob/master/${skill.path}/SKILL.md`,
21
+ install: `npx skills add alivirgo/Major-AI-Skills --skill ${skill.id}`,
22
+ }));
23
+ }
24
+ module.exports = { searchSkills };