superskills 0.1.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 (93) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +363 -0
  3. package/bin/superskills +6 -0
  4. package/dist/catalog/index.d.ts +11 -0
  5. package/dist/catalog/index.d.ts.map +1 -0
  6. package/dist/catalog/index.js +203 -0
  7. package/dist/catalog/index.js.map +1 -0
  8. package/dist/catalog/tools-catalog.json +243 -0
  9. package/dist/catalog/types.d.ts +59 -0
  10. package/dist/catalog/types.d.ts.map +1 -0
  11. package/dist/catalog/types.js +2 -0
  12. package/dist/catalog/types.js.map +1 -0
  13. package/dist/catalog/ui.d.ts +4 -0
  14. package/dist/catalog/ui.d.ts.map +1 -0
  15. package/dist/catalog/ui.js +86 -0
  16. package/dist/catalog/ui.js.map +1 -0
  17. package/dist/cli/colors.d.ts +8 -0
  18. package/dist/cli/colors.d.ts.map +1 -0
  19. package/dist/cli/colors.js +11 -0
  20. package/dist/cli/colors.js.map +1 -0
  21. package/dist/discovery/analyze.d.ts +5 -0
  22. package/dist/discovery/analyze.d.ts.map +1 -0
  23. package/dist/discovery/analyze.js +190 -0
  24. package/dist/discovery/analyze.js.map +1 -0
  25. package/dist/discovery/core.d.ts +16 -0
  26. package/dist/discovery/core.d.ts.map +1 -0
  27. package/dist/discovery/core.js +51 -0
  28. package/dist/discovery/core.js.map +1 -0
  29. package/dist/discovery/index.d.ts +4 -0
  30. package/dist/discovery/index.d.ts.map +1 -0
  31. package/dist/discovery/index.js +233 -0
  32. package/dist/discovery/index.js.map +1 -0
  33. package/dist/discovery/schema.d.ts +111 -0
  34. package/dist/discovery/schema.d.ts.map +1 -0
  35. package/dist/discovery/schema.js +87 -0
  36. package/dist/discovery/schema.js.map +1 -0
  37. package/dist/discovery/types.d.ts +56 -0
  38. package/dist/discovery/types.d.ts.map +1 -0
  39. package/dist/discovery/types.js +2 -0
  40. package/dist/discovery/types.js.map +1 -0
  41. package/dist/index.d.ts +3 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +523 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/scaffold/index.d.ts +4 -0
  46. package/dist/scaffold/index.d.ts.map +1 -0
  47. package/dist/scaffold/index.js +262 -0
  48. package/dist/scaffold/index.js.map +1 -0
  49. package/dist/scaffold/templates/claude-md.d.ts +4 -0
  50. package/dist/scaffold/templates/claude-md.d.ts.map +1 -0
  51. package/dist/scaffold/templates/claude-md.js +229 -0
  52. package/dist/scaffold/templates/claude-md.js.map +1 -0
  53. package/dist/scaffold/templates/claude-settings.d.ts +3 -0
  54. package/dist/scaffold/templates/claude-settings.d.ts.map +1 -0
  55. package/dist/scaffold/templates/claude-settings.js +48 -0
  56. package/dist/scaffold/templates/claude-settings.js.map +1 -0
  57. package/dist/scaffold/templates/env-example.d.ts +3 -0
  58. package/dist/scaffold/templates/env-example.d.ts.map +1 -0
  59. package/dist/scaffold/templates/env-example.js +103 -0
  60. package/dist/scaffold/templates/env-example.js.map +1 -0
  61. package/dist/scaffold/templates/package-json.d.ts +2 -0
  62. package/dist/scaffold/templates/package-json.d.ts.map +1 -0
  63. package/dist/scaffold/templates/package-json.js +56 -0
  64. package/dist/scaffold/templates/package-json.js.map +1 -0
  65. package/dist/scaffold/templates/project-files.d.ts +4 -0
  66. package/dist/scaffold/templates/project-files.d.ts.map +1 -0
  67. package/dist/scaffold/templates/project-files.js +459 -0
  68. package/dist/scaffold/templates/project-files.js.map +1 -0
  69. package/dist/scaffold/templates/skill-agents.d.ts +4 -0
  70. package/dist/scaffold/templates/skill-agents.d.ts.map +1 -0
  71. package/dist/scaffold/templates/skill-agents.js +68 -0
  72. package/dist/scaffold/templates/skill-agents.js.map +1 -0
  73. package/dist/scaffold/templates/skill-commands.d.ts +3 -0
  74. package/dist/scaffold/templates/skill-commands.d.ts.map +1 -0
  75. package/dist/scaffold/templates/skill-commands.js +509 -0
  76. package/dist/scaffold/templates/skill-commands.js.map +1 -0
  77. package/dist/scaffold/templates/teammate-prompts.d.ts +8 -0
  78. package/dist/scaffold/templates/teammate-prompts.d.ts.map +1 -0
  79. package/dist/scaffold/templates/teammate-prompts.js +506 -0
  80. package/dist/scaffold/templates/teammate-prompts.js.map +1 -0
  81. package/dist/scaffold/types.d.ts +68 -0
  82. package/dist/scaffold/types.d.ts.map +1 -0
  83. package/dist/scaffold/types.js +2 -0
  84. package/dist/scaffold/types.js.map +1 -0
  85. package/dist/scaffold/ui.d.ts +5 -0
  86. package/dist/scaffold/ui.d.ts.map +1 -0
  87. package/dist/scaffold/ui.js +127 -0
  88. package/dist/scaffold/ui.js.map +1 -0
  89. package/dist/utils/logger.d.ts +3 -0
  90. package/dist/utils/logger.d.ts.map +1 -0
  91. package/dist/utils/logger.js +8 -0
  92. package/dist/utils/logger.js.map +1 -0
  93. package/package.json +69 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 Play New
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,363 @@
1
+ ```
2
+ ____ ____ __ _ ____
3
+ / ___| _ _ _ __ ___ _ _/ ___|| | _(_) | |___
4
+ \___ \| | | | '_ \ / _ \ '__\___ \| |/ / | | / __|
5
+ ___) | |_| | |_) | __/ | ___) | <| | | \__ \
6
+ |____/ \__,_| .__/ \___|_| |____/|_|\_\_|_|_|___/
7
+ |_|
8
+ ```
9
+
10
+ Five autonomous skills for AI-native product development.
11
+
12
+ Two ways to use SuperSkills:
13
+
14
+ 1. **Existing project.** Copy one or more skills into any codebase. They work immediately as Claude Code slash commands. No scaffold, no dependencies, no lock-in.
15
+ 2. **New project.** Describe a business problem. SuperSkills generates a full Next.js + Supabase project with the five skills already configured.
16
+
17
+ ## What AI-native means
18
+
19
+ Every component in a value chain evolves from custom-built to commodity. Databases took two decades. Data processing is getting there now. Building an AI-native product means understanding this movement and acting on three consequences:
20
+
21
+ 1. **What to automate.** Components that reached commodity (data storage, text extraction, basic analysis) get automated. No competitive advantage in doing them manually.
22
+ 2. **Where to differentiate.** The edge moves to what sits above commodity in the chain: connecting data sources nobody was combining, interpreting patterns in context, delivering findings to the person who can act on them before the window closes.
23
+ 3. **What to create.** Commodity processing opens opportunities that didn't exist before. A B2B distributor can now predict supplier delays from lead time trends and reroute orders automatically. That product wasn't viable when the analysis alone cost three analyst-weeks.
24
+
25
+ Every skill checks code against four layers:
26
+
27
+ | Layer | What it does |
28
+ |-------|-------------|
29
+ | **E**nrichment | Connect and normalize data from scattered sources (email, ERP, APIs, portals) |
30
+ | **I**nference | Detect patterns, predict outcomes, flag anomalies |
31
+ | **I**nterpretation | Decide what matters and how to frame it for the human |
32
+ | **D**elivery | Push insights where people are, triggered by the right conditions |
33
+
34
+ This is **EIID**. Discovery maps your business problem to these four layers. Every skill checks your code against this mapping.
35
+
36
+ ```
37
+ describe problem ──> discovery ──> tools ──> scaffold ──> working project
38
+ you EIID auto auto Next.js + Supabase
39
+ analysis selected generated + 5 autonomous skills
40
+ ```
41
+
42
+ ## Prerequisites
43
+
44
+ **For standalone skills:** just Claude Code. Nothing else to install.
45
+
46
+ **For the CLI (new project generation):**
47
+ - Node.js 20 or later. Check with `node --version`.
48
+ - An Anthropic API key: [console.anthropic.com/settings/keys](https://console.anthropic.com/settings/keys). Free tier available. Not needed from Claude Code.
49
+
50
+ ## Install
51
+
52
+ ```bash
53
+ git clone https://github.com/Play-New/SuperSkills.git
54
+ cd SuperSkills && npm install && npm run build && npm link
55
+ ```
56
+
57
+ After `npm link`, the `superskills` command works globally.
58
+
59
+ If you only need the standalone skills (no CLI), skip the install. Just clone and copy the skill folders into your project (see below).
60
+
61
+ ## Add skills to an existing project
62
+
63
+ Each skill works standalone on any codebase. No CLI install, no scaffold, no API key.
64
+
65
+ ```bash
66
+ # Clone once
67
+ git clone https://github.com/Play-New/SuperSkills.git
68
+
69
+ # Copy the skills you need into your project
70
+ cp -r SuperSkills/skills/trust/.claude/ your-project/.claude/
71
+ cp -r SuperSkills/skills/design/.claude/ your-project/.claude/
72
+ ```
73
+
74
+ The `.claude/` folders merge. Open the project in Claude Code and run:
75
+
76
+ ```
77
+ /trust-audit OWASP Top 10 + GDPR scan on your existing code
78
+ /design-review Audit shadcn usage, a11y, tokens, responsive
79
+ ```
80
+
81
+ That's it. The skills read your code, check it against their rules, and append findings to CLAUDE.md.
82
+
83
+ ### Add autonomous hooks (optional)
84
+
85
+ Without hooks, you run skills manually via slash commands. With hooks, trust checks every file write automatically and tests run before every stop.
86
+
87
+ ```bash
88
+ cp SuperSkills/skills/settings.json your-project/.claude/settings.json
89
+ ```
90
+
91
+ If you already have a `.claude/settings.json`, merge the hooks manually instead of overwriting.
92
+
93
+ This adds: security gate on every Write/Edit, security gate on Bash commands, test verification + full audit (trust, strategy, design) before stopping.
94
+
95
+ ### Available skills
96
+
97
+ | Skill | What It Checks | Commands |
98
+ |-------|---------------|----------|
99
+ | **strategy** | EIID alignment, scope creep, opportunity suggestions | `/strategy-start`, `-init`, `-review` |
100
+ | **design** | shadcnblocks/shadcn usage, WCAG 2.1 AA, design tokens | `/design-init`, `-review` |
101
+ | **trust** | OWASP Top 10, GDPR, hardcoded secrets, injection, auth | `/trust-init`, `-audit` |
102
+ | **testing** | vitest + Playwright, test pass/fail, coverage gaps | `/testing-init`, `-verify` |
103
+ | **efficiency** | Bundle size, Core Web Vitals, N+1 queries, API costs | `/efficiency-init`, `-review` |
104
+
105
+ All skills include best practices for Supabase, Vercel, Inngest, and Next.js. Each skill folder has a README with details.
106
+
107
+ ### As plugins (Claude Code or Cowork)
108
+
109
+ Skills are also available as Claude Code plugins with namespaced commands (`/strategy:start` instead of `/strategy-start`).
110
+
111
+ ```bash
112
+ # Load locally
113
+ claude --plugin-dir SuperSkills/plugins/strategy
114
+
115
+ # Or zip for Cowork
116
+ cd plugins && zip -r strategy.zip strategy/
117
+ # Drag into Cowork's Plugins tab
118
+ ```
119
+
120
+ ## Generate a new project
121
+
122
+ For new projects, the CLI runs the full pipeline: describe the problem, analyze it through EIID, pick tools, generate everything.
123
+
124
+ ```bash
125
+ superskills
126
+ ```
127
+
128
+ It asks about your business problem step by step. If you don't have an API key set, it asks for one.
129
+
130
+ Optional one-time setup (saves your API key so you don't paste it every time):
131
+
132
+ ```bash
133
+ superskills init
134
+ ```
135
+
136
+ ### From Claude Code
137
+
138
+ No Anthropic API key needed. Claude Code does the EIID analysis itself. SuperSkills only handles scaffolding.
139
+
140
+ ```bash
141
+ superskills init # one-time: saves API key + writes instructions to ~/.claude/CLAUDE.md
142
+ ```
143
+
144
+ Then open Claude Code and describe the business problem. Claude Code will create a `discovery.json` and call `superskills scaffold --json --discovery discovery.json --output ./`.
145
+
146
+ ### After scaffold
147
+
148
+ Scaffold prints exact next steps:
149
+
150
+ ```bash
151
+ cd your-project
152
+ npm install
153
+ cp .env.example .env.local
154
+ # Fill in the keys (scaffold tells you where to get each one)
155
+ npx supabase start # needs Docker
156
+ npm run dev
157
+ ```
158
+
159
+ Then open in Claude Code and run the init skills:
160
+
161
+ ```
162
+ /strategy-start Defines the project, maps EIID, writes CLAUDE.md
163
+ /strategy-init Validates the EIID mapping, sets priorities
164
+ /design-init Asks for brand, configures shadcnblocks + shadcn + tokens
165
+ /trust-init Sets up auth, RLS policies, CORS
166
+ /efficiency-init Sets performance budgets
167
+ /testing-init Configures vitest + Playwright, writes first smoke test
168
+ ```
169
+
170
+ These run once. After that, hooks handle ongoing checks automatically.
171
+
172
+ ## EIID in practice
173
+
174
+ Same distributor, layer by layer.
175
+
176
+ **Enrichment.** Orders arrive as PDF, Excel, and plain text. The ERP uses SKU codes that don't match the supplier portal. Enrichment normalizes everything into one schema and links the IDs.
177
+
178
+ **Inference.** One supplier's lead time went from 5 days to 8 over six weeks. DACH orders dropped 12% month-over-month. A pricing anomaly shows the same SKU costing 15% more through one channel. None of these are visible in a single source.
179
+
180
+ **Interpretation.** The lead time increase matters: that supplier handles 30% of high-margin orders. The DACH drop matches last year's seasonal pattern. The pricing anomaly affects $40K/month. Supplier risk first, pricing second, DACH deprioritized.
181
+
182
+ **Delivery.** Procurement manager gets a Slack message Tuesday morning with the supplier risk and a suggested reallocation. CFO gets a weekly email on the pricing anomaly. Regional manager gets nothing about DACH because it's seasonal noise.
183
+
184
+ ## What Gets Generated
185
+
186
+ Given a business problem, scaffold produces a Next.js project with:
187
+
188
+ - **CLAUDE.md** containing the strategic brief and EIID mapping
189
+ - **Five subagents** in `.claude/agents/` that run specialized checks
190
+ - **Eleven slash commands** in `.claude/skills/` (one entry point, five for initial setup, five for ongoing review)
191
+ - **Claude Code hooks** in `.claude/settings.json` that trigger security and test checks automatically
192
+ - **A first-run script** that detects when the project is opened for the first time and suggests what to do
193
+ - **Next.js + Supabase + Inngest** application structure with delivery integrations
194
+ - **Playwright and vitest** configured for E2E and unit testing
195
+
196
+ ## How Skills Run
197
+
198
+ Skills are checklists with teeth. They check code, report findings to CLAUDE.md, and two of them block: **trust** blocks on security violations (credentials in code, injection, XSS, auth bypass, PII exposure), **testing** blocks when tests fail.
199
+
200
+ **Automatically via hooks** (configured in `.claude/settings.json`):
201
+
202
+ Fast gates during work, full audit at the end. Zero overhead while building. One comprehensive report before stopping.
203
+
204
+ | When | What Happens |
205
+ |------|-------------|
206
+ | Session starts | Detects first run (missing node_modules, .env.local). Suggests init skills. |
207
+ | Before a shell command runs | Fast gate on dangerous commands (credentials, rm -rf, injection). |
208
+ | After a file is written or edited | Fast gate on obvious security issues (hardcoded secrets, injection). |
209
+ | Before stopping | Two agents run. First: test verification (blocks if tests fail). Second: trust deep scan, strategy alignment, design rules. Both write findings to CLAUDE.md. |
210
+
211
+ **On demand via slash commands:**
212
+
213
+ ```
214
+ /strategy-start Define project, map EIID, write CLAUDE.md (entry point)
215
+ /strategy-review EIID alignment + proactive opportunity scan
216
+ /design-review Audit shadcnblocks/shadcn usage, hard rules, a11y, tokens
217
+ /trust-audit OWASP Top 10 + GDPR checklist
218
+ /efficiency-review Bundle size, CWV, N+1 queries, cost report
219
+ /testing-verify Run full test suite, report failures
220
+ ```
221
+
222
+ ## Tool Stack
223
+
224
+ SuperSkills picks tools based on the delivery channels and data sources in your EIID mapping. All tools are GDPR-verified.
225
+
226
+ ### Core (always included)
227
+
228
+ | Tool | What It Does |
229
+ |------|-------------|
230
+ | **Supabase** | Database, auth, storage, pgvector for embeddings |
231
+ | **Vercel** | Hosting, edge functions |
232
+ | **Inngest** | Durable workflows, cron jobs, retry logic |
233
+ | **Claude** | LLM for analysis and inference |
234
+ | **OpenAI** | Embeddings |
235
+
236
+ ### Delivery (based on channels)
237
+
238
+ | Tool | When Selected |
239
+ |------|--------------|
240
+ | **Brevo** | Email, SMS, or WhatsApp delivery |
241
+ | **Telegram** | Telegram delivery |
242
+ | **Slack** | Slack delivery |
243
+ | **Discord** | Discord delivery |
244
+ | **Baileys** | WhatsApp in development (unofficial, ban risk) |
245
+
246
+ ### Enrichment (based on data sources)
247
+
248
+ | Tool | When Selected |
249
+ |------|--------------|
250
+ | **Apify** | Web scraping at scale (proxy management, rate limiting) |
251
+ | **Supermemory** | Knowledge base connectors (Google Drive, Notion, OneDrive) |
252
+ | **Playwright** | Browser-based scraping for dev and sites you control |
253
+
254
+ ### Testing (always included)
255
+
256
+ | Tool | What It Does |
257
+ |------|-------------|
258
+ | **Playwright** | E2E browser tests, accessibility audits, visual regression |
259
+
260
+ Playwright has two roles: testing (primary) and browser-based scraping (secondary). For production scraping at scale, Apify handles proxy rotation and cloud execution.
261
+
262
+ If you want to review or change the auto-selected tools before scaffolding:
263
+
264
+ ```bash
265
+ superskills tools
266
+ ```
267
+
268
+ Print the full catalog:
269
+
270
+ ```bash
271
+ superskills tools --catalog
272
+ ```
273
+
274
+ ## Pipeline Mode
275
+
276
+ For automation and CI, pass JSON files instead of answering prompts:
277
+
278
+ ```bash
279
+ superskills discovery --json --input brief.json --output discovery.json
280
+ superskills scaffold --json --discovery discovery.json --output ./my-project
281
+ ```
282
+
283
+ If you need to override tools in pipeline mode:
284
+
285
+ ```bash
286
+ superskills tools --json --input discovery.json --output tools.json
287
+ superskills scaffold --json --discovery discovery.json --tools tools.json --output ./my-project
288
+ ```
289
+
290
+ ### Input Format
291
+
292
+ The discovery command accepts a JSON brief:
293
+
294
+ ```json
295
+ {
296
+ "projectName": "order-automation",
297
+ "context": {
298
+ "forWhom": "client",
299
+ "companyName": "Acme Corp",
300
+ "businessDescription": "B2B hardware distribution, 200 employees",
301
+ "industry": "manufacturing"
302
+ },
303
+ "problem": "4 hours per day spent on manual order processing from email to ERP",
304
+ "desiredOutcome": "Automated order intake with anomaly detection",
305
+ "currentProcess": ["Check email for orders", "Copy data to Excel", "Enter into ERP"],
306
+ "availableData": ["Gmail", "ERP API", "Supplier portal"]
307
+ }
308
+ ```
309
+
310
+ Print the full JSON Schema with `superskills discovery --schema`.
311
+
312
+ ## Development
313
+
314
+ ### Setup
315
+
316
+ ```bash
317
+ git clone https://github.com/Play-New/SuperSkills.git
318
+ cd SuperSkills
319
+ npm install
320
+ ```
321
+
322
+ ### Commands
323
+
324
+ ```bash
325
+ npm test # 98 tests across 5 files
326
+ npm run type-check # TypeScript strict mode
327
+ npm run dev # Run CLI in development mode
328
+ npm run build # Compile to dist/
329
+ npm run lint # ESLint
330
+ ```
331
+
332
+ ### Environment
333
+
334
+ | Variable | Required | Default |
335
+ |----------|----------|---------|
336
+ | `ANTHROPIC_API_KEY` | Yes (for discovery) | Asked interactively if missing |
337
+ | `SUPERSKILLS_MODEL` | No | `claude-opus-4-6` |
338
+
339
+ ### Tests
340
+
341
+ 98 tests across five files:
342
+
343
+ | File | Count | What It Tests |
344
+ |------|-------|--------------|
345
+ | `analyze.test.ts` | 18 | Claude API mocking, JSON validation, markdown stripping |
346
+ | `catalog.test.ts` | 24 | Channel mapping, tool selection, category handling |
347
+ | `discovery-core.test.ts` | 10 | Validation pipeline, error transformation |
348
+ | `scaffold.test.ts` | 26 | File generation, hooks, agents, skills, design tokens, Playwright, E2E |
349
+ | `schema.test.ts` | 20 | Zod validation edge cases, defaults, JSON Schema output |
350
+
351
+ ## Conceptual References
352
+
353
+ Three ideas shaped the design.
354
+
355
+ **Value mapping** (Simon Wardley). Wardley Maps position each component on an evolution axis from genesis to commodity. Discovery uses this to assess which parts of a business process are ready for automation and which still need human judgment. A component at commodity stage (e.g., data storage) gets automated. One at genesis (e.g., a novel scoring model) gets flagged for human oversight.
356
+
357
+ **Value movement in the AI era** (Sangeet Paul Choudary, *Reshuffle*). Choudary documents how AI commoditizes processing and pushes value toward orchestration and delivery. When any company can run the same model on the same data, the differentiator becomes what happens after the analysis: which findings reach which person, through which channel, triggered by which conditions. EIID ends with Delivery as a distinct layer because that is where the value concentrates.
358
+
359
+ **Intelligence where the user is** (Peter Steinberger). Steinberger's work on OpenClaw and CLI-first development shows that tools integrated into existing workflows get adopted, while tools that require context-switching get ignored. SuperSkills generates Claude Code hooks and slash commands that run inside the editor. The developer never leaves the terminal.
360
+
361
+ ## License
362
+
363
+ MIT
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+
3
+ import('../dist/index.js').catch((error) => {
4
+ console.error('Failed to load SuperSkills:', error.message);
5
+ process.exit(1);
6
+ });
@@ -0,0 +1,11 @@
1
+ import type { DiscoveryResult } from '../discovery/types.js';
2
+ import type { Tool, ToolsCatalog, SelectionResult } from './types.js';
3
+ export type { Tool, ToolsCatalog, ToolSuggestion, SelectionResult } from './types.js';
4
+ export declare function loadCatalog(): Promise<ToolsCatalog>;
5
+ export declare function getTool(catalog: ToolsCatalog, id: string): Tool | undefined;
6
+ export declare function getToolsByCategory(catalog: ToolsCatalog, category: Tool['category']): Tool[];
7
+ export declare function selectTools(discoveryResult: DiscoveryResult): Promise<SelectionResult>;
8
+ export declare function formatToolsForDisplay(result: SelectionResult): string;
9
+ export declare function getEnvVars(result: SelectionResult): string[];
10
+ export declare function getSdkPackages(result: SelectionResult): string[];
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/catalog/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,YAAY,EAAkB,eAAe,EAAE,MAAM,YAAY,CAAC;AAEtF,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAOtF,wBAAsB,WAAW,IAAI,OAAO,CAAC,YAAY,CAAC,CAIzD;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAE3E;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,EAAE,CAE5F;AAED,wBAAsB,WAAW,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAgD5F;AAgHD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,CA+BrE;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,EAAE,CAQ5D;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,GAAG,MAAM,EAAE,CAQhE"}
@@ -0,0 +1,203 @@
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import { fileURLToPath } from 'url';
4
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
5
+ const CATALOG_PATH = path.resolve(__dirname, 'tools-catalog.json');
6
+ let catalogCache = null;
7
+ export async function loadCatalog() {
8
+ if (catalogCache)
9
+ return catalogCache;
10
+ catalogCache = await fs.readJSON(CATALOG_PATH);
11
+ return catalogCache;
12
+ }
13
+ export function getTool(catalog, id) {
14
+ return catalog.tools.find(t => t.id === id);
15
+ }
16
+ export function getToolsByCategory(catalog, category) {
17
+ return catalog.tools.filter(t => t.category === category);
18
+ }
19
+ export async function selectTools(discoveryResult) {
20
+ const catalog = await loadCatalog();
21
+ const suggestions = [];
22
+ // Core tools are always included
23
+ const coreTools = getToolsByCategory(catalog, 'core');
24
+ for (const tool of coreTools) {
25
+ suggestions.push({
26
+ tool,
27
+ reason: 'Core infrastructure for AI-native apps',
28
+ required: true
29
+ });
30
+ }
31
+ // Analyze delivery channels from EIID mapping
32
+ const deliveryChannels = discoveryResult.eiidMapping.delivery.channels
33
+ .map(c => c.toLowerCase());
34
+ const deliverySuggestions = selectDeliveryTools(catalog, deliveryChannels);
35
+ suggestions.push(...deliverySuggestions);
36
+ // Analyze data sources for enrichment
37
+ const dataSources = [
38
+ ...discoveryResult.availableData,
39
+ ...discoveryResult.eiidMapping.enrichment.sources
40
+ ].map(s => s.toLowerCase());
41
+ const enrichmentSuggestions = selectEnrichmentTools(catalog, dataSources);
42
+ suggestions.push(...enrichmentSuggestions);
43
+ // Always include Playwright for testing (also usable for enrichment scraping)
44
+ const playwright = getTool(catalog, 'playwright');
45
+ if (playwright) {
46
+ suggestions.push({
47
+ tool: playwright,
48
+ reason: 'E2E testing, accessibility auditing, and browser-based scraping',
49
+ required: true
50
+ });
51
+ }
52
+ // Group by category
53
+ return {
54
+ core: suggestions.filter(s => s.tool.category === 'core'),
55
+ delivery: suggestions.filter(s => s.tool.category === 'delivery' || s.tool.category === 'community'),
56
+ enrichment: suggestions.filter(s => s.tool.category === 'enrichment'),
57
+ testing: suggestions.filter(s => s.tool.category === 'testing'),
58
+ all: suggestions
59
+ };
60
+ }
61
+ function selectDeliveryTools(catalog, channels) {
62
+ const suggestions = [];
63
+ const addedIds = new Set();
64
+ const channelMapping = {
65
+ email: [{ toolId: 'brevo', reason: 'Email delivery via Brevo' }],
66
+ sms: [{ toolId: 'brevo', reason: 'SMS delivery via Brevo' }],
67
+ whatsapp: [
68
+ { toolId: 'brevo', reason: 'WhatsApp Business API via Brevo (official)' },
69
+ { toolId: 'baileys', reason: 'WhatsApp personal via Baileys (dev/testing only)' }
70
+ ],
71
+ telegram: [{ toolId: 'telegram', reason: 'Telegram bot notifications' }],
72
+ slack: [{ toolId: 'slack', reason: 'Slack channel notifications' }],
73
+ discord: [{ toolId: 'discord', reason: 'Discord bot notifications' }]
74
+ };
75
+ for (const channel of channels) {
76
+ // Normalize channel name
77
+ const normalizedChannel = normalizeChannel(channel);
78
+ const mappings = channelMapping[normalizedChannel];
79
+ if (mappings) {
80
+ for (const mapping of mappings) {
81
+ if (!addedIds.has(mapping.toolId)) {
82
+ const tool = getTool(catalog, mapping.toolId);
83
+ if (tool) {
84
+ suggestions.push({
85
+ tool,
86
+ reason: mapping.reason,
87
+ required: !tool.optional && !tool.risk
88
+ });
89
+ addedIds.add(mapping.toolId);
90
+ }
91
+ }
92
+ }
93
+ }
94
+ }
95
+ // If no delivery tools selected but channels mentioned, add Brevo as default
96
+ if (suggestions.length === 0 && channels.length > 0) {
97
+ const brevo = getTool(catalog, 'brevo');
98
+ if (brevo) {
99
+ suggestions.push({
100
+ tool: brevo,
101
+ reason: 'Default delivery tool for email notifications',
102
+ required: true
103
+ });
104
+ }
105
+ }
106
+ return suggestions;
107
+ }
108
+ function selectEnrichmentTools(catalog, dataSources) {
109
+ const suggestions = [];
110
+ const addedIds = new Set();
111
+ // Check for scraping needs
112
+ const scrapingKeywords = ['web', 'scrape', 'crawl', 'website', 'portal', 'external'];
113
+ const needsScraping = dataSources.some(source => scrapingKeywords.some(kw => source.includes(kw)));
114
+ if (needsScraping) {
115
+ const apify = getTool(catalog, 'apify');
116
+ if (apify && !addedIds.has('apify')) {
117
+ suggestions.push({
118
+ tool: apify,
119
+ reason: 'Web scraping for external data sources',
120
+ required: false
121
+ });
122
+ addedIds.add('apify');
123
+ }
124
+ }
125
+ // Check for memory/RAG needs
126
+ const memoryKeywords = ['drive', 'notion', 'onedrive', 'documents', 'files'];
127
+ const needsMemory = dataSources.some(source => memoryKeywords.some(kw => source.includes(kw)));
128
+ if (needsMemory) {
129
+ const supermemory = getTool(catalog, 'supermemory');
130
+ if (supermemory && !addedIds.has('supermemory')) {
131
+ suggestions.push({
132
+ tool: supermemory,
133
+ reason: 'Memory API with connectors for Google Drive, Notion, OneDrive',
134
+ required: false
135
+ });
136
+ addedIds.add('supermemory');
137
+ }
138
+ }
139
+ return suggestions;
140
+ }
141
+ function normalizeChannel(channel) {
142
+ const normalized = channel.toLowerCase().trim();
143
+ // Handle common variations
144
+ if (normalized.includes('email') || normalized.includes('mail'))
145
+ return 'email';
146
+ if (normalized.includes('whatsapp') || normalized.includes('wa'))
147
+ return 'whatsapp';
148
+ if (normalized.includes('telegram') || normalized.includes('tg'))
149
+ return 'telegram';
150
+ if (normalized.includes('slack'))
151
+ return 'slack';
152
+ if (normalized.includes('discord'))
153
+ return 'discord';
154
+ if (normalized.includes('sms') || normalized.includes('text'))
155
+ return 'sms';
156
+ return normalized;
157
+ }
158
+ export function formatToolsForDisplay(result) {
159
+ const lines = [];
160
+ lines.push('CORE (always included):');
161
+ for (const s of result.core) {
162
+ lines.push(` - ${s.tool.name}: ${s.tool.description}`);
163
+ }
164
+ if (result.delivery.length > 0) {
165
+ lines.push('\nDELIVERY:');
166
+ for (const s of result.delivery) {
167
+ const note = s.tool.risk ? ` [${s.tool.risk}]` : '';
168
+ lines.push(` - ${s.tool.name}: ${s.reason}${note}`);
169
+ }
170
+ }
171
+ if (result.enrichment.length > 0) {
172
+ lines.push('\nENRICHMENT:');
173
+ for (const s of result.enrichment) {
174
+ lines.push(` - ${s.tool.name}: ${s.reason}`);
175
+ }
176
+ }
177
+ if (result.testing.length > 0) {
178
+ lines.push('\nTESTING:');
179
+ for (const s of result.testing) {
180
+ lines.push(` - ${s.tool.name}: ${s.reason}`);
181
+ }
182
+ }
183
+ return lines.join('\n');
184
+ }
185
+ export function getEnvVars(result) {
186
+ const envVars = new Set();
187
+ for (const s of result.all) {
188
+ for (const envVar of s.tool.envVars) {
189
+ envVars.add(envVar);
190
+ }
191
+ }
192
+ return Array.from(envVars).sort();
193
+ }
194
+ export function getSdkPackages(result) {
195
+ const packages = [];
196
+ for (const s of result.all) {
197
+ if (s.tool.sdk) {
198
+ packages.push(s.tool.sdk);
199
+ }
200
+ }
201
+ return packages;
202
+ }
203
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/catalog/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAMpC,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC/D,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAEnE,IAAI,YAAY,GAAwB,IAAI,CAAC;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