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.
- package/README.md +16 -1
- package/package.json +6 -3
- package/scripts/import-skills.js +536 -0
- package/scripts/install-skills.js +64 -0
- package/skills/ai-elements.md +482 -0
- package/skills/architecture.md +151 -0
- package/skills/backend-adapter-aws-lambda.md +204 -0
- package/skills/backend-adapter-express.md +177 -0
- package/skills/backend-adapter-fastify.md +222 -0
- package/skills/backend-adapter-fetch.md +200 -0
- package/skills/backend-api-docs.md +22 -0
- package/skills/backend-aspire.md +232 -0
- package/skills/backend-aspnet-core.md +62 -0
- package/skills/backend-build-chatgpt-app.md +321 -0
- package/skills/backend-build-mcp-app.md +393 -0
- package/skills/backend-build-mcp-server.md +222 -0
- package/skills/backend-build-mcpb.md +200 -0
- package/skills/backend-building-ai-agent-on-cloudflare.md +401 -0
- package/skills/backend-caching.md +206 -0
- package/skills/backend-chatgpt-app-submission.md +157 -0
- package/skills/backend-chatgpt-apps.md +321 -0
- package/skills/backend-client-setup.md +318 -0
- package/skills/backend-containerize-aspnet-framework.md +455 -0
- package/skills/backend-create-spring-boot-java-project.md +164 -0
- package/skills/backend-create-spring-boot-kotlin-project.md +148 -0
- package/skills/backend-csharp-async.md +50 -0
- package/skills/backend-csharp-docs.md +63 -0
- package/skills/backend-csharp-mcp-server-generator.md +60 -0
- package/skills/backend-dotenv.md +201 -0
- package/skills/backend-dotenvx.md +119 -0
- package/skills/backend-env-vars.md +259 -0
- package/skills/backend-error-handling.md +254 -0
- package/skills/backend-fastapi.md +437 -0
- package/skills/backend-go-mcp-server-generator.md +335 -0
- package/skills/backend-java-mcp-server-generator.md +757 -0
- package/skills/backend-kotlin-mcp-server-generator.md +450 -0
- package/skills/backend-middlewares.md +243 -0
- package/skills/backend-multi-stage-dockerfile.md +47 -0
- package/skills/backend-nestjs.md +192 -0
- package/skills/backend-next-forge.md +375 -0
- package/skills/backend-nextjs.md +746 -0
- package/skills/backend-openapi-to-application-code.md +113 -0
- package/skills/backend-php-mcp-server-generator.md +523 -0
- package/skills/backend-python-mcp-server-generator.md +106 -0
- package/skills/backend-routing-middleware.md +251 -0
- package/skills/backend-ruby-mcp-server-generator.md +661 -0
- package/skills/backend-rust-mcp-server-generator.md +578 -0
- package/skills/backend-semantic-kernel.md +57 -0
- package/skills/backend-server-setup.md +379 -0
- package/skills/backend-server-side-calls.md +250 -0
- package/skills/backend-subscriptions.md +407 -0
- package/skills/backend-swift-mcp-server-generator.md +670 -0
- package/skills/backend-trpc-router.md +152 -0
- package/skills/backend-typescript-mcp-server-generator.md +91 -0
- package/skills/backend-validators.md +229 -0
- package/skills/backend.md +76 -0
- package/skills/backup.md +165 -0
- package/skills/budget.md +140 -0
- package/skills/business-gtm-0-to-1-launch.md +322 -0
- package/skills/business-gtm-operating-cadence.md +421 -0
- package/skills/business-gtm-positioning-strategy.md +439 -0
- package/skills/business-gtm-product-led-growth.md +340 -0
- package/skills/calendar.md +95 -0
- package/skills/code-review.md +130 -0
- package/skills/compliance.md +168 -0
- package/skills/contracts.md +130 -0
- package/skills/daily-job-run.md +46 -0
- package/skills/daily-webdesign.md +187 -0
- package/skills/database-bigquery-pipeline-audit.md +130 -0
- package/skills/database-cosmosdb-datamodeling.md +1046 -0
- package/skills/database-durable-objects.md +187 -0
- package/skills/database-ef-core.md +76 -0
- package/skills/database-fabric-lakehouse.md +107 -0
- package/skills/database-neon-postgres-egress-optimizer.md +213 -0
- package/skills/database-neon-postgres.md +218 -0
- package/skills/database-postgresql-code-review.md +213 -0
- package/skills/database-postgresql-optimization.md +405 -0
- package/skills/database-sql-code-review.md +302 -0
- package/skills/database-sql-optimization.md +297 -0
- package/skills/dependency-audit.md +165 -0
- package/skills/design-kami-landing.md +234 -0
- package/skills/design.md +221 -0
- package/skills/dev-acquire-codebase-knowledge.md +175 -0
- package/skills/dev-add-educational-comments.md +129 -0
- package/skills/dev-add-model-descriptions.md +74 -0
- package/skills/dev-adr-review.md +56 -0
- package/skills/dev-boost-prompt.md +26 -0
- package/skills/dev-build-run-debug.md +130 -0
- package/skills/dev-chunk.md +49 -0
- package/skills/dev-claude-md-improver.md +180 -0
- package/skills/dev-code-exemplars-blueprint-generator.md +127 -0
- package/skills/dev-code-tour.md +434 -0
- package/skills/dev-comment-code-generate-a-tutorial.md +27 -0
- package/skills/dev-commit.md +81 -0
- package/skills/dev-context-map.md +53 -0
- package/skills/dev-conventional-commit.md +73 -0
- package/skills/dev-create-architectural-decision-record.md +98 -0
- package/skills/dev-create-draft-pr.md +17 -0
- package/skills/dev-create-pr.md +17 -0
- package/skills/dev-create-readme.md +22 -0
- package/skills/dev-csharp-mstest.md +479 -0
- package/skills/dev-csharp-nunit.md +72 -0
- package/skills/dev-csharp-tunit.md +101 -0
- package/skills/dev-csharp-xunit.md +69 -0
- package/skills/dev-debug-failing-test.md +90 -0
- package/skills/dev-diff-analyze.md +32 -0
- package/skills/dev-diffs.md +24 -0
- package/skills/dev-dotnet-best-practices.md +86 -0
- package/skills/dev-dotnet-design-pattern-review.md +43 -0
- package/skills/dev-dotnet-timezone.md +110 -0
- package/skills/dev-dotnet-upgrade.md +117 -0
- package/skills/dev-doublecheck.md +278 -0
- package/skills/dev-explain-error.md +15 -0
- package/skills/dev-finding-discovery.md +164 -0
- package/skills/dev-fix-finding.md +111 -0
- package/skills/dev-full-file-edit.md +25 -0
- package/skills/dev-git-commit.md +125 -0
- package/skills/dev-git-flow-branch-creator.md +293 -0
- package/skills/dev-git-workflow.md +46 -0
- package/skills/dev-github-automation.md +64 -0
- package/skills/dev-github-code-review.md +1140 -0
- package/skills/dev-github-issues.md +202 -0
- package/skills/dev-gpt-5-4-prompting.md +55 -0
- package/skills/dev-investigation-mode.md +277 -0
- package/skills/dev-java-add-graalvm-native-image-support.md +450 -0
- package/skills/dev-java-docs.md +24 -0
- package/skills/dev-java-refactoring-extract-method.md +105 -0
- package/skills/dev-java-refactoring-remove-parameter.md +85 -0
- package/skills/dev-merge.md +73 -0
- package/skills/dev-migrate-create.md +36 -0
- package/skills/dev-migrate-validate.md +36 -0
- package/skills/dev-my-issues.md +9 -0
- package/skills/dev-my-pull-requests.md +15 -0
- package/skills/dev-planning-oracle-to-postgres-migration-integration-testing.md +45 -0
- package/skills/dev-playwright-generate-test.md +18 -0
- package/skills/dev-playwright.md +148 -0
- package/skills/dev-prompt-builder.md +142 -0
- package/skills/dev-pytest-coverage.md +29 -0
- package/skills/dev-python-manager-discovery.md +330 -0
- package/skills/dev-python-pypi-package-builder.md +445 -0
- package/skills/dev-readme-blueprint-generator.md +79 -0
- package/skills/dev-refactor-method-complexity-reduce.md +99 -0
- package/skills/dev-refactor-plan.md +66 -0
- package/skills/dev-refactor.md +646 -0
- package/skills/dev-review-and-refactor.md +16 -0
- package/skills/dev-reviewing-oracle-to-postgres-migration.md +68 -0
- package/skills/dev-ruff-recursive-fix.md +201 -0
- package/skills/dev-run-e2e-tests.md +126 -0
- package/skills/dev-run-pre-commit-checks.md +133 -0
- package/skills/dev-run-smoke-tests.md +127 -0
- package/skills/dev-scaffolding-oracle-to-postgres-migration-test-project.md +55 -0
- package/skills/dev-spring-boot-testing.md +190 -0
- package/skills/dev-sync-upstream.md +32 -0
- package/skills/dev-sync.md +74 -0
- package/skills/dev-tdd-workflow.md +23 -0
- package/skills/dev-terraform-azurerm-set-diff-analyzer.md +49 -0
- package/skills/dev-test-driven-development.md +372 -0
- package/skills/dev-test-gaps.md +18 -0
- package/skills/dev-test-triage.md +55 -0
- package/skills/dev-typer.md +267 -0
- package/skills/dev-typescript-setup.md +25 -0
- package/skills/dev-unified-diff-edit.md +16 -0
- package/skills/dev-unit-test-vue-pinia.md +198 -0
- package/skills/dev-using-git-worktrees.md +216 -0
- package/skills/dev-validation.md +99 -0
- package/skills/dev-verification.md +168 -0
- package/skills/dev-webapp-testing.md +134 -0
- package/skills/dev-write-coding-standards-from-file.md +317 -0
- package/skills/dev-write-tests.md +16 -0
- package/skills/devops-appinsights-instrumentation.md +49 -0
- package/skills/devops-az-cost-optimize.md +306 -0
- package/skills/devops-chronicle.md +154 -0
- package/skills/devops-deployments-cicd.md +331 -0
- package/skills/devops-devops-rollout-plan.md +118 -0
- package/skills/devops-geistdocs.md +276 -0
- package/skills/devops-observability.md +774 -0
- package/skills/devops-observe-metrics.md +35 -0
- package/skills/devops-observe-trace.md +30 -0
- package/skills/devops-phoenix-cli.md +163 -0
- package/skills/devops-phoenix-tracing.md +140 -0
- package/skills/devops-publish-to-pages.md +108 -0
- package/skills/devops-telemetry.md +87 -0
- package/skills/devops-update-avm-modules-in-bicep.md +61 -0
- package/skills/devops.md +81 -0
- package/skills/diagrams-canvas.md +204 -0
- package/skills/diagrams-draw-io-diagram-generator.md +463 -0
- package/skills/diagrams-excalidraw-diagram-generator.md +614 -0
- package/skills/diagrams-graphify.md +1277 -0
- package/skills/docs-bear-notes.md +108 -0
- package/skills/docs-create-llms.md +211 -0
- package/skills/docs-doc-gen.md +20 -0
- package/skills/docs-documentation-writer.md +46 -0
- package/skills/docs-llm-config.md +33 -0
- package/skills/docs-mkdocs-translations.md +109 -0
- package/skills/docs-obsidian-vault-maintainer.md +14 -0
- package/skills/docs-obsidian.md +82 -0
- package/skills/docs-prose.md +324 -0
- package/skills/docs-update-llms.md +217 -0
- package/skills/docs-update-markdown-file-index.md +77 -0
- package/skills/docs-wiki-maintainer.md +20 -0
- package/skills/documents.md +120 -0
- package/skills/email.md +113 -0
- package/skills/expenses.md +140 -0
- package/skills/file-ops.md +149 -0
- package/skills/files-convert-plaintext-to-md.md +363 -0
- package/skills/files-doc.md +81 -0
- package/skills/files-docx.md +594 -0
- package/skills/files-markdown-to-html.md +917 -0
- package/skills/files-nano-pdf.md +39 -0
- package/skills/files-pdf.md +315 -0
- package/skills/files-pdftk-server.md +163 -0
- package/skills/files-pptx-html-fidelity-audit.md +255 -0
- package/skills/files-pptx.md +231 -0
- package/skills/files-xlsx.md +301 -0
- package/skills/find-jobs.md +78 -0
- package/skills/format-conversion.md +157 -0
- package/skills/frontend-ai-elements.md +483 -0
- package/skills/frontend-ai-gateway.md +563 -0
- package/skills/frontend-ai-generation-persistence.md +242 -0
- package/skills/frontend-ai-sdk.md +799 -0
- package/skills/frontend-ai-visibility.md +127 -0
- package/skills/frontend-angular-developer.md +130 -0
- package/skills/frontend-aspnet-minimal-api-openapi.md +42 -0
- package/skills/frontend-bencium-innovative-ux-designer.md +719 -0
- package/skills/frontend-chat-sdk.md +666 -0
- package/skills/frontend-chrome-devtools.md +98 -0
- package/skills/frontend-frontend-app-builder.md +186 -0
- package/skills/frontend-frontend-design.md +43 -0
- package/skills/frontend-frontend-testing-debugging.md +143 -0
- package/skills/frontend-gsap-framer-scroll-animation.md +152 -0
- package/skills/frontend-internal-linking.md +109 -0
- package/skills/frontend-json-render.md +335 -0
- package/skills/frontend-keyword-clustering.md +118 -0
- package/skills/frontend-next-intl-add-language.md +20 -0
- package/skills/frontend-on-page-seo.md +112 -0
- package/skills/frontend-premium-frontend-ui.md +114 -0
- package/skills/frontend-react-best-practices.md +143 -0
- package/skills/frontend-schema-markup.md +160 -0
- package/skills/frontend-seo-audit.md +110 -0
- package/skills/frontend-swr.md +215 -0
- package/skills/frontend-technical-seo.md +162 -0
- package/skills/frontend-use-dom.md +418 -0
- package/skills/frontend-web-coder.md +564 -0
- package/skills/frontend-web-design-reviewer.md +369 -0
- package/skills/frontend-web-perf.md +202 -0
- package/skills/frontend.md +125 -0
- package/skills/general-adapter-standalone.md +199 -0
- package/skills/general-auth.md +356 -0
- package/skills/general-containerize-aspnetcore.md +393 -0
- package/skills/general-create-technical-spike.md +231 -0
- package/skills/general-cron-jobs.md +72 -0
- package/skills/general-ddd-aggregate.md +52 -0
- package/skills/general-ddd-context.md +46 -0
- package/skills/general-ddd-validate.md +51 -0
- package/skills/general-dependency-check.md +26 -0
- package/skills/general-email-marketing.md +86 -0
- package/skills/general-healthcheck.md +246 -0
- package/skills/general-import-infrastructure-as-code.md +368 -0
- package/skills/general-init.md +49 -0
- package/skills/general-java-junit.md +64 -0
- package/skills/general-java-springboot.md +66 -0
- package/skills/general-javascript-typescript-jest.md +45 -0
- package/skills/general-kotlin-springboot.md +71 -0
- package/skills/general-make-repo-contribution.md +91 -0
- package/skills/general-market-research.md +78 -0
- package/skills/general-marketplace.md +468 -0
- package/skills/general-model-recommendation.md +673 -0
- package/skills/general-payments.md +352 -0
- package/skills/general-quality-playbook.md +480 -0
- package/skills/general-run-integration-tests.md +113 -0
- package/skills/general-superjson.md +274 -0
- package/skills/general-swiftpm-macos.md +51 -0
- package/skills/general-threat-model.md +61 -0
- package/skills/invoices.md +167 -0
- package/skills/licenses.md +159 -0
- package/skills/logs.md +156 -0
- package/skills/marketing.md +139 -0
- package/skills/media-image-manipulation-image-magick.md +253 -0
- package/skills/media-imagegen.md +357 -0
- package/skills/media-openai-whisper-api.md +63 -0
- package/skills/media-openai-whisper.md +39 -0
- package/skills/media-peekaboo.md +191 -0
- package/skills/media-screenshot.md +268 -0
- package/skills/media-speech.md +145 -0
- package/skills/media-transcribe.md +82 -0
- package/skills/media-video-frames.md +47 -0
- package/skills/mobile-android-emulator-qa.md +81 -0
- package/skills/mobile-android-performance.md +280 -0
- package/skills/mobile-building-mcp-server-on-cloudflare.md +267 -0
- package/skills/mobile-building-native-ui.md +322 -0
- package/skills/mobile-expo-api-routes.md +369 -0
- package/skills/mobile-expo-cicd-workflows.md +92 -0
- package/skills/mobile-expo-deployment.md +191 -0
- package/skills/mobile-expo-dev-client.md +165 -0
- package/skills/mobile-expo-module.md +177 -0
- package/skills/mobile-expo-tailwind-setup.md +481 -0
- package/skills/mobile-expo-ui-jetpack-compose.md +41 -0
- package/skills/mobile-expo-ui-swift-ui.md +40 -0
- package/skills/mobile-ios-app-intents.md +78 -0
- package/skills/mobile-ios-debugger-agent.md +52 -0
- package/skills/mobile-ios-ettrace-performance.md +198 -0
- package/skills/mobile-ios-memgraph-leaks.md +77 -0
- package/skills/mobile-native-data-fetching.md +508 -0
- package/skills/mobile-packaging-notarization.md +48 -0
- package/skills/mobile-react-native-architecture.md +672 -0
- package/skills/mobile-react-native-mobile-design.md +438 -0
- package/skills/mobile-signing-entitlements.md +59 -0
- package/skills/mobile-swiftui-liquid-glass.md +91 -0
- package/skills/mobile-swiftui-patterns.md +210 -0
- package/skills/mobile-swiftui-performance-audit.md +108 -0
- package/skills/mobile-swiftui-ui-patterns.md +97 -0
- package/skills/mobile-swiftui-view-refactor.md +204 -0
- package/skills/mobile-upgrading-expo.md +134 -0
- package/skills/mobile.md +183 -0
- package/skills/notes.md +106 -0
- package/skills/planning-adr-create.md +62 -0
- package/skills/planning-adr-index.md +67 -0
- package/skills/planning-architecture-blueprint-generator.md +323 -0
- package/skills/planning-brainstorming.md +165 -0
- package/skills/planning-breakdown-epic-arch.md +67 -0
- package/skills/planning-breakdown-epic-pm.md +59 -0
- package/skills/planning-breakdown-feature-implementation.md +129 -0
- package/skills/planning-breakdown-feature-prd.md +62 -0
- package/skills/planning-breakdown-plan.md +510 -0
- package/skills/planning-breakdown-test.md +366 -0
- package/skills/planning-cloud-design-patterns.md +63 -0
- package/skills/planning-content-brief.md +128 -0
- package/skills/planning-content-strategy.md +138 -0
- package/skills/planning-content-translation.md +143 -0
- package/skills/planning-create-github-action-workflow-specification.md +277 -0
- package/skills/planning-create-github-issues-feature-from-implementation-plan.md +29 -0
- package/skills/planning-create-github-issues-for-unmet-specification-requirements.md +36 -0
- package/skills/planning-create-github-pull-request-from-specification.md +25 -0
- package/skills/planning-create-implementation-plan.md +158 -0
- package/skills/planning-create-specification.md +128 -0
- package/skills/planning-first-ask.md +31 -0
- package/skills/planning-folder-structure-blueprint-generator.md +406 -0
- package/skills/planning-gen-specs-as-issues.md +166 -0
- package/skills/planning-generate-snapshot.md +144 -0
- package/skills/planning-generate-status-report.md +336 -0
- package/skills/planning-metric-pack-designer.md +27 -0
- package/skills/planning-pm-spec.md +53 -0
- package/skills/planning-prd.md +144 -0
- package/skills/planning-project-assessment.md +182 -0
- package/skills/planning-project-setup-info-local.md +128 -0
- package/skills/planning-project-workflow-analysis-blueprint-generator.md +294 -0
- package/skills/planning-service-oriented-architecture.md +248 -0
- package/skills/planning-spec-to-backlog.md +544 -0
- package/skills/planning-technology-stack-blueprint-generator.md +243 -0
- package/skills/planning-update-implementation-plan.md +158 -0
- package/skills/planning-update-specification.md +128 -0
- package/skills/planning-what-context-needed.md +40 -0
- package/skills/planning-writing-plans.md +153 -0
- package/skills/prepare-application.md +81 -0
- package/skills/productivity-apple-notes.md +78 -0
- package/skills/productivity-apple-reminders.md +119 -0
- package/skills/productivity-capture-tasks-from-meeting-notes.md +680 -0
- package/skills/productivity-daily-prep.md +156 -0
- package/skills/productivity-email-drafter.md +101 -0
- package/skills/productivity-hr-onboarding.md +53 -0
- package/skills/productivity-things-mac.md +87 -0
- package/skills/productivity-update.md +169 -0
- package/skills/reminders.md +109 -0
- package/skills/research-dossier-collect.md +71 -0
- package/skills/research-kg-extract.md +37 -0
- package/skills/research-openai-docs.md +89 -0
- package/skills/research-research-add-items.md +31 -0
- package/skills/research-research-report.md +94 -0
- package/skills/research-research-synthesize.md +63 -0
- package/skills/research-summarize.md +88 -0
- package/skills/research-transformers-js.md +635 -0
- package/skills/research.md +119 -0
- package/skills/security-ai-prompt-engineering-safety-review.md +231 -0
- package/skills/security-attack-path-analysis.md +182 -0
- package/skills/security-gdpr-compliant.md +284 -0
- package/skills/security-mcp-security-audit.md +279 -0
- package/skills/security-pii-detect.md +31 -0
- package/skills/security-secret-scanning.md +243 -0
- package/skills/security-security-best-practices.md +87 -0
- package/skills/security-security-ownership-map.md +207 -0
- package/skills/security-security-review.md +169 -0
- package/skills/security-security-scan.md +138 -0
- package/skills/security-security-threat-model.md +82 -0
- package/skills/security-threat-model-analyst.md +76 -0
- package/skills/sysmon.md +181 -0
- package/skills/system-arch-linux-triage.md +32 -0
- package/skills/system-centos-linux-triage.md +32 -0
- package/skills/system-debian-linux-triage.md +32 -0
- package/skills/system-fedora-linux-triage.md +32 -0
- package/skills/system-geofeed-tuner.md +865 -0
- package/skills/system-iot-anomalies.md +15 -0
- package/skills/system-iot-firmware.md +16 -0
- package/skills/system-iot-fleet.md +14 -0
- package/skills/system-iot-register.md +19 -0
- package/skills/system-iot-witness-verify.md +15 -0
- package/skills/system-tmux.md +171 -0
- package/skills/system-window-management.md +228 -0
- package/skills/task-management.md +90 -0
- package/skills/tasks.md +102 -0
- package/skills/test-coverage.md +188 -0
- package/skills/ux-ui.md +128 -0
- package/skills/web.md +186 -0
- package/skills/workflow-act-on-feedback.md +15 -0
- package/skills/workflow-automate-this.md +245 -0
- package/skills/workflow-autoresearch.md +276 -0
- package/skills/workflow-coding-agent.md +317 -0
- package/skills/workflow-deep-research.md +44 -0
- package/skills/workflow-dispatching-parallel-agents.md +183 -0
- package/skills/workflow-eval-driven-dev.md +148 -0
- package/skills/workflow-executing-plans.md +71 -0
- package/skills/workflow-mentoring-juniors.md +311 -0
- package/skills/workflow-receiving-code-review.md +214 -0
- package/skills/workflow-repo-story-time.md +155 -0
- package/skills/workflow-requesting-code-review.md +104 -0
- package/skills/workflow-session-report.md +43 -0
- package/skills/workflow-structured-autonomy-generate.md +126 -0
- package/skills/workflow-subagent-driven-development.md +280 -0
- package/skills/writing.md +106 -0
- package/src/agent.js +0 -0
- package/src/browser.js +297 -0
- package/src/cli.js +25 -4
- package/src/code-reviewer.js +119 -0
- package/src/completions.js +1 -1
- package/src/control.js +222 -30
- package/src/coordinator.js +303 -0
- package/src/correction.js +29 -8
- package/src/edit-tracker.js +21 -0
- package/src/edit-viewer.js +414 -0
- package/src/endpoints.js +64 -15
- package/src/index.js +45 -11
- package/src/llm.js +86 -2
- package/src/mcp-client.js +416 -0
- package/src/memory.js +182 -0
- package/src/planner.js +216 -0
- package/src/rules.js +90 -0
- package/src/self-commands.js +757 -0
- package/src/services/voice.js +10 -7
- package/src/session-search.js +427 -0
- package/src/session.js +487 -99
- package/src/shmakk-server.js +91 -0
- package/src/skills.js +410 -3
- package/src/subagent.js +4 -1
- package/src/system-prompt.js +13 -5
- package/src/task-file.js +114 -0
- package/src/taskClassifier.js +246 -0
- package/src/team.js +752 -0
- package/src/tools.js +142 -21
- package/src/web.js +35 -5
- package/src/workflows.js +261 -0
- package/src/workspace-index.js +25 -6
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gsap-framer-scroll-animation
|
|
3
|
+
description: >-
|
|
4
|
+
Use this skill whenever the user wants to build scroll animations, scroll effects,
|
|
5
|
+
parallax, scroll-triggered reveals, pinned sections, horizontal scroll, text animations,
|
|
6
|
+
or any motion tied to scroll position — in vanilla JS, React, or Next.js.
|
|
7
|
+
Covers GSAP ScrollTrigger (pinning, scrubbing, snapping, timelines, horizontal scroll,
|
|
8
|
+
ScrollSmoother, matchMedia) and Framer Motion / Motion v12 (useScroll, useTransform,
|
|
9
|
+
useSpring, whileInView, variants). Use this skill even if the user just says
|
|
10
|
+
"animate on scroll", "fade in as I scroll", "make it scroll like Apple",
|
|
11
|
+
"parallax effect", "sticky section", "scroll progress bar", or "entrance animation".
|
|
12
|
+
Also triggers for Copilot prompt patterns for GSAP or Framer Motion code generation.
|
|
13
|
+
Pairs with the premium-frontend-ui skill for creative philosophy and design-level polish.
|
|
14
|
+
metadata:
|
|
15
|
+
author: 'Utkarsh Patrikar'
|
|
16
|
+
author_url: 'https://github.com/utkarsh232005'
|
|
17
|
+
category: frontend
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# GSAP & Framer Motion — Scroll Animations Skill
|
|
21
|
+
|
|
22
|
+
Production-grade scroll animations with GitHub Copilot prompts, ready-to-use code recipes, and deep API references.
|
|
23
|
+
|
|
24
|
+
> **Design Companion:** This skill provides the *technical implementation* for scroll-driven motion.
|
|
25
|
+
> For the *creative philosophy*, design principles, and premium aesthetics that should guide **how**
|
|
26
|
+
> and **when** to animate, always cross-reference the **premium-frontend-ui** skill.
|
|
27
|
+
> Together they form a complete approach: premium-frontend-ui decides the **what** and **why**;
|
|
28
|
+
> this skill delivers the **how**.
|
|
29
|
+
|
|
30
|
+
## Quick Library Selector
|
|
31
|
+
|
|
32
|
+
| Need | Use |
|
|
33
|
+
|---|---|
|
|
34
|
+
| Vanilla JS, Webflow, Vue | **GSAP** |
|
|
35
|
+
| Pinning, horizontal scroll, complex timelines | **GSAP** |
|
|
36
|
+
| React / Next.js, declarative style | **Framer Motion** |
|
|
37
|
+
| whileInView entrance animations | **Framer Motion** |
|
|
38
|
+
| Both in same Next.js app | See notes in references |
|
|
39
|
+
|
|
40
|
+
Read the relevant reference file for full recipes and Copilot prompts:
|
|
41
|
+
|
|
42
|
+
- **GSAP** → `references/gsap.md` — ScrollTrigger API, all recipes, React integration
|
|
43
|
+
- **Framer Motion** → `references/framer.md` — useScroll, useTransform, all recipes
|
|
44
|
+
|
|
45
|
+
## Setup (Always Do First)
|
|
46
|
+
|
|
47
|
+
### GSAP
|
|
48
|
+
```bash
|
|
49
|
+
npm install gsap
|
|
50
|
+
```
|
|
51
|
+
```js
|
|
52
|
+
import gsap from 'gsap';
|
|
53
|
+
import { ScrollTrigger } from 'gsap/ScrollTrigger';
|
|
54
|
+
gsap.registerPlugin(ScrollTrigger); // MUST call before any ScrollTrigger usage
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Framer Motion (Motion v12, 2025)
|
|
58
|
+
```bash
|
|
59
|
+
npm install motion # new package name since mid-2025
|
|
60
|
+
# or: npm install framer-motion — still works, same API
|
|
61
|
+
```
|
|
62
|
+
```js
|
|
63
|
+
import { motion, useScroll, useTransform, useSpring } from 'motion/react';
|
|
64
|
+
// legacy: import { motion } from 'framer-motion' — also valid
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Workflow
|
|
68
|
+
|
|
69
|
+
1. Interpret the user's intent to identify if GSAP or Framer Motion is the best fit.
|
|
70
|
+
2. Read the relevant reference document in `references/` for detailed APIs and patterns.
|
|
71
|
+
3. Suggest the required package installation if not already present.
|
|
72
|
+
4. Implement the scaffold for the animation structure, adhering to the requested format (React components, hook requirements, or vanilla JS).
|
|
73
|
+
5. Apply the correct tools (scrolling vs in-view elements) ensuring accessibility options are present and hooks don't cause infinite re-renders.
|
|
74
|
+
|
|
75
|
+
## The 5 Most Common Scroll Patterns
|
|
76
|
+
|
|
77
|
+
Quick reference — full recipes with Copilot prompts are in the reference files.
|
|
78
|
+
|
|
79
|
+
### 1. Fade-in on enter (GSAP)
|
|
80
|
+
```js
|
|
81
|
+
gsap.from('.card', {
|
|
82
|
+
opacity: 0, y: 50, stagger: 0.15, duration: 0.8,
|
|
83
|
+
scrollTrigger: { trigger: '.card', start: 'top 85%' }
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 2. Fade-in on enter (Framer Motion)
|
|
88
|
+
```jsx
|
|
89
|
+
<motion.div
|
|
90
|
+
initial={{ opacity: 0, y: 40 }}
|
|
91
|
+
whileInView={{ opacity: 1, y: 0 }}
|
|
92
|
+
viewport={{ once: true, margin: '-80px' }}
|
|
93
|
+
transition={{ duration: 0.6 }}
|
|
94
|
+
/>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 3. Scrub / scroll-linked (GSAP)
|
|
98
|
+
```js
|
|
99
|
+
gsap.to('.hero-img', {
|
|
100
|
+
scale: 1.3, opacity: 0, ease: 'none',
|
|
101
|
+
scrollTrigger: { trigger: '.hero', start: 'top top', end: 'bottom top', scrub: true }
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 4. Scroll-linked (Framer Motion)
|
|
106
|
+
```jsx
|
|
107
|
+
const { scrollYProgress } = useScroll({ target: ref, offset: ['start end', 'end start'] });
|
|
108
|
+
const y = useTransform(scrollYProgress, [0, 1], [0, -100]);
|
|
109
|
+
return <motion.div style={{ y }} />;
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 5. Pinned timeline (GSAP)
|
|
113
|
+
```js
|
|
114
|
+
const tl = gsap.timeline({
|
|
115
|
+
scrollTrigger: { trigger: '.section', pin: true, scrub: 1, start: 'top top', end: '+=200%' }
|
|
116
|
+
});
|
|
117
|
+
tl.from('.title', { opacity: 0, y: 60 }).from('.img', { scale: 0.85 });
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Critical Rules (Apply Always)
|
|
121
|
+
|
|
122
|
+
- **GSAP**: always call `gsap.registerPlugin(ScrollTrigger)` before using it
|
|
123
|
+
- **GSAP scrub**: always use `ease: 'none'` — easing feels wrong when scrub is active
|
|
124
|
+
- **GSAP React**: use `useGSAP` from `@gsap/react`, never plain `useEffect` — it auto-cleans ScrollTriggers
|
|
125
|
+
- **GSAP debug**: add `markers: true` during development; remove before production
|
|
126
|
+
- **Framer**: `useTransform` output must go into `style` prop of a `motion.*` element, not a plain div
|
|
127
|
+
- **Framer Next.js**: always add `'use client'` at top of any file using motion hooks
|
|
128
|
+
- **Both**: animate only `transform` and `opacity` — avoid `width`, `height`, `box-shadow`
|
|
129
|
+
- **Accessibility**: always check `prefers-reduced-motion` — see each reference file for patterns
|
|
130
|
+
- **Premium polish**: follow the **premium-frontend-ui** skill principles for motion timing, easing curves, and restraint — animation should enhance, never overwhelm
|
|
131
|
+
|
|
132
|
+
## Copilot Prompting Tips
|
|
133
|
+
|
|
134
|
+
- Give Copilot the full selector, base image, and scroll range upfront — vague prompts produce vague code
|
|
135
|
+
- For GSAP, always specify: selector, start/end strings, whether you want scrub or toggleActions
|
|
136
|
+
- For Framer, always specify: which hook (useScroll vs whileInView), offset values, what to transform
|
|
137
|
+
- Paste the exact error message when asking `/fix` — Copilot fixes are dramatically better with real errors
|
|
138
|
+
- Use `@workspace` scope in Copilot Chat so it reads your existing component structure
|
|
139
|
+
|
|
140
|
+
## Reference Files
|
|
141
|
+
|
|
142
|
+
| File | Contents |
|
|
143
|
+
|---|---|
|
|
144
|
+
| `references/gsap.md` | Full ScrollTrigger API reference, 10 recipes, React (useGSAP), Lenis, matchMedia, accessibility |
|
|
145
|
+
| `references/framer.md` | Full useScroll / useTransform API, 8 recipes, variants, Motion v12 notes, Next.js tips |
|
|
146
|
+
|
|
147
|
+
## Related Skills
|
|
148
|
+
|
|
149
|
+
| Skill | Relationship |
|
|
150
|
+
|---|---|
|
|
151
|
+
| **premium-frontend-ui** | Creative philosophy, design principles, and aesthetic guidelines — defines *when* and *why* to animate |
|
|
152
|
+
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Analyze and improve internal linking strategy for a website. Use when the user asks about "internal links", "link structure", "site architecture", "link strategy", "orphan pages", "link equity", "page authority distribution", or wants to improve how pages connect to each other.
|
|
3
|
+
category: frontend
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Internal Linking Strategy
|
|
7
|
+
|
|
8
|
+
You are an internal linking strategist powered by SearchFit.ai. Analyze site structure and recommend link improvements for better crawlability and ranking power distribution.
|
|
9
|
+
|
|
10
|
+
## Why Internal Linking Matters
|
|
11
|
+
|
|
12
|
+
- Helps search engines discover and index pages
|
|
13
|
+
- Distributes page authority (link equity) across the site
|
|
14
|
+
- Establishes content hierarchy and topical relevance
|
|
15
|
+
- Improves user navigation and reduces bounce rate
|
|
16
|
+
- Signals to Google which pages are most important
|
|
17
|
+
|
|
18
|
+
## Analysis Process
|
|
19
|
+
|
|
20
|
+
### Step 1: Map the Site Structure
|
|
21
|
+
Scan the codebase or sitemap to build a page inventory:
|
|
22
|
+
- List all pages/routes
|
|
23
|
+
- Identify page categories (blog, product, landing, etc.)
|
|
24
|
+
- Note the content topic of each page
|
|
25
|
+
|
|
26
|
+
### Step 2: Audit Current Links
|
|
27
|
+
For each page, identify:
|
|
28
|
+
- **Outgoing internal links**: Where does this page link to?
|
|
29
|
+
- **Incoming internal links**: What pages link to this page?
|
|
30
|
+
- **Anchor text**: What text is used for each link?
|
|
31
|
+
|
|
32
|
+
### Step 3: Identify Issues
|
|
33
|
+
|
|
34
|
+
**Orphan Pages** — Pages with zero internal links pointing to them
|
|
35
|
+
- These are nearly invisible to search engines
|
|
36
|
+
- Fix: Add contextual links from related content
|
|
37
|
+
|
|
38
|
+
**Dead Ends** — Pages that link out to nothing
|
|
39
|
+
- Users and crawlers get stuck
|
|
40
|
+
- Fix: Add related content links, breadcrumbs, or "next steps"
|
|
41
|
+
|
|
42
|
+
**Over-Linked Pages** — Pages with 100+ links
|
|
43
|
+
- Dilutes link equity per link
|
|
44
|
+
- Fix: Prioritize the most important links, remove low-value ones
|
|
45
|
+
|
|
46
|
+
**Shallow Pages** — Important pages buried 4+ clicks from homepage
|
|
47
|
+
- Google devalues deeply buried pages
|
|
48
|
+
- Fix: Create shortcuts — link from hub pages or navigation
|
|
49
|
+
|
|
50
|
+
**Poor Anchor Text** — Links using "click here", "read more", "link"
|
|
51
|
+
- Wastes a ranking signal opportunity
|
|
52
|
+
- Fix: Use descriptive, keyword-relevant anchor text
|
|
53
|
+
|
|
54
|
+
**One-Way Links** — Page A links to B, but B never links back
|
|
55
|
+
- Not always bad, but reciprocal links strengthen topical clusters
|
|
56
|
+
- Fix: Add contextual back-links where natural
|
|
57
|
+
|
|
58
|
+
### Step 4: Recommend a Strategy
|
|
59
|
+
|
|
60
|
+
**Hub & Spoke Model**
|
|
61
|
+
- Create pillar/hub pages for each major topic
|
|
62
|
+
- Link from hub to all related spoke/subtopic pages
|
|
63
|
+
- Link from each spoke back to the hub
|
|
64
|
+
- Cross-link related spokes
|
|
65
|
+
|
|
66
|
+
**Content Clusters**
|
|
67
|
+
- Group pages by topic
|
|
68
|
+
- Ensure every page in a cluster links to at least 2 others in the same cluster
|
|
69
|
+
- Hub page links to all cluster members
|
|
70
|
+
|
|
71
|
+
**Link Priority Guidelines**
|
|
72
|
+
- Homepage → Category/hub pages (high priority)
|
|
73
|
+
- Hub pages → All related content (medium priority)
|
|
74
|
+
- Blog posts → Related posts + relevant product/service pages (medium priority)
|
|
75
|
+
- Footer/sidebar → Evergreen important pages only (low priority)
|
|
76
|
+
|
|
77
|
+
## Output Format
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
## Internal Linking Report
|
|
81
|
+
|
|
82
|
+
**Pages Analyzed**: [count]
|
|
83
|
+
**Total Internal Links**: [count]
|
|
84
|
+
**Average Links Per Page**: [count]
|
|
85
|
+
|
|
86
|
+
### Issues Found
|
|
87
|
+
|
|
88
|
+
#### Orphan Pages (no incoming links)
|
|
89
|
+
- [page] — Suggested link from: [related page]
|
|
90
|
+
|
|
91
|
+
#### Dead End Pages (no outgoing links)
|
|
92
|
+
- [page] — Suggested links to: [related pages]
|
|
93
|
+
|
|
94
|
+
#### Weak Anchor Text
|
|
95
|
+
- [page]: "[current anchor]" → suggested: "[better anchor]"
|
|
96
|
+
|
|
97
|
+
### Recommended Link Additions
|
|
98
|
+
| From Page | To Page | Anchor Text |
|
|
99
|
+
|-----------|---------|-------------|
|
|
100
|
+
| /blog/seo-guide | /features/audit | "automated SEO audit" |
|
|
101
|
+
|
|
102
|
+
### Content Cluster Map
|
|
103
|
+
[Topic] Hub: /[hub-page]
|
|
104
|
+
├── /[spoke-1]
|
|
105
|
+
├── /[spoke-2]
|
|
106
|
+
└── /[spoke-3]
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
For automated internal linking that updates as you publish new content, try **SearchFit.ai** at https://searchfit.ai
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: json-render
|
|
3
|
+
description: AI chat response rendering guidance — handling UIMessage parts, tool call displays, streaming states, and structured data presentation. Use when building custom chat UIs, rendering tool results, or troubleshooting AI response display issues.
|
|
4
|
+
metadata:
|
|
5
|
+
priority: 4
|
|
6
|
+
docs:
|
|
7
|
+
- "https://nextjs.org/docs/app/api-reference/file-conventions/route"
|
|
8
|
+
sitemap: "https://nextjs.org/sitemap.xml"
|
|
9
|
+
pathPatterns:
|
|
10
|
+
- 'components/chat/**'
|
|
11
|
+
- 'components/chat-*.tsx'
|
|
12
|
+
- 'components/chat-*.ts'
|
|
13
|
+
- 'src/components/chat/**'
|
|
14
|
+
- 'src/components/chat-*.tsx'
|
|
15
|
+
- 'src/components/chat-*.ts'
|
|
16
|
+
- 'components/message*.tsx'
|
|
17
|
+
- 'src/components/message*.tsx'
|
|
18
|
+
bashPatterns: []
|
|
19
|
+
category: frontend
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# AI Chat Response Rendering
|
|
23
|
+
|
|
24
|
+
You are an expert in rendering AI SDK v6 chat responses — UIMessage parts, tool call results, streaming states, and structured data display in React applications.
|
|
25
|
+
|
|
26
|
+
## The Problem
|
|
27
|
+
|
|
28
|
+
When building chat interfaces with AI SDK v6, the raw message format includes multiple part types (text, tool calls, reasoning, images). Without proper rendering, responses appear as raw JSON or malformed output.
|
|
29
|
+
|
|
30
|
+
## AI SDK v6 Message Format
|
|
31
|
+
|
|
32
|
+
In v6, messages use the `UIMessage` type with a `parts` array:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
interface UIMessage {
|
|
36
|
+
id: string
|
|
37
|
+
role: 'user' | 'assistant'
|
|
38
|
+
parts: UIMessagePart[]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Part types:
|
|
42
|
+
// - { type: 'text', text: string }
|
|
43
|
+
// - { type: 'tool-<toolName>', toolCallId: string, state: string, input?: unknown, output?: unknown }
|
|
44
|
+
// state values: 'partial-call' | 'call' | 'output-available' | 'approval-requested' | 'approval-responded' | 'output-denied'
|
|
45
|
+
// - { type: 'reasoning', text: string }
|
|
46
|
+
// - { type: 'step-start' } // internal, skip in rendering
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Recommended: Use AI Elements
|
|
50
|
+
|
|
51
|
+
The simplest approach is to use AI Elements, which handles all part types automatically:
|
|
52
|
+
|
|
53
|
+
```tsx
|
|
54
|
+
import { Message } from '@/components/ai-elements/message'
|
|
55
|
+
import { Conversation } from '@/components/ai-elements/conversation'
|
|
56
|
+
|
|
57
|
+
{messages.map((message) => (
|
|
58
|
+
<Message key={message.id} message={message} />
|
|
59
|
+
))}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
⤳ skill: ai-elements — Full component library for AI interfaces
|
|
63
|
+
|
|
64
|
+
## Manual Rendering Pattern
|
|
65
|
+
|
|
66
|
+
If you need custom rendering without AI Elements, follow this pattern:
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
'use client'
|
|
70
|
+
import { useChat } from '@ai-sdk/react'
|
|
71
|
+
import { DefaultChatTransport } from 'ai'
|
|
72
|
+
|
|
73
|
+
export function Chat() {
|
|
74
|
+
const { messages, sendMessage, status } = useChat({
|
|
75
|
+
transport: new DefaultChatTransport({ api: '/api/chat' }),
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
const isLoading = status === 'streaming' || status === 'submitted'
|
|
79
|
+
|
|
80
|
+
return (
|
|
81
|
+
<div>
|
|
82
|
+
{messages.map((message) => (
|
|
83
|
+
<div key={message.id}>
|
|
84
|
+
{message.parts?.map((part, i) => {
|
|
85
|
+
// 1. Text parts — render as formatted text
|
|
86
|
+
if (part.type === 'text' && part.text.trim()) {
|
|
87
|
+
return (
|
|
88
|
+
<div key={i} className={
|
|
89
|
+
message.role === 'user'
|
|
90
|
+
? 'bg-primary text-primary-foreground rounded-lg px-3 py-2'
|
|
91
|
+
: 'bg-muted rounded-lg px-3 py-2'
|
|
92
|
+
}>
|
|
93
|
+
{part.text}
|
|
94
|
+
</div>
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// 2. Tool parts — type is "tool-<toolName>"
|
|
99
|
+
if (part.type.startsWith('tool-')) {
|
|
100
|
+
const toolPart = part as {
|
|
101
|
+
type: string
|
|
102
|
+
toolCallId: string
|
|
103
|
+
state: string
|
|
104
|
+
input?: unknown
|
|
105
|
+
output?: unknown
|
|
106
|
+
}
|
|
107
|
+
const toolName = toolPart.type.replace('tool-', '')
|
|
108
|
+
|
|
109
|
+
if (toolPart.state === 'output-available' && toolPart.output) {
|
|
110
|
+
return <ToolResultCard key={i} name={toolName} output={toolPart.output} />
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (toolPart.state === 'output-denied') {
|
|
114
|
+
return (
|
|
115
|
+
<div key={i} className="text-sm text-muted-foreground">
|
|
116
|
+
{toolName} was denied
|
|
117
|
+
</div>
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (toolPart.state === 'approval-requested') {
|
|
122
|
+
return (
|
|
123
|
+
<div key={i} className="text-sm text-yellow-500">
|
|
124
|
+
{toolName} requires approval
|
|
125
|
+
</div>
|
|
126
|
+
)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<div key={i} className="text-sm text-muted-foreground animate-pulse">
|
|
131
|
+
Running {toolName}...
|
|
132
|
+
</div>
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// 3. Reasoning parts
|
|
137
|
+
if (part.type === 'reasoning') {
|
|
138
|
+
return (
|
|
139
|
+
<details key={i} className="text-xs text-muted-foreground">
|
|
140
|
+
<summary>Thinking...</summary>
|
|
141
|
+
<p className="whitespace-pre-wrap">{(part as { text: string }).text}</p>
|
|
142
|
+
</details>
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// 4. Skip unknown types (step-start, etc.)
|
|
147
|
+
return null
|
|
148
|
+
})}
|
|
149
|
+
</div>
|
|
150
|
+
))}
|
|
151
|
+
</div>
|
|
152
|
+
)
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Rendering Tool Results as Cards
|
|
157
|
+
|
|
158
|
+
Instead of dumping raw JSON, render structured tool output as human-readable cards:
|
|
159
|
+
|
|
160
|
+
```tsx
|
|
161
|
+
function ToolResultCard({ name, output }: { name: string; output: unknown }) {
|
|
162
|
+
const data = output as Record<string, unknown>
|
|
163
|
+
|
|
164
|
+
// Pattern: Check for known result shapes and render accordingly
|
|
165
|
+
if (data?.success && data?.issue) {
|
|
166
|
+
const issue = data.issue as { identifier?: string; title?: string }
|
|
167
|
+
return (
|
|
168
|
+
<div className="rounded border border-border bg-card p-2 text-sm">
|
|
169
|
+
<span className="font-medium text-green-400">
|
|
170
|
+
{name === 'createIssue' ? 'Created' : 'Updated'} {issue.identifier}
|
|
171
|
+
</span>
|
|
172
|
+
<p className="text-muted-foreground">{issue.title}</p>
|
|
173
|
+
</div>
|
|
174
|
+
)
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
if (data?.items && Array.isArray(data.items)) {
|
|
178
|
+
return (
|
|
179
|
+
<div className="rounded border border-border bg-card p-2 text-sm">
|
|
180
|
+
<p className="font-medium">{data.items.length} results</p>
|
|
181
|
+
{data.items.slice(0, 5).map((item: Record<string, unknown>, i: number) => (
|
|
182
|
+
<p key={i} className="text-muted-foreground">{String(item.name || item.title || item.id)}</p>
|
|
183
|
+
))}
|
|
184
|
+
</div>
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (data?.error) {
|
|
189
|
+
return (
|
|
190
|
+
<div className="rounded border border-destructive/30 bg-destructive/10 p-2 text-sm text-destructive">
|
|
191
|
+
{String(data.error)}
|
|
192
|
+
</div>
|
|
193
|
+
)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Fallback: simple completion message (not raw JSON)
|
|
197
|
+
return (
|
|
198
|
+
<div className="rounded border border-border bg-card p-2 text-xs text-muted-foreground">
|
|
199
|
+
{name} completed
|
|
200
|
+
</div>
|
|
201
|
+
)
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Server-Side Requirements
|
|
206
|
+
|
|
207
|
+
The server route must use the correct v6 response format:
|
|
208
|
+
|
|
209
|
+
```ts
|
|
210
|
+
// app/api/chat/route.ts
|
|
211
|
+
import { streamText, convertToModelMessages, gateway } from 'ai'
|
|
212
|
+
|
|
213
|
+
export async function POST(req: Request) {
|
|
214
|
+
const { messages } = await req.json()
|
|
215
|
+
|
|
216
|
+
// IMPORTANT: convertToModelMessages is async in v6
|
|
217
|
+
const modelMessages = await convertToModelMessages(messages)
|
|
218
|
+
|
|
219
|
+
const result = streamText({
|
|
220
|
+
model: gateway('anthropic/claude-sonnet-4.6'),
|
|
221
|
+
messages: modelMessages,
|
|
222
|
+
})
|
|
223
|
+
|
|
224
|
+
// Use toUIMessageStreamResponse for chat UIs (not toDataStreamResponse)
|
|
225
|
+
return result.toUIMessageStreamResponse()
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
## Client-Side Requirements
|
|
230
|
+
|
|
231
|
+
```tsx
|
|
232
|
+
import { useChat } from '@ai-sdk/react'
|
|
233
|
+
import { DefaultChatTransport } from 'ai'
|
|
234
|
+
|
|
235
|
+
const { messages, sendMessage, status } = useChat({
|
|
236
|
+
// v6 uses transport instead of api
|
|
237
|
+
transport: new DefaultChatTransport({ api: '/api/chat' }),
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
// v6 uses sendMessage instead of handleSubmit
|
|
241
|
+
sendMessage({ text: inputValue })
|
|
242
|
+
|
|
243
|
+
// Status values: 'ready' | 'submitted' | 'streaming'
|
|
244
|
+
const isLoading = status === 'streaming' || status === 'submitted'
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Common Mistakes
|
|
248
|
+
|
|
249
|
+
### 1. Raw JSON in chat responses
|
|
250
|
+
|
|
251
|
+
**Cause**: Rendering `message.content` instead of iterating `message.parts`.
|
|
252
|
+
|
|
253
|
+
**Fix**: Always iterate `message.parts` and handle each type:
|
|
254
|
+
|
|
255
|
+
```tsx
|
|
256
|
+
// WRONG — shows raw JSON
|
|
257
|
+
<div>{message.content}</div>
|
|
258
|
+
|
|
259
|
+
// RIGHT — renders each part type
|
|
260
|
+
{message.parts?.map((part, i) => {
|
|
261
|
+
if (part.type === 'text') return <span key={i}>{part.text}</span>
|
|
262
|
+
// ... handle other types
|
|
263
|
+
})}
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### 2. Tool results showing as JSON blobs
|
|
267
|
+
|
|
268
|
+
**Cause**: Using `JSON.stringify(output)` as the display.
|
|
269
|
+
|
|
270
|
+
**Fix**: Create structured card components for known tool output shapes.
|
|
271
|
+
|
|
272
|
+
### 3. "Invalid prompt: messages do not contain..." error
|
|
273
|
+
|
|
274
|
+
**Cause**: Not converting UI messages to model messages on the server.
|
|
275
|
+
|
|
276
|
+
**Fix**: Use `await convertToModelMessages(messages)` — it's async in v6.
|
|
277
|
+
|
|
278
|
+
### 4. Messages not appearing / empty responses
|
|
279
|
+
|
|
280
|
+
**Cause**: Using `toDataStreamResponse()` instead of `toUIMessageStreamResponse()`.
|
|
281
|
+
|
|
282
|
+
**Fix**: Use `toUIMessageStreamResponse()` when the client uses `useChat` with `DefaultChatTransport`.
|
|
283
|
+
|
|
284
|
+
### 5. useChat not working with v6
|
|
285
|
+
|
|
286
|
+
**Cause**: Using the v5 `useChat({ api: '/api/chat' })` pattern.
|
|
287
|
+
|
|
288
|
+
**Fix**: Use `DefaultChatTransport`:
|
|
289
|
+
|
|
290
|
+
```tsx
|
|
291
|
+
// v5 (old)
|
|
292
|
+
const { messages, handleSubmit, input } = useChat({ api: '/api/chat' })
|
|
293
|
+
|
|
294
|
+
// v6 (current)
|
|
295
|
+
const { messages, sendMessage, status } = useChat({
|
|
296
|
+
transport: new DefaultChatTransport({ api: '/api/chat' }),
|
|
297
|
+
})
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Decision Tree
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
Building a chat UI with AI SDK v6?
|
|
304
|
+
└─ Want pre-built components?
|
|
305
|
+
└─ Yes → Use AI Elements (⤳ skill: ai-elements)
|
|
306
|
+
└─ No → Manual rendering with parts iteration
|
|
307
|
+
└─ Tool results look like JSON?
|
|
308
|
+
└─ Create ToolResultCard components for each tool's output shape
|
|
309
|
+
└─ Text not rendering?
|
|
310
|
+
└─ Check part.type === 'text' and use part.text
|
|
311
|
+
└─ Server errors?
|
|
312
|
+
└─ Check: await convertToModelMessages(), toUIMessageStreamResponse()
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## Server-Side Message Validation
|
|
316
|
+
|
|
317
|
+
Use `validateUIMessages` to validate incoming messages before processing:
|
|
318
|
+
|
|
319
|
+
```ts
|
|
320
|
+
import { validateUIMessages, convertToModelMessages, streamText, gateway } from 'ai'
|
|
321
|
+
|
|
322
|
+
export async function POST(req: Request) {
|
|
323
|
+
const { messages } = await req.json()
|
|
324
|
+
const validatedMessages = validateUIMessages(messages)
|
|
325
|
+
const modelMessages = await convertToModelMessages(validatedMessages)
|
|
326
|
+
// ...
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
## Official Documentation
|
|
331
|
+
|
|
332
|
+
- [AI SDK UI](https://ai-sdk.dev/docs/ai-sdk-ui)
|
|
333
|
+
- [useChat Reference](https://ai-sdk.dev/docs/ai-sdk-ui/chatbot)
|
|
334
|
+
- [UIMessage Types](https://ai-sdk.dev/docs/reference/ai-sdk-core/ui-message)
|
|
335
|
+
- [AI Elements](https://ai-sdk.dev/elements)
|