shmakk 1.1.0 → 1.2.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 (450) hide show
  1. package/README.md +16 -1
  2. package/package.json +6 -3
  3. package/scripts/import-skills.js +536 -0
  4. package/scripts/install-skills.js +64 -0
  5. package/skills/ai-elements.md +482 -0
  6. package/skills/architecture.md +151 -0
  7. package/skills/backend-adapter-aws-lambda.md +204 -0
  8. package/skills/backend-adapter-express.md +177 -0
  9. package/skills/backend-adapter-fastify.md +222 -0
  10. package/skills/backend-adapter-fetch.md +200 -0
  11. package/skills/backend-api-docs.md +22 -0
  12. package/skills/backend-aspire.md +232 -0
  13. package/skills/backend-aspnet-core.md +62 -0
  14. package/skills/backend-build-chatgpt-app.md +321 -0
  15. package/skills/backend-build-mcp-app.md +393 -0
  16. package/skills/backend-build-mcp-server.md +222 -0
  17. package/skills/backend-build-mcpb.md +200 -0
  18. package/skills/backend-building-ai-agent-on-cloudflare.md +401 -0
  19. package/skills/backend-caching.md +206 -0
  20. package/skills/backend-chatgpt-app-submission.md +157 -0
  21. package/skills/backend-chatgpt-apps.md +321 -0
  22. package/skills/backend-client-setup.md +318 -0
  23. package/skills/backend-containerize-aspnet-framework.md +455 -0
  24. package/skills/backend-create-spring-boot-java-project.md +164 -0
  25. package/skills/backend-create-spring-boot-kotlin-project.md +148 -0
  26. package/skills/backend-csharp-async.md +50 -0
  27. package/skills/backend-csharp-docs.md +63 -0
  28. package/skills/backend-csharp-mcp-server-generator.md +60 -0
  29. package/skills/backend-dotenv.md +201 -0
  30. package/skills/backend-dotenvx.md +119 -0
  31. package/skills/backend-env-vars.md +259 -0
  32. package/skills/backend-error-handling.md +254 -0
  33. package/skills/backend-fastapi.md +437 -0
  34. package/skills/backend-go-mcp-server-generator.md +335 -0
  35. package/skills/backend-java-mcp-server-generator.md +757 -0
  36. package/skills/backend-kotlin-mcp-server-generator.md +450 -0
  37. package/skills/backend-middlewares.md +243 -0
  38. package/skills/backend-multi-stage-dockerfile.md +47 -0
  39. package/skills/backend-nestjs.md +192 -0
  40. package/skills/backend-next-forge.md +375 -0
  41. package/skills/backend-nextjs.md +746 -0
  42. package/skills/backend-openapi-to-application-code.md +113 -0
  43. package/skills/backend-php-mcp-server-generator.md +523 -0
  44. package/skills/backend-python-mcp-server-generator.md +106 -0
  45. package/skills/backend-routing-middleware.md +251 -0
  46. package/skills/backend-ruby-mcp-server-generator.md +661 -0
  47. package/skills/backend-rust-mcp-server-generator.md +578 -0
  48. package/skills/backend-semantic-kernel.md +57 -0
  49. package/skills/backend-server-setup.md +379 -0
  50. package/skills/backend-server-side-calls.md +250 -0
  51. package/skills/backend-subscriptions.md +407 -0
  52. package/skills/backend-swift-mcp-server-generator.md +670 -0
  53. package/skills/backend-trpc-router.md +152 -0
  54. package/skills/backend-typescript-mcp-server-generator.md +91 -0
  55. package/skills/backend-validators.md +229 -0
  56. package/skills/backend.md +76 -0
  57. package/skills/backup.md +165 -0
  58. package/skills/budget.md +140 -0
  59. package/skills/business-gtm-0-to-1-launch.md +322 -0
  60. package/skills/business-gtm-operating-cadence.md +421 -0
  61. package/skills/business-gtm-positioning-strategy.md +439 -0
  62. package/skills/business-gtm-product-led-growth.md +340 -0
  63. package/skills/calendar.md +95 -0
  64. package/skills/code-review.md +130 -0
  65. package/skills/compliance.md +168 -0
  66. package/skills/contracts.md +130 -0
  67. package/skills/daily-job-run.md +46 -0
  68. package/skills/daily-webdesign.md +187 -0
  69. package/skills/database-bigquery-pipeline-audit.md +130 -0
  70. package/skills/database-cosmosdb-datamodeling.md +1046 -0
  71. package/skills/database-durable-objects.md +187 -0
  72. package/skills/database-ef-core.md +76 -0
  73. package/skills/database-fabric-lakehouse.md +107 -0
  74. package/skills/database-neon-postgres-egress-optimizer.md +213 -0
  75. package/skills/database-neon-postgres.md +218 -0
  76. package/skills/database-postgresql-code-review.md +213 -0
  77. package/skills/database-postgresql-optimization.md +405 -0
  78. package/skills/database-sql-code-review.md +302 -0
  79. package/skills/database-sql-optimization.md +297 -0
  80. package/skills/dependency-audit.md +165 -0
  81. package/skills/design-kami-landing.md +234 -0
  82. package/skills/design.md +221 -0
  83. package/skills/dev-acquire-codebase-knowledge.md +175 -0
  84. package/skills/dev-add-educational-comments.md +129 -0
  85. package/skills/dev-add-model-descriptions.md +74 -0
  86. package/skills/dev-adr-review.md +56 -0
  87. package/skills/dev-boost-prompt.md +26 -0
  88. package/skills/dev-build-run-debug.md +130 -0
  89. package/skills/dev-chunk.md +49 -0
  90. package/skills/dev-claude-md-improver.md +180 -0
  91. package/skills/dev-code-exemplars-blueprint-generator.md +127 -0
  92. package/skills/dev-code-tour.md +434 -0
  93. package/skills/dev-comment-code-generate-a-tutorial.md +27 -0
  94. package/skills/dev-commit.md +81 -0
  95. package/skills/dev-context-map.md +53 -0
  96. package/skills/dev-conventional-commit.md +73 -0
  97. package/skills/dev-create-architectural-decision-record.md +98 -0
  98. package/skills/dev-create-draft-pr.md +17 -0
  99. package/skills/dev-create-pr.md +17 -0
  100. package/skills/dev-create-readme.md +22 -0
  101. package/skills/dev-csharp-mstest.md +479 -0
  102. package/skills/dev-csharp-nunit.md +72 -0
  103. package/skills/dev-csharp-tunit.md +101 -0
  104. package/skills/dev-csharp-xunit.md +69 -0
  105. package/skills/dev-debug-failing-test.md +90 -0
  106. package/skills/dev-diff-analyze.md +32 -0
  107. package/skills/dev-diffs.md +24 -0
  108. package/skills/dev-dotnet-best-practices.md +86 -0
  109. package/skills/dev-dotnet-design-pattern-review.md +43 -0
  110. package/skills/dev-dotnet-timezone.md +110 -0
  111. package/skills/dev-dotnet-upgrade.md +117 -0
  112. package/skills/dev-doublecheck.md +278 -0
  113. package/skills/dev-explain-error.md +15 -0
  114. package/skills/dev-finding-discovery.md +164 -0
  115. package/skills/dev-fix-finding.md +111 -0
  116. package/skills/dev-full-file-edit.md +25 -0
  117. package/skills/dev-git-commit.md +125 -0
  118. package/skills/dev-git-flow-branch-creator.md +293 -0
  119. package/skills/dev-git-workflow.md +46 -0
  120. package/skills/dev-github-automation.md +64 -0
  121. package/skills/dev-github-code-review.md +1140 -0
  122. package/skills/dev-github-issues.md +202 -0
  123. package/skills/dev-gpt-5-4-prompting.md +55 -0
  124. package/skills/dev-investigation-mode.md +277 -0
  125. package/skills/dev-java-add-graalvm-native-image-support.md +450 -0
  126. package/skills/dev-java-docs.md +24 -0
  127. package/skills/dev-java-refactoring-extract-method.md +105 -0
  128. package/skills/dev-java-refactoring-remove-parameter.md +85 -0
  129. package/skills/dev-merge.md +73 -0
  130. package/skills/dev-migrate-create.md +36 -0
  131. package/skills/dev-migrate-validate.md +36 -0
  132. package/skills/dev-my-issues.md +9 -0
  133. package/skills/dev-my-pull-requests.md +15 -0
  134. package/skills/dev-planning-oracle-to-postgres-migration-integration-testing.md +45 -0
  135. package/skills/dev-playwright-generate-test.md +18 -0
  136. package/skills/dev-playwright.md +148 -0
  137. package/skills/dev-prompt-builder.md +142 -0
  138. package/skills/dev-pytest-coverage.md +29 -0
  139. package/skills/dev-python-manager-discovery.md +330 -0
  140. package/skills/dev-python-pypi-package-builder.md +445 -0
  141. package/skills/dev-readme-blueprint-generator.md +79 -0
  142. package/skills/dev-refactor-method-complexity-reduce.md +99 -0
  143. package/skills/dev-refactor-plan.md +66 -0
  144. package/skills/dev-refactor.md +646 -0
  145. package/skills/dev-review-and-refactor.md +16 -0
  146. package/skills/dev-reviewing-oracle-to-postgres-migration.md +68 -0
  147. package/skills/dev-ruff-recursive-fix.md +201 -0
  148. package/skills/dev-run-e2e-tests.md +126 -0
  149. package/skills/dev-run-pre-commit-checks.md +133 -0
  150. package/skills/dev-run-smoke-tests.md +127 -0
  151. package/skills/dev-scaffolding-oracle-to-postgres-migration-test-project.md +55 -0
  152. package/skills/dev-spring-boot-testing.md +190 -0
  153. package/skills/dev-sync-upstream.md +32 -0
  154. package/skills/dev-sync.md +74 -0
  155. package/skills/dev-tdd-workflow.md +23 -0
  156. package/skills/dev-terraform-azurerm-set-diff-analyzer.md +49 -0
  157. package/skills/dev-test-driven-development.md +372 -0
  158. package/skills/dev-test-gaps.md +18 -0
  159. package/skills/dev-test-triage.md +55 -0
  160. package/skills/dev-typer.md +267 -0
  161. package/skills/dev-typescript-setup.md +25 -0
  162. package/skills/dev-unified-diff-edit.md +16 -0
  163. package/skills/dev-unit-test-vue-pinia.md +198 -0
  164. package/skills/dev-using-git-worktrees.md +216 -0
  165. package/skills/dev-validation.md +99 -0
  166. package/skills/dev-verification.md +168 -0
  167. package/skills/dev-webapp-testing.md +134 -0
  168. package/skills/dev-write-coding-standards-from-file.md +317 -0
  169. package/skills/dev-write-tests.md +16 -0
  170. package/skills/devops-appinsights-instrumentation.md +49 -0
  171. package/skills/devops-az-cost-optimize.md +306 -0
  172. package/skills/devops-chronicle.md +154 -0
  173. package/skills/devops-deployments-cicd.md +331 -0
  174. package/skills/devops-devops-rollout-plan.md +118 -0
  175. package/skills/devops-geistdocs.md +276 -0
  176. package/skills/devops-observability.md +774 -0
  177. package/skills/devops-observe-metrics.md +35 -0
  178. package/skills/devops-observe-trace.md +30 -0
  179. package/skills/devops-phoenix-cli.md +163 -0
  180. package/skills/devops-phoenix-tracing.md +140 -0
  181. package/skills/devops-publish-to-pages.md +108 -0
  182. package/skills/devops-telemetry.md +87 -0
  183. package/skills/devops-update-avm-modules-in-bicep.md +61 -0
  184. package/skills/devops.md +81 -0
  185. package/skills/diagrams-canvas.md +204 -0
  186. package/skills/diagrams-draw-io-diagram-generator.md +463 -0
  187. package/skills/diagrams-excalidraw-diagram-generator.md +614 -0
  188. package/skills/diagrams-graphify.md +1277 -0
  189. package/skills/docs-bear-notes.md +108 -0
  190. package/skills/docs-create-llms.md +211 -0
  191. package/skills/docs-doc-gen.md +20 -0
  192. package/skills/docs-documentation-writer.md +46 -0
  193. package/skills/docs-llm-config.md +33 -0
  194. package/skills/docs-mkdocs-translations.md +109 -0
  195. package/skills/docs-obsidian-vault-maintainer.md +14 -0
  196. package/skills/docs-obsidian.md +82 -0
  197. package/skills/docs-prose.md +324 -0
  198. package/skills/docs-update-llms.md +217 -0
  199. package/skills/docs-update-markdown-file-index.md +77 -0
  200. package/skills/docs-wiki-maintainer.md +20 -0
  201. package/skills/documents.md +120 -0
  202. package/skills/email.md +113 -0
  203. package/skills/expenses.md +140 -0
  204. package/skills/file-ops.md +149 -0
  205. package/skills/files-convert-plaintext-to-md.md +363 -0
  206. package/skills/files-doc.md +81 -0
  207. package/skills/files-docx.md +594 -0
  208. package/skills/files-markdown-to-html.md +917 -0
  209. package/skills/files-nano-pdf.md +39 -0
  210. package/skills/files-pdf.md +315 -0
  211. package/skills/files-pdftk-server.md +163 -0
  212. package/skills/files-pptx-html-fidelity-audit.md +255 -0
  213. package/skills/files-pptx.md +231 -0
  214. package/skills/files-xlsx.md +301 -0
  215. package/skills/find-jobs.md +78 -0
  216. package/skills/format-conversion.md +157 -0
  217. package/skills/frontend-ai-elements.md +483 -0
  218. package/skills/frontend-ai-gateway.md +563 -0
  219. package/skills/frontend-ai-generation-persistence.md +242 -0
  220. package/skills/frontend-ai-sdk.md +799 -0
  221. package/skills/frontend-ai-visibility.md +127 -0
  222. package/skills/frontend-angular-developer.md +130 -0
  223. package/skills/frontend-aspnet-minimal-api-openapi.md +42 -0
  224. package/skills/frontend-bencium-innovative-ux-designer.md +719 -0
  225. package/skills/frontend-chat-sdk.md +666 -0
  226. package/skills/frontend-chrome-devtools.md +98 -0
  227. package/skills/frontend-frontend-app-builder.md +186 -0
  228. package/skills/frontend-frontend-design.md +43 -0
  229. package/skills/frontend-frontend-testing-debugging.md +143 -0
  230. package/skills/frontend-gsap-framer-scroll-animation.md +152 -0
  231. package/skills/frontend-internal-linking.md +109 -0
  232. package/skills/frontend-json-render.md +335 -0
  233. package/skills/frontend-keyword-clustering.md +118 -0
  234. package/skills/frontend-next-intl-add-language.md +20 -0
  235. package/skills/frontend-on-page-seo.md +112 -0
  236. package/skills/frontend-premium-frontend-ui.md +114 -0
  237. package/skills/frontend-react-best-practices.md +143 -0
  238. package/skills/frontend-schema-markup.md +160 -0
  239. package/skills/frontend-seo-audit.md +110 -0
  240. package/skills/frontend-swr.md +215 -0
  241. package/skills/frontend-technical-seo.md +162 -0
  242. package/skills/frontend-use-dom.md +418 -0
  243. package/skills/frontend-web-coder.md +564 -0
  244. package/skills/frontend-web-design-reviewer.md +369 -0
  245. package/skills/frontend-web-perf.md +202 -0
  246. package/skills/frontend.md +125 -0
  247. package/skills/general-adapter-standalone.md +199 -0
  248. package/skills/general-auth.md +356 -0
  249. package/skills/general-containerize-aspnetcore.md +393 -0
  250. package/skills/general-create-technical-spike.md +231 -0
  251. package/skills/general-cron-jobs.md +72 -0
  252. package/skills/general-ddd-aggregate.md +52 -0
  253. package/skills/general-ddd-context.md +46 -0
  254. package/skills/general-ddd-validate.md +51 -0
  255. package/skills/general-dependency-check.md +26 -0
  256. package/skills/general-email-marketing.md +86 -0
  257. package/skills/general-healthcheck.md +246 -0
  258. package/skills/general-import-infrastructure-as-code.md +368 -0
  259. package/skills/general-init.md +49 -0
  260. package/skills/general-java-junit.md +64 -0
  261. package/skills/general-java-springboot.md +66 -0
  262. package/skills/general-javascript-typescript-jest.md +45 -0
  263. package/skills/general-kotlin-springboot.md +71 -0
  264. package/skills/general-make-repo-contribution.md +91 -0
  265. package/skills/general-market-research.md +78 -0
  266. package/skills/general-marketplace.md +468 -0
  267. package/skills/general-model-recommendation.md +673 -0
  268. package/skills/general-payments.md +352 -0
  269. package/skills/general-quality-playbook.md +480 -0
  270. package/skills/general-run-integration-tests.md +113 -0
  271. package/skills/general-superjson.md +274 -0
  272. package/skills/general-swiftpm-macos.md +51 -0
  273. package/skills/general-threat-model.md +61 -0
  274. package/skills/invoices.md +167 -0
  275. package/skills/licenses.md +159 -0
  276. package/skills/logs.md +156 -0
  277. package/skills/marketing.md +139 -0
  278. package/skills/media-image-manipulation-image-magick.md +253 -0
  279. package/skills/media-imagegen.md +357 -0
  280. package/skills/media-openai-whisper-api.md +63 -0
  281. package/skills/media-openai-whisper.md +39 -0
  282. package/skills/media-peekaboo.md +191 -0
  283. package/skills/media-screenshot.md +268 -0
  284. package/skills/media-speech.md +145 -0
  285. package/skills/media-transcribe.md +82 -0
  286. package/skills/media-video-frames.md +47 -0
  287. package/skills/mobile-android-emulator-qa.md +81 -0
  288. package/skills/mobile-android-performance.md +280 -0
  289. package/skills/mobile-building-mcp-server-on-cloudflare.md +267 -0
  290. package/skills/mobile-building-native-ui.md +322 -0
  291. package/skills/mobile-expo-api-routes.md +369 -0
  292. package/skills/mobile-expo-cicd-workflows.md +92 -0
  293. package/skills/mobile-expo-deployment.md +191 -0
  294. package/skills/mobile-expo-dev-client.md +165 -0
  295. package/skills/mobile-expo-module.md +177 -0
  296. package/skills/mobile-expo-tailwind-setup.md +481 -0
  297. package/skills/mobile-expo-ui-jetpack-compose.md +41 -0
  298. package/skills/mobile-expo-ui-swift-ui.md +40 -0
  299. package/skills/mobile-ios-app-intents.md +78 -0
  300. package/skills/mobile-ios-debugger-agent.md +52 -0
  301. package/skills/mobile-ios-ettrace-performance.md +198 -0
  302. package/skills/mobile-ios-memgraph-leaks.md +77 -0
  303. package/skills/mobile-native-data-fetching.md +508 -0
  304. package/skills/mobile-packaging-notarization.md +48 -0
  305. package/skills/mobile-react-native-architecture.md +672 -0
  306. package/skills/mobile-react-native-mobile-design.md +438 -0
  307. package/skills/mobile-signing-entitlements.md +59 -0
  308. package/skills/mobile-swiftui-liquid-glass.md +91 -0
  309. package/skills/mobile-swiftui-patterns.md +210 -0
  310. package/skills/mobile-swiftui-performance-audit.md +108 -0
  311. package/skills/mobile-swiftui-ui-patterns.md +97 -0
  312. package/skills/mobile-swiftui-view-refactor.md +204 -0
  313. package/skills/mobile-upgrading-expo.md +134 -0
  314. package/skills/mobile.md +183 -0
  315. package/skills/notes.md +106 -0
  316. package/skills/planning-adr-create.md +62 -0
  317. package/skills/planning-adr-index.md +67 -0
  318. package/skills/planning-architecture-blueprint-generator.md +323 -0
  319. package/skills/planning-brainstorming.md +165 -0
  320. package/skills/planning-breakdown-epic-arch.md +67 -0
  321. package/skills/planning-breakdown-epic-pm.md +59 -0
  322. package/skills/planning-breakdown-feature-implementation.md +129 -0
  323. package/skills/planning-breakdown-feature-prd.md +62 -0
  324. package/skills/planning-breakdown-plan.md +510 -0
  325. package/skills/planning-breakdown-test.md +366 -0
  326. package/skills/planning-cloud-design-patterns.md +63 -0
  327. package/skills/planning-content-brief.md +128 -0
  328. package/skills/planning-content-strategy.md +138 -0
  329. package/skills/planning-content-translation.md +143 -0
  330. package/skills/planning-create-github-action-workflow-specification.md +277 -0
  331. package/skills/planning-create-github-issues-feature-from-implementation-plan.md +29 -0
  332. package/skills/planning-create-github-issues-for-unmet-specification-requirements.md +36 -0
  333. package/skills/planning-create-github-pull-request-from-specification.md +25 -0
  334. package/skills/planning-create-implementation-plan.md +158 -0
  335. package/skills/planning-create-specification.md +128 -0
  336. package/skills/planning-first-ask.md +31 -0
  337. package/skills/planning-folder-structure-blueprint-generator.md +406 -0
  338. package/skills/planning-gen-specs-as-issues.md +166 -0
  339. package/skills/planning-generate-snapshot.md +144 -0
  340. package/skills/planning-generate-status-report.md +336 -0
  341. package/skills/planning-metric-pack-designer.md +27 -0
  342. package/skills/planning-pm-spec.md +53 -0
  343. package/skills/planning-prd.md +144 -0
  344. package/skills/planning-project-assessment.md +182 -0
  345. package/skills/planning-project-setup-info-local.md +128 -0
  346. package/skills/planning-project-workflow-analysis-blueprint-generator.md +294 -0
  347. package/skills/planning-service-oriented-architecture.md +248 -0
  348. package/skills/planning-spec-to-backlog.md +544 -0
  349. package/skills/planning-technology-stack-blueprint-generator.md +243 -0
  350. package/skills/planning-update-implementation-plan.md +158 -0
  351. package/skills/planning-update-specification.md +128 -0
  352. package/skills/planning-what-context-needed.md +40 -0
  353. package/skills/planning-writing-plans.md +153 -0
  354. package/skills/prepare-application.md +81 -0
  355. package/skills/productivity-apple-notes.md +78 -0
  356. package/skills/productivity-apple-reminders.md +119 -0
  357. package/skills/productivity-capture-tasks-from-meeting-notes.md +680 -0
  358. package/skills/productivity-daily-prep.md +156 -0
  359. package/skills/productivity-email-drafter.md +101 -0
  360. package/skills/productivity-hr-onboarding.md +53 -0
  361. package/skills/productivity-things-mac.md +87 -0
  362. package/skills/productivity-update.md +169 -0
  363. package/skills/reminders.md +109 -0
  364. package/skills/research-dossier-collect.md +71 -0
  365. package/skills/research-kg-extract.md +37 -0
  366. package/skills/research-openai-docs.md +89 -0
  367. package/skills/research-research-add-items.md +31 -0
  368. package/skills/research-research-report.md +94 -0
  369. package/skills/research-research-synthesize.md +63 -0
  370. package/skills/research-summarize.md +88 -0
  371. package/skills/research-transformers-js.md +635 -0
  372. package/skills/research.md +119 -0
  373. package/skills/security-ai-prompt-engineering-safety-review.md +231 -0
  374. package/skills/security-attack-path-analysis.md +182 -0
  375. package/skills/security-gdpr-compliant.md +284 -0
  376. package/skills/security-mcp-security-audit.md +279 -0
  377. package/skills/security-pii-detect.md +31 -0
  378. package/skills/security-secret-scanning.md +243 -0
  379. package/skills/security-security-best-practices.md +87 -0
  380. package/skills/security-security-ownership-map.md +207 -0
  381. package/skills/security-security-review.md +169 -0
  382. package/skills/security-security-scan.md +138 -0
  383. package/skills/security-security-threat-model.md +82 -0
  384. package/skills/security-threat-model-analyst.md +76 -0
  385. package/skills/sysmon.md +181 -0
  386. package/skills/system-arch-linux-triage.md +32 -0
  387. package/skills/system-centos-linux-triage.md +32 -0
  388. package/skills/system-debian-linux-triage.md +32 -0
  389. package/skills/system-fedora-linux-triage.md +32 -0
  390. package/skills/system-geofeed-tuner.md +865 -0
  391. package/skills/system-iot-anomalies.md +15 -0
  392. package/skills/system-iot-firmware.md +16 -0
  393. package/skills/system-iot-fleet.md +14 -0
  394. package/skills/system-iot-register.md +19 -0
  395. package/skills/system-iot-witness-verify.md +15 -0
  396. package/skills/system-tmux.md +171 -0
  397. package/skills/system-window-management.md +228 -0
  398. package/skills/task-management.md +90 -0
  399. package/skills/tasks.md +102 -0
  400. package/skills/test-coverage.md +188 -0
  401. package/skills/ux-ui.md +128 -0
  402. package/skills/web.md +186 -0
  403. package/skills/workflow-act-on-feedback.md +15 -0
  404. package/skills/workflow-automate-this.md +245 -0
  405. package/skills/workflow-autoresearch.md +276 -0
  406. package/skills/workflow-coding-agent.md +317 -0
  407. package/skills/workflow-deep-research.md +44 -0
  408. package/skills/workflow-dispatching-parallel-agents.md +183 -0
  409. package/skills/workflow-eval-driven-dev.md +148 -0
  410. package/skills/workflow-executing-plans.md +71 -0
  411. package/skills/workflow-mentoring-juniors.md +311 -0
  412. package/skills/workflow-receiving-code-review.md +214 -0
  413. package/skills/workflow-repo-story-time.md +155 -0
  414. package/skills/workflow-requesting-code-review.md +104 -0
  415. package/skills/workflow-session-report.md +43 -0
  416. package/skills/workflow-structured-autonomy-generate.md +126 -0
  417. package/skills/workflow-subagent-driven-development.md +280 -0
  418. package/skills/writing.md +106 -0
  419. package/src/agent.js +0 -0
  420. package/src/browser.js +297 -0
  421. package/src/cli.js +25 -4
  422. package/src/code-reviewer.js +119 -0
  423. package/src/completions.js +1 -1
  424. package/src/control.js +222 -30
  425. package/src/coordinator.js +303 -0
  426. package/src/correction.js +29 -8
  427. package/src/edit-tracker.js +21 -0
  428. package/src/edit-viewer.js +414 -0
  429. package/src/endpoints.js +64 -15
  430. package/src/index.js +45 -11
  431. package/src/llm.js +86 -2
  432. package/src/mcp-client.js +416 -0
  433. package/src/memory.js +182 -0
  434. package/src/planner.js +216 -0
  435. package/src/rules.js +90 -0
  436. package/src/self-commands.js +757 -0
  437. package/src/services/voice.js +10 -7
  438. package/src/session-search.js +427 -0
  439. package/src/session.js +487 -99
  440. package/src/shmakk-server.js +91 -0
  441. package/src/skills.js +410 -3
  442. package/src/subagent.js +4 -1
  443. package/src/system-prompt.js +13 -5
  444. package/src/task-file.js +114 -0
  445. package/src/taskClassifier.js +246 -0
  446. package/src/team.js +752 -0
  447. package/src/tools.js +142 -21
  448. package/src/web.js +35 -5
  449. package/src/workflows.js +261 -0
  450. package/src/workspace-index.js +25 -6
@@ -0,0 +1,635 @@
1
+ ---
2
+ name: transformers-js
3
+ description: Use Transformers.js to run state-of-the-art machine learning models directly in JavaScript/TypeScript. Supports NLP (text classification, translation, summarization), computer vision (image classification, object detection), audio (speech recognition, audio classification), and multimodal tasks. Works in Node.js and browsers (with WebGPU/WASM) using pre-trained models from Hugging Face Hub.
4
+ metadata:
5
+ author: huggingface
6
+ version: "3.8.1"
7
+ category: machine-learning
8
+ repository: https://github.com/huggingface/transformers.js
9
+ ---
10
+
11
+ # Transformers.js - Machine Learning for JavaScript
12
+
13
+ Transformers.js enables running state-of-the-art machine learning models directly in JavaScript, both in browsers and Node.js environments, with no server required.
14
+
15
+ ## When to Use This Skill
16
+
17
+ Use this skill when you need to:
18
+ - Run ML models for text analysis, generation, or translation in JavaScript
19
+ - Perform image classification, object detection, or segmentation
20
+ - Implement speech recognition or audio processing
21
+ - Build multimodal AI applications (text-to-image, image-to-text, etc.)
22
+ - Run models client-side in the browser without a backend
23
+
24
+ ## Installation
25
+
26
+ ### NPM Installation
27
+ ```bash
28
+ npm install @huggingface/transformers
29
+ ```
30
+
31
+ ### Browser Usage (CDN)
32
+ ```javascript
33
+ <script type="module">
34
+ import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers';
35
+ </script>
36
+ ```
37
+
38
+ ## Core Concepts
39
+
40
+ ### 1. Pipeline API
41
+ The pipeline API is the easiest way to use models. It groups together preprocessing, model inference, and postprocessing:
42
+
43
+ ```javascript
44
+ import { pipeline } from '@huggingface/transformers';
45
+
46
+ // Create a pipeline for a specific task
47
+ const pipe = await pipeline('sentiment-analysis');
48
+
49
+ // Use the pipeline
50
+ const result = await pipe('I love transformers!');
51
+ // Output: [{ label: 'POSITIVE', score: 0.999817686 }]
52
+
53
+ // IMPORTANT: Always dispose when done to free memory
54
+ await classifier.dispose();
55
+ ```
56
+
57
+ **⚠️ Memory Management:** All pipelines must be disposed with `pipe.dispose()` when finished to prevent memory leaks. See examples in [Code Examples](./references/EXAMPLES.md) for cleanup patterns across different environments.
58
+
59
+ ### 2. Model Selection
60
+ You can specify a custom model as the second argument:
61
+
62
+ ```javascript
63
+ const pipe = await pipeline(
64
+ 'sentiment-analysis',
65
+ 'Xenova/bert-base-multilingual-uncased-sentiment'
66
+ );
67
+ ```
68
+
69
+ **Finding Models:**
70
+
71
+ Browse available Transformers.js models on Hugging Face Hub:
72
+ - **All models**: https://huggingface.co/models?library=transformers.js&sort=trending
73
+ - **By task**: Add `pipeline_tag` parameter
74
+ - Text generation: https://huggingface.co/models?pipeline_tag=text-generation&library=transformers.js&sort=trending
75
+ - Image classification: https://huggingface.co/models?pipeline_tag=image-classification&library=transformers.js&sort=trending
76
+ - Speech recognition: https://huggingface.co/models?pipeline_tag=automatic-speech-recognition&library=transformers.js&sort=trending
77
+
78
+ **Tip:** Filter by task type, sort by trending/downloads, and check model cards for performance metrics and usage examples.
79
+
80
+ ### 3. Device Selection
81
+ Choose where to run the model:
82
+
83
+ ```javascript
84
+ // Run on CPU (default for WASM)
85
+ const pipe = await pipeline('sentiment-analysis', 'model-id');
86
+
87
+ // Run on GPU (WebGPU - experimental)
88
+ const pipe = await pipeline('sentiment-analysis', 'model-id', {
89
+ device: 'webgpu',
90
+ });
91
+ ```
92
+
93
+ ### 4. Quantization Options
94
+ Control model precision vs. performance:
95
+
96
+ ```javascript
97
+ // Use quantized model (faster, smaller)
98
+ const pipe = await pipeline('sentiment-analysis', 'model-id', {
99
+ dtype: 'q4', // Options: 'fp32', 'fp16', 'q8', 'q4'
100
+ });
101
+ ```
102
+
103
+ ## Supported Tasks
104
+
105
+ **Note:** All examples below show basic usage.
106
+
107
+ ### Natural Language Processing
108
+
109
+ #### Text Classification
110
+ ```javascript
111
+ const classifier = await pipeline('text-classification');
112
+ const result = await classifier('This movie was amazing!');
113
+ ```
114
+
115
+ #### Named Entity Recognition (NER)
116
+ ```javascript
117
+ const ner = await pipeline('token-classification');
118
+ const entities = await ner('My name is John and I live in New York.');
119
+ ```
120
+
121
+ #### Question Answering
122
+ ```javascript
123
+ const qa = await pipeline('question-answering');
124
+ const answer = await qa({
125
+ question: 'What is the capital of France?',
126
+ context: 'Paris is the capital and largest city of France.'
127
+ });
128
+ ```
129
+
130
+ #### Text Generation
131
+ ```javascript
132
+ const generator = await pipeline('text-generation', 'onnx-community/gemma-3-270m-it-ONNX');
133
+ const text = await generator('Once upon a time', {
134
+ max_new_tokens: 100,
135
+ temperature: 0.7
136
+ });
137
+ ```
138
+
139
+ **For streaming and chat:** See **[Text Generation Guide](./references/TEXT_GENERATION.md)** for:
140
+ - Streaming token-by-token output with `TextStreamer`
141
+ - Chat/conversation format with system/user/assistant roles
142
+ - Generation parameters (temperature, top_k, top_p)
143
+ - Browser and Node.js examples
144
+ - React components and API endpoints
145
+
146
+ #### Translation
147
+ ```javascript
148
+ const translator = await pipeline('translation', 'Xenova/nllb-200-distilled-600M');
149
+ const output = await translator('Hello, how are you?', {
150
+ src_lang: 'eng_Latn',
151
+ tgt_lang: 'fra_Latn'
152
+ });
153
+ ```
154
+
155
+ #### Summarization
156
+ ```javascript
157
+ const summarizer = await pipeline('summarization');
158
+ const summary = await summarizer(longText, {
159
+ max_length: 100,
160
+ min_length: 30
161
+ });
162
+ ```
163
+
164
+ #### Zero-Shot Classification
165
+ ```javascript
166
+ const classifier = await pipeline('zero-shot-classification');
167
+ const result = await classifier('This is a story about sports.', ['politics', 'sports', 'technology']);
168
+ ```
169
+
170
+ ### Computer Vision
171
+
172
+ #### Image Classification
173
+ ```javascript
174
+ const classifier = await pipeline('image-classification');
175
+ const result = await classifier('https://example.com/image.jpg');
176
+ // Or with local file
177
+ const result = await classifier(imageUrl);
178
+ ```
179
+
180
+ #### Object Detection
181
+ ```javascript
182
+ const detector = await pipeline('object-detection');
183
+ const objects = await detector('https://example.com/image.jpg');
184
+ // Returns: [{ label: 'person', score: 0.95, box: { xmin, ymin, xmax, ymax } }, ...]
185
+ ```
186
+
187
+ #### Image Segmentation
188
+ ```javascript
189
+ const segmenter = await pipeline('image-segmentation');
190
+ const segments = await segmenter('https://example.com/image.jpg');
191
+ ```
192
+
193
+ #### Depth Estimation
194
+ ```javascript
195
+ const depthEstimator = await pipeline('depth-estimation');
196
+ const depth = await depthEstimator('https://example.com/image.jpg');
197
+ ```
198
+
199
+ #### Zero-Shot Image Classification
200
+ ```javascript
201
+ const classifier = await pipeline('zero-shot-image-classification');
202
+ const result = await classifier('image.jpg', ['cat', 'dog', 'bird']);
203
+ ```
204
+
205
+ ### Audio Processing
206
+
207
+ #### Automatic Speech Recognition
208
+ ```javascript
209
+ const transcriber = await pipeline('automatic-speech-recognition');
210
+ const result = await transcriber('audio.wav');
211
+ // Returns: { text: 'transcribed text here' }
212
+ ```
213
+
214
+ #### Audio Classification
215
+ ```javascript
216
+ const classifier = await pipeline('audio-classification');
217
+ const result = await classifier('audio.wav');
218
+ ```
219
+
220
+ #### Text-to-Speech
221
+ ```javascript
222
+ const synthesizer = await pipeline('text-to-speech', 'Xenova/speecht5_tts');
223
+ const audio = await synthesizer('Hello, this is a test.', {
224
+ speaker_embeddings: speakerEmbeddings
225
+ });
226
+ ```
227
+
228
+ ### Multimodal
229
+
230
+ #### Image-to-Text (Image Captioning)
231
+ ```javascript
232
+ const captioner = await pipeline('image-to-text');
233
+ const caption = await captioner('image.jpg');
234
+ ```
235
+
236
+ #### Document Question Answering
237
+ ```javascript
238
+ const docQA = await pipeline('document-question-answering');
239
+ const answer = await docQA('document-image.jpg', 'What is the total amount?');
240
+ ```
241
+
242
+ #### Zero-Shot Object Detection
243
+ ```javascript
244
+ const detector = await pipeline('zero-shot-object-detection');
245
+ const objects = await detector('image.jpg', ['person', 'car', 'tree']);
246
+ ```
247
+
248
+ ### Feature Extraction (Embeddings)
249
+
250
+ ```javascript
251
+ const extractor = await pipeline('feature-extraction');
252
+ const embeddings = await extractor('This is a sentence to embed.');
253
+ // Returns: tensor of shape [1, sequence_length, hidden_size]
254
+
255
+ // For sentence embeddings (mean pooling)
256
+ const extractor = await pipeline('feature-extraction', 'onnx-community/all-MiniLM-L6-v2-ONNX');
257
+ const embeddings = await extractor('Text to embed', { pooling: 'mean', normalize: true });
258
+ ```
259
+
260
+ ## Finding and Choosing Models
261
+
262
+ ### Browsing the Hugging Face Hub
263
+
264
+ Discover compatible Transformers.js models on Hugging Face Hub:
265
+
266
+ **Base URL (all models):**
267
+ ```
268
+ https://huggingface.co/models?library=transformers.js&sort=trending
269
+ ```
270
+
271
+ **Filter by task** using the `pipeline_tag` parameter:
272
+
273
+ | Task | URL |
274
+ |------|-----|
275
+ | **Text Generation** | https://huggingface.co/models?pipeline_tag=text-generation&library=transformers.js&sort=trending |
276
+ | **Text Classification** | https://huggingface.co/models?pipeline_tag=text-classification&library=transformers.js&sort=trending |
277
+ | **Translation** | https://huggingface.co/models?pipeline_tag=translation&library=transformers.js&sort=trending |
278
+ | **Summarization** | https://huggingface.co/models?pipeline_tag=summarization&library=transformers.js&sort=trending |
279
+ | **Question Answering** | https://huggingface.co/models?pipeline_tag=question-answering&library=transformers.js&sort=trending |
280
+ | **Image Classification** | https://huggingface.co/models?pipeline_tag=image-classification&library=transformers.js&sort=trending |
281
+ | **Object Detection** | https://huggingface.co/models?pipeline_tag=object-detection&library=transformers.js&sort=trending |
282
+ | **Image Segmentation** | https://huggingface.co/models?pipeline_tag=image-segmentation&library=transformers.js&sort=trending |
283
+ | **Speech Recognition** | https://huggingface.co/models?pipeline_tag=automatic-speech-recognition&library=transformers.js&sort=trending |
284
+ | **Audio Classification** | https://huggingface.co/models?pipeline_tag=audio-classification&library=transformers.js&sort=trending |
285
+ | **Image-to-Text** | https://huggingface.co/models?pipeline_tag=image-to-text&library=transformers.js&sort=trending |
286
+ | **Feature Extraction** | https://huggingface.co/models?pipeline_tag=feature-extraction&library=transformers.js&sort=trending |
287
+ | **Zero-Shot Classification** | https://huggingface.co/models?pipeline_tag=zero-shot-classification&library=transformers.js&sort=trending |
288
+
289
+ **Sort options:**
290
+ - `&sort=trending` - Most popular recently
291
+ - `&sort=downloads` - Most downloaded overall
292
+ - `&sort=likes` - Most liked by community
293
+ - `&sort=modified` - Recently updated
294
+
295
+ ### Choosing the Right Model
296
+
297
+ Consider these factors when selecting a model:
298
+
299
+ **1. Model Size**
300
+ - **Small (< 100MB)**: Fast, suitable for browsers, limited accuracy
301
+ - **Medium (100MB - 500MB)**: Balanced performance, good for most use cases
302
+ - **Large (> 500MB)**: High accuracy, slower, better for Node.js or powerful devices
303
+
304
+ **2. Quantization**
305
+ Models are often available in different quantization levels:
306
+ - `fp32` - Full precision (largest, most accurate)
307
+ - `fp16` - Half precision (smaller, still accurate)
308
+ - `q8` - 8-bit quantized (much smaller, slight accuracy loss)
309
+ - `q4` - 4-bit quantized (smallest, noticeable accuracy loss)
310
+
311
+ **3. Task Compatibility**
312
+ Check the model card for:
313
+ - Supported tasks (some models support multiple tasks)
314
+ - Input/output formats
315
+ - Language support (multilingual vs. English-only)
316
+ - License restrictions
317
+
318
+ **4. Performance Metrics**
319
+ Model cards typically show:
320
+ - Accuracy scores
321
+ - Benchmark results
322
+ - Inference speed
323
+ - Memory requirements
324
+
325
+ ### Example: Finding a Text Generation Model
326
+
327
+ ```javascript
328
+ // 1. Visit: https://huggingface.co/models?pipeline_tag=text-generation&library=transformers.js&sort=trending
329
+
330
+ // 2. Browse and select a model (e.g., onnx-community/gemma-3-270m-it-ONNX)
331
+
332
+ // 3. Check model card for:
333
+ // - Model size: ~270M parameters
334
+ // - Quantization: q4 available
335
+ // - Language: English
336
+ // - Use case: Instruction-following chat
337
+
338
+ // 4. Use the model:
339
+ import { pipeline } from '@huggingface/transformers';
340
+
341
+ const generator = await pipeline(
342
+ 'text-generation',
343
+ 'onnx-community/gemma-3-270m-it-ONNX',
344
+ { dtype: 'q4' } // Use quantized version for faster inference
345
+ );
346
+
347
+ const output = await generator('Explain quantum computing in simple terms.', {
348
+ max_new_tokens: 100
349
+ });
350
+
351
+ await generator.dispose();
352
+ ```
353
+
354
+ ### Tips for Model Selection
355
+
356
+ 1. **Start Small**: Test with a smaller model first, then upgrade if needed
357
+ 2. **Check ONNX Support**: Ensure the model has ONNX files (look for `onnx` folder in model repo)
358
+ 3. **Read Model Cards**: Model cards contain usage examples, limitations, and benchmarks
359
+ 4. **Test Locally**: Benchmark inference speed and memory usage in your environment
360
+ 5. **Community Models**: Look for models by `Xenova` (Transformers.js maintainer) or `onnx-community`
361
+ 6. **Version Pin**: Use specific git commits in production for stability:
362
+ ```javascript
363
+ const pipe = await pipeline('task', 'model-id', { revision: 'abc123' });
364
+ ```
365
+
366
+ ## Advanced Configuration
367
+
368
+ ### Environment Configuration (`env`)
369
+
370
+ The `env` object provides comprehensive control over Transformers.js execution, caching, and model loading.
371
+
372
+ **Quick Overview:**
373
+
374
+ ```javascript
375
+ import { env } from '@huggingface/transformers';
376
+
377
+ // View version
378
+ console.log(env.version); // e.g., '3.8.1'
379
+
380
+ // Common settings
381
+ env.allowRemoteModels = true; // Load from Hugging Face Hub
382
+ env.allowLocalModels = false; // Load from file system
383
+ env.localModelPath = '/models/'; // Local model directory
384
+ env.useFSCache = true; // Cache models on disk (Node.js)
385
+ env.useBrowserCache = true; // Cache models in browser
386
+ env.cacheDir = './.cache'; // Cache directory location
387
+ ```
388
+
389
+ **Configuration Patterns:**
390
+
391
+ ```javascript
392
+ // Development: Fast iteration with remote models
393
+ env.allowRemoteModels = true;
394
+ env.useFSCache = true;
395
+
396
+ // Production: Local models only
397
+ env.allowRemoteModels = false;
398
+ env.allowLocalModels = true;
399
+ env.localModelPath = '/app/models/';
400
+
401
+ // Custom CDN
402
+ env.remoteHost = 'https://cdn.example.com/models';
403
+
404
+ // Disable caching (testing)
405
+ env.useFSCache = false;
406
+ env.useBrowserCache = false;
407
+ ```
408
+
409
+ For complete documentation on all configuration options, caching strategies, cache management, pre-downloading models, and more, see:
410
+
411
+ **→ [Configuration Reference](./references/CONFIGURATION.md)**
412
+
413
+ ### Working with Tensors
414
+
415
+ ```javascript
416
+ import { AutoTokenizer, AutoModel } from '@huggingface/transformers';
417
+
418
+ // Load tokenizer and model separately for more control
419
+ const tokenizer = await AutoTokenizer.from_pretrained('bert-base-uncased');
420
+ const model = await AutoModel.from_pretrained('bert-base-uncased');
421
+
422
+ // Tokenize input
423
+ const inputs = await tokenizer('Hello world!');
424
+
425
+ // Run model
426
+ const outputs = await model(inputs);
427
+ ```
428
+
429
+ ### Batch Processing
430
+
431
+ ```javascript
432
+ const classifier = await pipeline('sentiment-analysis');
433
+
434
+ // Process multiple texts
435
+ const results = await classifier([
436
+ 'I love this!',
437
+ 'This is terrible.',
438
+ 'It was okay.'
439
+ ]);
440
+ ```
441
+
442
+ ## Browser-Specific Considerations
443
+
444
+ ### WebGPU Usage
445
+ WebGPU provides GPU acceleration in browsers:
446
+
447
+ ```javascript
448
+ const pipe = await pipeline('text-generation', 'onnx-community/gemma-3-270m-it-ONNX', {
449
+ device: 'webgpu',
450
+ dtype: 'fp32'
451
+ });
452
+ ```
453
+
454
+ **Note**: WebGPU is experimental. Check browser compatibility and file issues if problems occur.
455
+
456
+ ### WASM Performance
457
+ Default browser execution uses WASM:
458
+
459
+ ```javascript
460
+ // Optimized for browsers with quantization
461
+ const pipe = await pipeline('sentiment-analysis', 'model-id', {
462
+ dtype: 'q8' // or 'q4' for even smaller size
463
+ });
464
+ ```
465
+
466
+ ### Progress Tracking & Loading Indicators
467
+
468
+ Models can be large (ranging from a few MB to several GB) and consist of multiple files. Track download progress by passing a callback to the `pipeline()` function:
469
+
470
+ ```javascript
471
+ import { pipeline } from '@huggingface/transformers';
472
+
473
+ // Track progress for each file
474
+ const fileProgress = {};
475
+
476
+ function onProgress(info) {
477
+ console.log(`${info.status}: ${info.file}`);
478
+
479
+ if (info.status === 'progress') {
480
+ fileProgress[info.file] = info.progress;
481
+ console.log(`${info.file}: ${info.progress.toFixed(1)}%`);
482
+ }
483
+
484
+ if (info.status === 'done') {
485
+ console.log(`✓ ${info.file} complete`);
486
+ }
487
+ }
488
+
489
+ // Pass callback to pipeline
490
+ const classifier = await pipeline('sentiment-analysis', null, {
491
+ progress_callback: onProgress
492
+ });
493
+ ```
494
+
495
+ **Progress Info Properties:**
496
+
497
+ ```typescript
498
+ interface ProgressInfo {
499
+ status: 'initiate' | 'download' | 'progress' | 'done' | 'ready';
500
+ name: string; // Model id or path
501
+ file: string; // File being processed
502
+ progress?: number; // Percentage (0-100, only for 'progress' status)
503
+ loaded?: number; // Bytes downloaded (only for 'progress' status)
504
+ total?: number; // Total bytes (only for 'progress' status)
505
+ }
506
+ ```
507
+
508
+ For complete examples including browser UIs, React components, CLI progress bars, and retry logic, see:
509
+
510
+ **→ [Pipeline Options - Progress Callback](./references/PIPELINE_OPTIONS.md#progress-callback)**
511
+
512
+ ## Error Handling
513
+
514
+ ```javascript
515
+ try {
516
+ const pipe = await pipeline('sentiment-analysis', 'model-id');
517
+ const result = await pipe('text to analyze');
518
+ } catch (error) {
519
+ if (error.message.includes('fetch')) {
520
+ console.error('Model download failed. Check internet connection.');
521
+ } else if (error.message.includes('ONNX')) {
522
+ console.error('Model execution failed. Check model compatibility.');
523
+ } else {
524
+ console.error('Unknown error:', error);
525
+ }
526
+ }
527
+ ```
528
+
529
+ ## Performance Tips
530
+
531
+ 1. **Reuse Pipelines**: Create pipeline once, reuse for multiple inferences
532
+ 2. **Use Quantization**: Start with `q8` or `q4` for faster inference
533
+ 3. **Batch Processing**: Process multiple inputs together when possible
534
+ 4. **Cache Models**: Models are cached automatically (see **[Caching Reference](./references/CACHE.md)** for details on browser Cache API, Node.js filesystem cache, and custom implementations)
535
+ 5. **WebGPU for Large Models**: Use WebGPU for models that benefit from GPU acceleration
536
+ 6. **Prune Context**: For text generation, limit `max_new_tokens` to avoid memory issues
537
+ 7. **Clean Up Resources**: Call `pipe.dispose()` when done to free memory
538
+
539
+ ## Memory Management
540
+
541
+ **IMPORTANT:** Always call `pipe.dispose()` when finished to prevent memory leaks.
542
+
543
+ ```javascript
544
+ const pipe = await pipeline('sentiment-analysis');
545
+ const result = await pipe('Great product!');
546
+ await pipe.dispose(); // ✓ Free memory (100MB - several GB per model)
547
+ ```
548
+
549
+ **When to dispose:**
550
+ - Application shutdown or component unmount
551
+ - Before loading a different model
552
+ - After batch processing in long-running apps
553
+
554
+ Models consume significant memory and hold GPU/CPU resources. Disposal is critical for browser memory limits and server stability.
555
+
556
+ For detailed patterns (React cleanup, servers, browser), see **[Code Examples](./references/EXAMPLES.md)**
557
+
558
+ ## Troubleshooting
559
+
560
+ ### Model Not Found
561
+ - Verify model exists on Hugging Face Hub
562
+ - Check model name spelling
563
+ - Ensure model has ONNX files (look for `onnx` folder in model repo)
564
+
565
+ ### Memory Issues
566
+ - Use smaller models or quantized versions (`dtype: 'q4'`)
567
+ - Reduce batch size
568
+ - Limit sequence length with `max_length`
569
+
570
+ ### WebGPU Errors
571
+ - Check browser compatibility (Chrome 113+, Edge 113+)
572
+ - Try `dtype: 'fp16'` if `fp32` fails
573
+ - Fall back to WASM if WebGPU unavailable
574
+
575
+ ## Reference Documentation
576
+
577
+ ### This Skill
578
+ - **[Pipeline Options](./references/PIPELINE_OPTIONS.md)** - Configure `pipeline()` with `progress_callback`, `device`, `dtype`, etc.
579
+ - **[Configuration Reference](./references/CONFIGURATION.md)** - Global `env` configuration for caching and model loading
580
+ - **[Caching Reference](./references/CACHE.md)** - Browser Cache API, Node.js filesystem cache, and custom cache implementations
581
+ - **[Text Generation Guide](./references/TEXT_GENERATION.md)** - Streaming, chat format, and generation parameters
582
+ - **[Model Architectures](./references/MODEL_ARCHITECTURES.md)** - Supported models and selection tips
583
+ - **[Code Examples](./references/EXAMPLES.md)** - Real-world implementations for different runtimes
584
+
585
+ ### Official Transformers.js
586
+ - Official docs: https://huggingface.co/docs/transformers.js
587
+ - API reference: https://huggingface.co/docs/transformers.js/api/pipelines
588
+ - Model hub: https://huggingface.co/models?library=transformers.js
589
+ - GitHub: https://github.com/huggingface/transformers.js
590
+ - Examples: https://github.com/huggingface/transformers.js/tree/main/examples
591
+
592
+ ## Best Practices
593
+
594
+ 1. **Always Dispose Pipelines**: Call `pipe.dispose()` when done - critical for preventing memory leaks
595
+ 2. **Start with Pipelines**: Use the pipeline API unless you need fine-grained control
596
+ 3. **Test Locally First**: Test models with small inputs before deploying
597
+ 4. **Monitor Model Sizes**: Be aware of model download sizes for web applications
598
+ 5. **Handle Loading States**: Show progress indicators for better UX
599
+ 6. **Version Pin**: Pin specific model versions for production stability
600
+ 7. **Error Boundaries**: Always wrap pipeline calls in try-catch blocks
601
+ 8. **Progressive Enhancement**: Provide fallbacks for unsupported browsers
602
+ 9. **Reuse Models**: Load once, use many times - don't recreate pipelines unnecessarily
603
+ 10. **Graceful Shutdown**: Dispose models on SIGTERM/SIGINT in servers
604
+
605
+ ## Quick Reference: Task IDs
606
+
607
+ | Task | Task ID |
608
+ |------|---------|
609
+ | Text classification | `text-classification` or `sentiment-analysis` |
610
+ | Token classification | `token-classification` or `ner` |
611
+ | Question answering | `question-answering` |
612
+ | Fill mask | `fill-mask` |
613
+ | Summarization | `summarization` |
614
+ | Translation | `translation` |
615
+ | Text generation | `text-generation` |
616
+ | Text-to-text generation | `text2text-generation` |
617
+ | Zero-shot classification | `zero-shot-classification` |
618
+ | Image classification | `image-classification` |
619
+ | Image segmentation | `image-segmentation` |
620
+ | Object detection | `object-detection` |
621
+ | Depth estimation | `depth-estimation` |
622
+ | Image-to-image | `image-to-image` |
623
+ | Zero-shot image classification | `zero-shot-image-classification` |
624
+ | Zero-shot object detection | `zero-shot-object-detection` |
625
+ | Automatic speech recognition | `automatic-speech-recognition` |
626
+ | Audio classification | `audio-classification` |
627
+ | Text-to-speech | `text-to-speech` or `text-to-audio` |
628
+ | Image-to-text | `image-to-text` |
629
+ | Document question answering | `document-question-answering` |
630
+ | Feature extraction | `feature-extraction` |
631
+ | Sentence similarity | `sentence-similarity` |
632
+
633
+ ---
634
+
635
+ This skill enables you to integrate state-of-the-art machine learning capabilities directly into JavaScript applications without requiring separate ML servers or Python environments.