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,321 @@
1
+ ---
2
+ name: chatgpt-apps
3
+ description: Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.
4
+ category: backend
5
+ ---
6
+
7
+ # ChatGPT Apps
8
+
9
+ ## Overview
10
+
11
+ Scaffold ChatGPT Apps SDK implementations with a docs-first, example-first workflow, then generate code that follows current Apps SDK and MCP Apps bridge patterns.
12
+
13
+ Use this skill to produce:
14
+
15
+ - A primary app-archetype classification and repo-shape decision
16
+ - A tool plan (names, schemas, annotations, outputs)
17
+ - An upstream starting-point recommendation (official example, ext-apps example, or local fallback scaffold)
18
+ - An MCP server scaffold (resource registration, tool handlers, metadata)
19
+ - A widget scaffold (MCP Apps bridge first, `window.openai` compatibility/extensions second)
20
+ - A reusable Node + `@modelcontextprotocol/ext-apps` starter scaffold for low-dependency fallbacks
21
+ - A validation report against the minimum working repo contract
22
+ - Local dev and connector setup steps
23
+ - A short stakeholder summary of what the app does (when requested)
24
+
25
+ ## Mandatory Docs-First Workflow
26
+
27
+ Use `$openai-docs` first whenever building or changing a ChatGPT Apps SDK app.
28
+
29
+ 1. Invoke `$openai-docs` (preferred) or call the OpenAI docs MCP server directly.
30
+ 2. Fetch current Apps SDK docs before writing code, especially (baseline pages):
31
+ - `apps-sdk/build/mcp-server`
32
+ - `apps-sdk/build/chatgpt-ui`
33
+ - `apps-sdk/build/examples`
34
+ - `apps-sdk/plan/tools`
35
+ - `apps-sdk/reference`
36
+ 3. Fetch `apps-sdk/quickstart` when scaffolding a new app or generating a first-pass implementation, and check the official examples repo/page before inventing a scaffold from scratch.
37
+ 4. Fetch deployment/submission docs when the task includes local ChatGPT testing, hosting, or public launch:
38
+ - `apps-sdk/deploy`
39
+ - `apps-sdk/deploy/submission`
40
+ - `apps-sdk/app-submission-guidelines`
41
+ 5. Cite the docs URLs you used when explaining design choices or generated scaffolds.
42
+ 6. Prefer current docs guidance over older repo patterns when they differ, and call out compatibility aliases explicitly.
43
+ 7. If doc search times out or returns poor matches, fetch the canonical Apps SDK pages directly by URL and continue; do not let search failure block scaffolding.
44
+
45
+ If `$openai-docs` is unavailable, use:
46
+
47
+ - `mcp__openaiDeveloperDocs__search_openai_docs`
48
+ - `mcp__openaiDeveloperDocs__fetch_openai_doc`
49
+
50
+ Read `references/apps-sdk-docs-workflow.md` for suggested doc queries and a compact checklist.
51
+ Read `references/app-archetypes.md` to classify the request into a small number of supported app shapes before choosing examples or scaffolds.
52
+ Read `references/repo-contract-and-validation.md` when generating or reviewing a repo so the output stays inside a stable “working app” contract.
53
+ Read `references/search-fetch-standard.md` when the app is connector-like, data-only, sync-oriented, or meant to work well with company knowledge or deep research.
54
+ Read `references/upstream-example-workflow.md` when starting a greenfield app or when deciding whether to adapt an upstream example or use the local fallback scaffold.
55
+ Read `references/window-openai-patterns.md` when the task needs ChatGPT-specific widget behavior or when translating repo examples that use wrapper-specific `app.*` helpers.
56
+
57
+ ## Prompt Guidance
58
+
59
+ Use prompts that explicitly pair this skill with `$openai-docs` so the resulting scaffold is grounded in current docs.
60
+
61
+ Preferred prompt patterns:
62
+
63
+ - `Use $chatgpt-apps with $openai-docs to scaffold a ChatGPT app for <use case> with a <TS/Python> MCP server and <React/vanilla> widget.`
64
+ - `Use $chatgpt-apps with $openai-docs to adapt the closest official Apps SDK example into a ChatGPT app for <use case>.`
65
+ - `Use $chatgpt-apps and $openai-docs to refactor this Apps SDK demo into a production-ready structure with tool annotations, CSP, and URI versioning.`
66
+ - `Use $chatgpt-apps with $openai-docs to plan tools first, then generate the MCP server and widget code.`
67
+
68
+ When responding, ask for or infer these inputs before coding:
69
+
70
+ - Use case and primary user flows
71
+ - Read-only vs mutating tools
72
+ - Demo vs production target
73
+ - Private/internal use vs public directory submission
74
+ - Backend language and UI stack
75
+ - Auth requirements
76
+ - External API domains for CSP allowlists
77
+ - Hosting target and local dev approach
78
+ - Org ownership/verification readiness (for submission tasks)
79
+
80
+ ## Classify The App Before Choosing Code
81
+
82
+ Before choosing examples, repo shape, or scaffolds, classify the request into one primary archetype and state it.
83
+
84
+ - `tool-only`
85
+ - `vanilla-widget`
86
+ - `react-widget`
87
+ - `interactive-decoupled`
88
+ - `submission-ready`
89
+
90
+ Infer the archetype unless a missing detail is truly blocking. Use the archetype to choose:
91
+
92
+ - whether a UI is needed at all
93
+ - whether to preserve a split `server/` + `web/` layout
94
+ - whether to prefer official OpenAI examples, ext-apps examples, or the local fallback scaffold
95
+ - which validation checks matter most
96
+ - whether `search` and `fetch` should be the default read-only tool surface
97
+
98
+ Read `references/app-archetypes.md` for the decision rubric.
99
+
100
+ ## Default Starting-Point Order
101
+
102
+ For greenfield apps, prefer these starting points in order:
103
+
104
+ 1. **Official OpenAI examples** when a close example already matches the requested stack or interaction pattern.
105
+ 2. **Version-matched `@modelcontextprotocol/ext-apps` examples** when the user needs a lower-level or more portable MCP Apps baseline.
106
+ 3. **`scripts/scaffold_node_ext_apps.mjs`** only when no close example fits, the user wants a tiny Node + vanilla starter, or network access/example retrieval is undesirable.
107
+
108
+ Do not generate a large custom scaffold from scratch if a close upstream example already exists.
109
+ Copy the smallest matching example, remove unrelated demo code, then patch it to the current docs and the user request.
110
+
111
+ ## Build Workflow
112
+
113
+ ### 0. Classify The App Archetype
114
+
115
+ Pick one primary archetype before planning tools or choosing a starting point.
116
+
117
+ - Prefer a single primary archetype instead of mixing several.
118
+ - If the request is broad, infer the smallest archetype that can still satisfy it.
119
+ - Escalate to `submission-ready` only when the user asks for public launch, directory submission, or review-ready deployment.
120
+ - Call out the chosen archetype in your response so the user can correct it early if needed.
121
+
122
+ ### 1. Plan Tools Before Code
123
+
124
+ Define the tool surface area from user intents.
125
+
126
+ - Use one job per tool.
127
+ - Write tool descriptions that start with "Use this when..." behavior cues.
128
+ - Make inputs explicit and machine-friendly (enums, required fields, bounds).
129
+ - Decide whether each tool is data-only, render-only, or both.
130
+ - Set annotations accurately (`readOnlyHint`, `destructiveHint`, `openWorldHint`; add `idempotentHint` when true).
131
+ - If the app is connector-like, data-only, sync-oriented, or intended for company knowledge or deep research, default to the standard `search` and `fetch` tools instead of inventing custom read-only equivalents.
132
+ - For educational/demo apps, prefer one concept per tool so the model can pick the right example cleanly.
133
+ - Group demo tools by learning objective: data into the widget, widget actions back into the conversation or tools, host/layout environment signals, and lifecycle/streaming behavior.
134
+
135
+ Read `references/search-fetch-standard.md` when `search` and `fetch` may be relevant.
136
+
137
+ ### 2. Choose an App Architecture
138
+
139
+ Choose the simplest structure that fits the goal.
140
+
141
+ - Use a **minimal demo pattern** for quick prototypes, workshops, or proofs of concept.
142
+ - Use a **decoupled data/render pattern** for production UX so the widget does not re-render on every tool call.
143
+
144
+ Prefer the decoupled pattern for non-trivial apps:
145
+
146
+ - Data tools return reusable `structuredContent`.
147
+ - Render tools attach `_meta.ui.resourceUri` and optional `_meta["openai/outputTemplate"]`.
148
+ - Render tool descriptions state prerequisites (for example, "Call `search` first").
149
+
150
+ ### 2a. Start From An Upstream Example When One Fits
151
+
152
+ Default to upstream examples for greenfield work when they are close to the requested app.
153
+
154
+ - Check the official OpenAI examples first for ChatGPT-facing apps, polished UI patterns, React components, file upload flows, modal flows, or apps that resemble the docs examples.
155
+ - Use `@modelcontextprotocol/ext-apps` examples when the request is closer to raw MCP Apps bridge/server wiring, or when version-matched package patterns matter more than ChatGPT-specific polish.
156
+ - Pick the smallest matching example and copy only the relevant files; do not transplant an entire showcase app unchanged.
157
+ - After copying, reconcile the example with the current docs you fetched: tool names/descriptions, annotations, `_meta.ui.*`, CSP, URI versioning, and local run instructions.
158
+ - State which example you chose and why in one sentence.
159
+
160
+ Read `references/upstream-example-workflow.md` for the selection and adaptation rubric.
161
+
162
+ ### 2b. Use the Starter Script When a Low-Dependency Fallback Helps
163
+
164
+ Use `scripts/scaffold_node_ext_apps.mjs` only when the user wants a quick, greenfield Node starter and a vanilla HTML widget is acceptable, and no upstream example is a better starting point.
165
+
166
+ - Run it only after fetching current docs, then reconcile the generated files with the docs you fetched.
167
+ - If you choose the script instead of an upstream example, say why the fallback is better for that request.
168
+ - Skip it when a close official example exists, when the user already has an existing app structure, when they need a non-Node stack, when they explicitly want React first, or when they only want a plan/review instead of code.
169
+ - The script generates a minimal `@modelcontextprotocol/ext-apps` server plus a vanilla HTML widget that uses the MCP Apps bridge by default.
170
+ - The generated widget keeps follow-up messaging on the standard `ui/message` bridge and only uses `window.openai` for optional host signals/extensions.
171
+ - After running it, patch the generated output to match the current docs and the user request: adjust tool names/descriptions, annotations, resource metadata, URI versioning, and README/run instructions.
172
+
173
+ ### 3. Scaffold the MCP Server
174
+
175
+ Generate a server that:
176
+
177
+ - Registers a widget resource/template with the MCP Apps UI MIME type (`text/html;profile=mcp-app`) or the SDK constant (`RESOURCE_MIME_TYPE`) when using `@modelcontextprotocol/ext-apps/server`
178
+ - Registers tools with clear names, schemas, titles, and descriptions
179
+ - Returns `structuredContent` (model + widget), `content` (model narration), and `_meta` (widget-only data) intentionally
180
+ - Keeps handlers idempotent or documents non-idempotent behavior explicitly
181
+ - Includes tool status strings (`openai/toolInvocation/*`) when helpful in ChatGPT
182
+
183
+ Keep `structuredContent` concise. Move large or sensitive widget-only payloads to `_meta`.
184
+
185
+ ### 4. Scaffold the Widget UI
186
+
187
+ Use the MCP Apps bridge first for portability, then add ChatGPT-specific `window.openai` APIs when they materially improve UX.
188
+
189
+ - Listen for `ui/notifications/tool-result` (JSON-RPC over `postMessage`)
190
+ - Render from `structuredContent`
191
+ - Use `tools/call` for component-initiated tool calls
192
+ - Use `ui/update-model-context` only when UI state should change what the model sees
193
+
194
+ Use `window.openai` for compatibility and extensions (file upload, modal, display mode, etc.), not as the only integration path for new apps.
195
+
196
+ #### API Surface Guardrails
197
+
198
+ - Some examples wrap the bridge with an `app` object (for example, `@modelcontextprotocol/ext-apps/react`) and expose helper names like `app.sendMessage()`, `app.callServerTool()`, `app.openLink()`, or host getter methods.
199
+ - Treat those wrappers as implementation details or convenience layers, not the canonical public API to teach by default.
200
+ - For ChatGPT-facing guidance, prefer the current documented surface: `window.openai.callTool(...)`, `window.openai.sendFollowUpMessage(...)`, `window.openai.openExternal(...)`, `window.openai.requestDisplayMode(...)`, and direct globals like `window.openai.theme`, `window.openai.locale`, `window.openai.displayMode`, `window.openai.toolInput`, `window.openai.toolOutput`, `window.openai.toolResponseMetadata`, and `window.openai.widgetState`.
201
+ - If you reference wrapper helpers from repo examples, map them back to the documented `window.openai` or MCP Apps bridge primitives and call out that the wrapper is not the normative API surface.
202
+ - Use `references/window-openai-patterns.md` for the wrapper-to-canonical mapping and for React helper extraction patterns.
203
+
204
+ ### 5. Add Resource Metadata and Security
205
+
206
+ Set resource metadata deliberately on the widget resource/template:
207
+
208
+ - `_meta.ui.csp` with exact `connectDomains` and `resourceDomains`
209
+ - `_meta.ui.domain` for app submission-ready deployments
210
+ - `_meta.ui.prefersBorder` (or OpenAI compatibility alias when needed)
211
+ - Optional `openai/widgetDescription` to reduce redundant narration
212
+
213
+ Avoid `frameDomains` unless iframe embeds are core to the product.
214
+
215
+ ### 5a. Enforce A Minimum Working Repo Contract
216
+
217
+ Every generated repo should satisfy a small, stable contract before you consider it done.
218
+
219
+ - The repo shape matches the chosen archetype.
220
+ - The MCP server and tools are wired to a reachable `/mcp` endpoint.
221
+ - Tools have clear descriptions, accurate annotations, and UI metadata where needed.
222
+ - Connector-like, data-only, sync-oriented, and company-knowledge-style apps use the standard `search` and `fetch` tool shapes when relevant.
223
+ - The widget uses the MCP Apps bridge correctly when a UI exists.
224
+ - The repo includes enough scripts or commands for a user to run and check it locally.
225
+ - The response explicitly says what validation was run and what was not run.
226
+
227
+ Read `references/repo-contract-and-validation.md` for the detailed checklist and validation ladder.
228
+
229
+ ### 6. Validate the Local Loop
230
+
231
+ Validate against the minimum working repo contract, not just “did files get created.”
232
+
233
+ - Run the lowest-cost checks first:
234
+ - static contract review
235
+ - syntax or compile checks when feasible
236
+ - local `/mcp` health check when feasible
237
+ - Then move up to runtime checks:
238
+ - verify tool descriptors and widget rendering in MCP Inspector
239
+ - test the app in ChatGPT developer mode through HTTPS tunneling
240
+ - exercise retries and repeated tool calls to confirm idempotent behavior
241
+ - check widget updates after host events and follow-up tool calls
242
+ - If you are only delivering a scaffold and are not installing dependencies, still run low-cost checks and say exactly what you did not run.
243
+
244
+ Read `references/repo-contract-and-validation.md` for the validation ladder.
245
+
246
+ ### 7. Connect and Test in ChatGPT (Developer Mode)
247
+
248
+ For local development, include explicit ChatGPT setup steps (not just code/run commands).
249
+
250
+ - Run the MCP server locally on `http://localhost:<port>/mcp`
251
+ - Expose the local server with a public HTTPS tunnel (for example `ngrok http <port>`)
252
+ - Use the tunneled HTTPS URL plus `/mcp` path when connecting from ChatGPT
253
+ - In ChatGPT, enable Developer Mode under **Settings → Apps & Connectors → Advanced settings**
254
+ - In ChatGPT app settings, create a new app for the remote MCP server and paste the public MCP URL
255
+ - Tell users to refresh the app after MCP tool/metadata changes so ChatGPT reloads the latest descriptors
256
+
257
+ Note: Some docs/screenshots still use older "connector" terminology. Prefer current product wording ("app") while acknowledging both labels when giving step-by-step instructions.
258
+
259
+ ### 8. Plan Production Hosting and Deployment
260
+
261
+ When the user asks to deploy or prepare for launch, generate hosting guidance for the MCP server (and widget assets if hosted separately).
262
+
263
+ - Host behind a stable public HTTPS endpoint (not a tunnel) with dependable TLS
264
+ - Preserve low-latency streaming behavior on `/mcp`
265
+ - Configure secrets outside the repo (environment variables / secret manager)
266
+ - Add logging, request latency tracking, and error visibility for tool calls
267
+ - Add basic observability (CPU, memory, request volume) and a troubleshooting path
268
+ - Re-test the hosted endpoint in ChatGPT Developer Mode before submission
269
+
270
+ ### 9. Prepare Submission and Publish (Public Apps Only)
271
+
272
+ Only include these steps when the user intends a public directory listing.
273
+
274
+ - Use `apps-sdk/deploy/submission` for the submission flow and `apps-sdk/app-submission-guidelines` for review requirements
275
+ - Keep private/internal apps in Developer Mode instead of submitting
276
+ - Confirm org verification and Owner-role prerequisites before submission work
277
+ - Ensure the MCP server uses a public production endpoint (no localhost/testing URLs) and has submission-ready CSP configured
278
+ - Prepare submission artifacts: app metadata, logo/screenshots, privacy policy URL, support contact, test prompts/responses, localization info
279
+ - If auth is required, include review-safe demo credentials and test the login path end-to-end
280
+ - Submit for review in the Platform dashboard, monitor review status, and publish only after approval
281
+
282
+ ## Interactive State Guidance
283
+
284
+ Read `references/interactive-state-sync-patterns.md` when the app has long-lived widget state, repeated interactions, or component-initiated tool calls (for example, games, boards, maps, dashboards, editors).
285
+
286
+ Use it to choose patterns for:
287
+
288
+ - State snapshots plus monotonic event tokens (`stateVersion`, `resetCount`, etc.)
289
+ - Idempotent retry-safe handlers
290
+ - `structuredContent` vs `_meta` partitioning
291
+ - MCP Apps bridge-first update flows with optional `window.openai` compatibility
292
+ - Decoupled data/render tool architecture for more complex interactive apps
293
+
294
+ ## Output Expectations
295
+
296
+ When using this skill to scaffold code, produce output in this order unless the user asks otherwise:
297
+
298
+ - For direct scaffold requests, do not stop at the plan: give the brief plan, then create the files immediately.
299
+
300
+ 1. Primary app archetype chosen and why
301
+ 2. Tool plan and architecture choice (minimal vs decoupled)
302
+ 3. Upstream starting point chosen (official example, ext-apps example, or local fallback scaffold) and why
303
+ 4. Doc pages/URLs used from `$openai-docs`
304
+ 5. File tree to create or modify
305
+ 6. Implementation (server + widget)
306
+ 7. Validation performed against the minimum working repo contract
307
+ 8. Local run/test instructions (including tunnel + ChatGPT Developer Mode app setup)
308
+ 9. Deployment/hosting guidance (if requested or implied)
309
+ 10. Submission-readiness checklist (for public launch requests)
310
+ 11. Risks, gaps, and follow-up improvements
311
+
312
+ ## References
313
+
314
+ - `references/app-archetypes.md` for classifying requests into a small number of supported app shapes
315
+ - `references/apps-sdk-docs-workflow.md` for doc queries, page targets, and code-generation checklist
316
+ - `references/interactive-state-sync-patterns.md` for reusable patterns for stateful or highly interactive widget apps
317
+ - `references/repo-contract-and-validation.md` for the minimum working repo contract and lightweight validation ladder
318
+ - `references/search-fetch-standard.md` for when and how to default to the standard `search` and `fetch` tools
319
+ - `references/upstream-example-workflow.md` for choosing between official examples, ext-apps examples, and the local fallback scaffold
320
+ - `references/window-openai-patterns.md` for ChatGPT-specific extensions, wrapper API translation, and React helper patterns
321
+ - `scripts/scaffold_node_ext_apps.mjs` for a minimal Node + `@modelcontextprotocol/ext-apps` fallback starter scaffold
@@ -0,0 +1,318 @@
1
+ ---
2
+ name: client-setup
3
+ description: >
4
+ Create a vanilla tRPC client with createTRPCClient<AppRouter>(), configure
5
+ link chain with httpBatchLink/httpLink, dynamic headers for auth, transformer
6
+ on links (not client constructor). Infer types with inferRouterInputs and
7
+ inferRouterOutputs. AbortController signal support. TRPCClientError typing.
8
+ type: core
9
+ library: trpc
10
+ library_version: '11.15.1'
11
+ requires:
12
+ - server-setup
13
+ sources:
14
+ - www/docs/client/overview.md
15
+ - www/docs/client/vanilla/overview.md
16
+ - www/docs/client/vanilla/setup.mdx
17
+ - www/docs/client/vanilla/infer-types.md
18
+ - www/docs/client/headers.md
19
+ - packages/client/src/internals/TRPCUntypedClient.ts
20
+ category: backend
21
+ ---
22
+
23
+ # tRPC -- Client Setup
24
+
25
+ ## Setup
26
+
27
+ ```ts
28
+ // server.ts
29
+ import { initTRPC } from '@trpc/server';
30
+ import { z } from 'zod';
31
+
32
+ const t = initTRPC.create();
33
+
34
+ const appRouter = t.router({
35
+ user: t.router({
36
+ byId: t.procedure
37
+ .input(z.object({ id: z.string() }))
38
+ .query(({ input }) => ({ id: input.id, name: 'Bilbo' })),
39
+ create: t.procedure
40
+ .input(z.object({ name: z.string() }))
41
+ .mutation(({ input }) => ({ id: '1', ...input })),
42
+ }),
43
+ });
44
+
45
+ export type AppRouter = typeof appRouter;
46
+ ```
47
+
48
+ ```ts
49
+ // client.ts
50
+ import { createTRPCClient, httpBatchLink } from '@trpc/client';
51
+ import type { AppRouter } from './server';
52
+
53
+ const client = createTRPCClient<AppRouter>({
54
+ links: [
55
+ httpBatchLink({
56
+ url: 'http://localhost:3000/trpc',
57
+ }),
58
+ ],
59
+ });
60
+
61
+ const user = await client.user.byId.query({ id: '1' });
62
+ const created = await client.user.create.mutate({ name: 'Frodo' });
63
+ ```
64
+
65
+ ## Core Patterns
66
+
67
+ ### Dynamic Auth Headers
68
+
69
+ ```ts
70
+ import { createTRPCClient, httpBatchLink } from '@trpc/client';
71
+ import type { AppRouter } from './server';
72
+
73
+ let token = '';
74
+
75
+ export function setToken(newToken: string) {
76
+ token = newToken;
77
+ }
78
+
79
+ export const client = createTRPCClient<AppRouter>({
80
+ links: [
81
+ httpBatchLink({
82
+ url: 'http://localhost:3000/trpc',
83
+ headers() {
84
+ return {
85
+ Authorization: token ? `Bearer ${token}` : '',
86
+ };
87
+ },
88
+ }),
89
+ ],
90
+ });
91
+ ```
92
+
93
+ The `headers` callback is invoked on every HTTP request, so token changes take effect immediately.
94
+
95
+ ### Inferring Procedure Input and Output Types
96
+
97
+ ```ts
98
+ import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server';
99
+ import type { AppRouter } from './server';
100
+
101
+ type RouterInput = inferRouterInputs<AppRouter>;
102
+ type RouterOutput = inferRouterOutputs<AppRouter>;
103
+
104
+ type UserCreateInput = RouterInput['user']['create'];
105
+ type UserByIdOutput = RouterOutput['user']['byId'];
106
+ ```
107
+
108
+ ### Aborting Requests with AbortController
109
+
110
+ ```ts
111
+ import { createTRPCClient, httpBatchLink } from '@trpc/client';
112
+ import type { AppRouter } from './server';
113
+
114
+ const client = createTRPCClient<AppRouter>({
115
+ links: [httpBatchLink({ url: 'http://localhost:3000/trpc' })],
116
+ });
117
+
118
+ const ac = new AbortController();
119
+ const query = client.user.byId.query({ id: '1' }, { signal: ac.signal });
120
+ ac.abort();
121
+ ```
122
+
123
+ ### Typed Error Handling
124
+
125
+ ```ts
126
+ import { TRPCClientError } from '@trpc/client';
127
+ import type { AppRouter } from './server';
128
+
129
+ function isTRPCClientError(
130
+ cause: unknown,
131
+ ): cause is TRPCClientError<AppRouter> {
132
+ return cause instanceof TRPCClientError;
133
+ }
134
+
135
+ try {
136
+ await client.user.byId.query({ id: '1' });
137
+ } catch (cause) {
138
+ if (isTRPCClientError(cause)) {
139
+ console.log('tRPC error code:', cause.data?.code);
140
+ }
141
+ }
142
+ ```
143
+
144
+ ## Common Mistakes
145
+
146
+ ### [CRITICAL] Missing AppRouter type parameter on createTRPCClient
147
+
148
+ Wrong:
149
+
150
+ ```ts
151
+ const client = createTRPCClient({ links: [httpBatchLink({ url })] });
152
+ ```
153
+
154
+ Correct:
155
+
156
+ ```ts
157
+ import type { AppRouter } from './server';
158
+
159
+ const client = createTRPCClient<AppRouter>({ links: [httpBatchLink({ url })] });
160
+ ```
161
+
162
+ Without the type parameter, all procedure calls return `any` and type safety is completely lost.
163
+
164
+ Source: www/docs/client/vanilla/setup.mdx
165
+
166
+ ### [CRITICAL] Transformer goes on individual links, not createTRPCClient
167
+
168
+ In v11, the `transformer` option is on individual terminating links, not the client constructor:
169
+
170
+ ```ts
171
+ import superjson from 'superjson';
172
+
173
+ createTRPCClient<AppRouter>({
174
+ links: [
175
+ httpBatchLink({
176
+ url: 'http://localhost:3000',
177
+ transformer: superjson,
178
+ }),
179
+ ],
180
+ });
181
+ ```
182
+
183
+ In v11, the `transformer` option was moved from the client constructor to individual terminating links. Passing it to `createTRPCClient` throws a TypeError.
184
+
185
+ Source: packages/client/src/internals/TRPCUntypedClient.ts
186
+
187
+ ### [CRITICAL] Transformer on server but not on client links
188
+
189
+ Wrong:
190
+
191
+ ```ts
192
+ // Server: initTRPC.create({ transformer: superjson })
193
+ // Client:
194
+ httpBatchLink({ url: 'http://localhost:3000' });
195
+ ```
196
+
197
+ Correct:
198
+
199
+ ```ts
200
+ // Server: initTRPC.create({ transformer: superjson })
201
+ // Client:
202
+ httpBatchLink({ url: 'http://localhost:3000', transformer: superjson });
203
+ ```
204
+
205
+ If the server uses a transformer, every terminating link on the client must also specify that transformer. Mismatch causes "Unable to transform response" errors.
206
+
207
+ Source: https://github.com/trpc/trpc/issues/7083
208
+
209
+ ### [CRITICAL] Using import instead of import type for AppRouter
210
+
211
+ Wrong:
212
+
213
+ ```ts
214
+ import { AppRouter } from '../server/router';
215
+ ```
216
+
217
+ Correct:
218
+
219
+ ```ts
220
+ import type { AppRouter } from '../server/router';
221
+ ```
222
+
223
+ A non-type import pulls the entire server bundle into the client. Use `import type` so it is erased at build time.
224
+
225
+ Source: www/docs/client/vanilla/setup.mdx
226
+
227
+ ### [CRITICAL] Importing appRouter value to derive type in client
228
+
229
+ Wrong:
230
+
231
+ ```ts
232
+ import { appRouter } from '../server/router';
233
+
234
+ type AppRouter = typeof appRouter;
235
+ ```
236
+
237
+ Correct:
238
+
239
+ ```ts
240
+ // In server: export type AppRouter = typeof appRouter;
241
+ // In client:
242
+ import type { AppRouter } from '../server/router';
243
+ ```
244
+
245
+ Importing the `appRouter` value (not just the type) bundles the entire server into the client, shipping server code to the browser.
246
+
247
+ Source: www/docs/server/routers.md
248
+
249
+ ### [CRITICAL] Using type assertions to bypass AppRouter import errors
250
+
251
+ Wrong:
252
+
253
+ ```ts
254
+ const client = createTRPCClient<any>({ links: [httpBatchLink({ url })] });
255
+ ```
256
+
257
+ Correct:
258
+
259
+ ```ts
260
+ // Fix the import path or monorepo configuration
261
+ import type { AppRouter } from '@myorg/api-types';
262
+
263
+ const client = createTRPCClient<AppRouter>({ links: [httpBatchLink({ url })] });
264
+ ```
265
+
266
+ Casting to `any` or manually recreating the router type destroys end-to-end type safety. Fix the import path or monorepo config instead.
267
+
268
+ Source: www/docs/client/vanilla/setup.mdx
269
+
270
+ ### [CRITICAL] Using createTRPCProxyClient (renamed in v11)
271
+
272
+ Wrong:
273
+
274
+ ```ts
275
+ import { createTRPCProxyClient } from '@trpc/client';
276
+ ```
277
+
278
+ Correct:
279
+
280
+ ```ts
281
+ import { createTRPCClient } from '@trpc/client';
282
+ ```
283
+
284
+ `createTRPCProxyClient` was renamed to `createTRPCClient` in v11.
285
+
286
+ Source: www/docs/client/vanilla/setup.mdx
287
+
288
+ ### [CRITICAL] Treating tRPC as a REST API
289
+
290
+ Wrong:
291
+
292
+ ```ts
293
+ fetch('/api/trpc/users/123', { method: 'GET' });
294
+ ```
295
+
296
+ Correct:
297
+
298
+ ```ts
299
+ const user = await client.user.byId.query({ id: '123' });
300
+ // Raw equivalent: GET /api/trpc/user.byId?input={"id":"123"}
301
+ ```
302
+
303
+ tRPC uses JSON-RPC over HTTP. Procedures are called by dot-separated name with JSON input, not by REST resource paths.
304
+
305
+ Source: www/docs/client/overview.md
306
+
307
+ ### [HIGH] HTML error page instead of JSON response
308
+
309
+ If you see `couldn't parse JSON, invalid character '<'`, the tRPC endpoint returned an HTML page (404/503) instead of JSON. This means the `url` in your link config is wrong or infrastructure routing is misconfigured -- it is not a tRPC bug. Verify the URL matches your adapter's mount point.
310
+
311
+ Source: www/docs/client/vanilla/setup.mdx
312
+
313
+ ## See Also
314
+
315
+ - `links` -- configure httpBatchLink, httpLink, splitLink, and other link types
316
+ - `superjson` -- set up SuperJSON transformer on server and client
317
+ - `server-setup` -- define routers, procedures, context, and export AppRouter type
318
+ - `react-query-setup` -- use tRPC with TanStack React Query for React applications