opencode-agent-kit 1.0.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 +796 -0
- package/bin/commands/init.mjs +221 -0
- package/bin/init.mjs +21 -0
- package/package.json +22 -0
- package/template/.opencode/agent-docs/backend/README.md +0 -0
- package/template/.opencode/agent-docs/backend/node/BACKEND_PATTERNS.md +82 -0
- package/template/.opencode/agent-docs/backend/node/BACKEND_QUICK_START.md +49 -0
- package/template/.opencode/agent-docs/frontend/next/README.md +0 -0
- package/template/.opencode/agent-docs/frontend/nuxt/API_PATTERNS.md +807 -0
- package/template/.opencode/agent-docs/frontend/nuxt/CHEATSHEET.md +676 -0
- package/template/.opencode/agent-docs/frontend/nuxt/COMPLETION_REPORT.md +613 -0
- package/template/.opencode/agent-docs/frontend/nuxt/EXAMPLES.md +956 -0
- package/template/.opencode/agent-docs/frontend/nuxt/INDEX.md +596 -0
- package/template/.opencode/agent-docs/frontend/nuxt/MCP_GUIDE.md +881 -0
- package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_CURRICULUM_30_DAYS.md +256 -0
- package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_CURRICULUM_CHECKLIST.md +156 -0
- package/template/.opencode/agent-docs/frontend/nuxt/MENTOR_WEEKLY_ASSIGNMENTS.md +191 -0
- package/template/.opencode/agent-docs/frontend/nuxt/QUICK_START.md +509 -0
- package/template/.opencode/agent-docs/frontend/nuxt/README.md +506 -0
- package/template/.opencode/agent-docs/frontend/nuxt/README_AGENTS.md +140 -0
- package/template/.opencode/agent-docs/frontend/nuxt/README_DOCS.md +65 -0
- package/template/.opencode/agent-docs/frontend/nuxt/SUMMARY.md +474 -0
- package/template/.opencode/agent-docs/frontend/nuxt/TEAM_OPERATING_GUIDE.md +54 -0
- package/template/.opencode/agent-docs/frontend/nuxt/TESTING_GUIDE.md +904 -0
- package/template/.opencode/agent-docs/frontend/nuxt/WORKFLOWS.md +758 -0
- package/template/.opencode/agent-docs/frontend/react/API_PATTERNS.md +187 -0
- package/template/.opencode/agent-docs/frontend/react/CHEATSHEET.md +87 -0
- package/template/.opencode/agent-docs/frontend/react/INDEX.md +45 -0
- package/template/.opencode/agent-docs/frontend/react/QUICK_START.md +43 -0
- package/template/.opencode/agent-docs/frontend/react/README.md +159 -0
- package/template/.opencode/agent-docs/frontend/vue/README.md +0 -0
- package/template/.opencode/agent-docs/mobile/android/README.md +45 -0
- package/template/.opencode/agent-docs/mobile/flutter/README.md +44 -0
- package/template/.opencode/agents/android-developer.md +418 -0
- package/template/.opencode/agents/code-igniter-3-fullstack.md +345 -0
- package/template/.opencode/agents/code-reviewer.md +517 -0
- package/template/.opencode/agents/database-specialist.md +455 -0
- package/template/.opencode/agents/devops-specialist.md +562 -0
- package/template/.opencode/agents/flutter-developer.md +556 -0
- package/template/.opencode/agents/it-leader.md +911 -0
- package/template/.opencode/agents/laravel-advanced.md +691 -0
- package/template/.opencode/agents/node-backend-developer.md +343 -0
- package/template/.opencode/agents/nuxt-frontend-developer-mentor.md +402 -0
- package/template/.opencode/agents/nuxt-frontend-developer.md +1573 -0
- package/template/.opencode/agents/react-frontend-developer.md +1017 -0
- package/template/.opencode/agents/seo-specialist.md +681 -0
- package/template/.opencode/agents/ui-ux-designer.md +783 -0
- package/template/.opencode/commands/android-build/command.md +25 -0
- package/template/.opencode/commands/android-test/command.md +23 -0
- package/template/.opencode/commands/build-fix.md +29 -0
- package/template/.opencode/commands/checkpoint.md +74 -0
- package/template/.opencode/commands/code-review.md +40 -0
- package/template/.opencode/commands/e2e.md +363 -0
- package/template/.opencode/commands/eval.md +120 -0
- package/template/.opencode/commands/evolve.md +193 -0
- package/template/.opencode/commands/flutter-build/command.md +25 -0
- package/template/.opencode/commands/flutter-test/command.md +24 -0
- package/template/.opencode/commands/go-build.md +183 -0
- package/template/.opencode/commands/go-review.md +148 -0
- package/template/.opencode/commands/go-test.md +268 -0
- package/template/.opencode/commands/gpc-release/command.md +30 -0
- package/template/.opencode/commands/instinct-export.md +91 -0
- package/template/.opencode/commands/instinct-import.md +142 -0
- package/template/.opencode/commands/instinct-status.md +86 -0
- package/template/.opencode/commands/learn.md +70 -0
- package/template/.opencode/commands/multi-backend.md +158 -0
- package/template/.opencode/commands/multi-execute.md +310 -0
- package/template/.opencode/commands/multi-frontend.md +158 -0
- package/template/.opencode/commands/multi-plan.md +261 -0
- package/template/.opencode/commands/multi-workflow.md +183 -0
- package/template/.opencode/commands/orchestrate.md +172 -0
- package/template/.opencode/commands/plan.md +113 -0
- package/template/.opencode/commands/pm2.md +271 -0
- package/template/.opencode/commands/python-review.md +297 -0
- package/template/.opencode/commands/refactor-clean.md +28 -0
- package/template/.opencode/commands/sessions.md +305 -0
- package/template/.opencode/commands/setup-pm.md +80 -0
- package/template/.opencode/commands/skill-create.md +174 -0
- package/template/.opencode/commands/tdd.md +326 -0
- package/template/.opencode/commands/test-coverage.md +27 -0
- package/template/.opencode/commands/update-codemaps.md +17 -0
- package/template/.opencode/commands/update-docs.md +31 -0
- package/template/.opencode/commands/verify.md +59 -0
- package/template/.opencode/config.example.json +309 -0
- package/template/.opencode/config.json +341 -0
- package/template/.opencode/contexts/dev.md +20 -0
- package/template/.opencode/contexts/research.md +26 -0
- package/template/.opencode/contexts/review.md +22 -0
- package/template/.opencode/hooks/hooks.json +169 -0
- package/template/.opencode/instructions/INSTRUCTIONS.md +388 -0
- package/template/.opencode/package.json +5 -0
- package/template/.opencode/rules/README.md +82 -0
- package/template/.opencode/rules/android/gradle.md +62 -0
- package/template/.opencode/rules/android/testing.md +27 -0
- package/template/.opencode/rules/common/agents.md +49 -0
- package/template/.opencode/rules/common/coding-style.md +48 -0
- package/template/.opencode/rules/common/git-workflow.md +45 -0
- package/template/.opencode/rules/common/hooks.md +30 -0
- package/template/.opencode/rules/common/patterns.md +31 -0
- package/template/.opencode/rules/common/performance.md +55 -0
- package/template/.opencode/rules/common/security.md +29 -0
- package/template/.opencode/rules/common/testing.md +29 -0
- package/template/.opencode/rules/flutter/state-management.md +57 -0
- package/template/.opencode/rules/flutter/testing.md +42 -0
- package/template/.opencode/rules/golang/coding-style.md +26 -0
- package/template/.opencode/rules/golang/hooks.md +11 -0
- package/template/.opencode/rules/golang/patterns.md +39 -0
- package/template/.opencode/rules/golang/security.md +28 -0
- package/template/.opencode/rules/golang/testing.md +25 -0
- package/template/.opencode/rules/mobile/performance.md +36 -0
- package/template/.opencode/rules/python/coding-style.md +37 -0
- package/template/.opencode/rules/python/hooks.md +14 -0
- package/template/.opencode/rules/python/patterns.md +34 -0
- package/template/.opencode/rules/python/security.md +25 -0
- package/template/.opencode/rules/python/testing.md +33 -0
- package/template/.opencode/rules/typescript/coding-style.md +58 -0
- package/template/.opencode/rules/typescript/hooks.md +15 -0
- package/template/.opencode/rules/typescript/patterns.md +45 -0
- package/template/.opencode/rules/typescript/security.md +21 -0
- package/template/.opencode/rules/typescript/testing.md +11 -0
- package/template/.opencode/skills/api-documentation/SKILL.md +188 -0
- package/template/.opencode/skills/backend-patterns/SKILL.md +587 -0
- package/template/.opencode/skills/building-components/SKILL.md +37 -0
- package/template/.opencode/skills/building-components/references/accessibility.mdx +819 -0
- package/template/.opencode/skills/building-components/references/as-child.mdx +324 -0
- package/template/.opencode/skills/building-components/references/composition.mdx +239 -0
- package/template/.opencode/skills/building-components/references/data-attributes.mdx +413 -0
- package/template/.opencode/skills/building-components/references/definitions.mdx +258 -0
- package/template/.opencode/skills/building-components/references/design-tokens.mdx +57 -0
- package/template/.opencode/skills/building-components/references/docs.mdx +155 -0
- package/template/.opencode/skills/building-components/references/marketplaces.mdx +144 -0
- package/template/.opencode/skills/building-components/references/npm.mdx +166 -0
- package/template/.opencode/skills/building-components/references/polymorphism.mdx +583 -0
- package/template/.opencode/skills/building-components/references/principles.mdx +61 -0
- package/template/.opencode/skills/building-components/references/registry.mdx +169 -0
- package/template/.opencode/skills/building-components/references/state.mdx +99 -0
- package/template/.opencode/skills/building-components/references/styling.mdx +286 -0
- package/template/.opencode/skills/building-components/references/types.mdx +191 -0
- package/template/.opencode/skills/clickhouse-io/SKILL.md +429 -0
- package/template/.opencode/skills/coding-standards/SKILL.md +520 -0
- package/template/.opencode/skills/configure-ecc/SKILL.md +298 -0
- package/template/.opencode/skills/continuous-learning/SKILL.md +110 -0
- package/template/.opencode/skills/continuous-learning/config.json +18 -0
- package/template/.opencode/skills/continuous-learning/evaluate-session.sh +60 -0
- package/template/.opencode/skills/continuous-learning-v2/SKILL.md +284 -0
- package/template/.opencode/skills/continuous-learning-v2/agents/observer.md +137 -0
- package/template/.opencode/skills/continuous-learning-v2/agents/start-observer.sh +134 -0
- package/template/.opencode/skills/continuous-learning-v2/config.json +41 -0
- package/template/.opencode/skills/continuous-learning-v2/hooks/observe.sh +153 -0
- package/template/.opencode/skills/continuous-learning-v2/scripts/instinct-cli.py +489 -0
- package/template/.opencode/skills/continuous-learning-v2/scripts/test_parse_instinct.py +82 -0
- package/template/.opencode/skills/dart-add-unit-test/SKILL.md +122 -0
- package/template/.opencode/skills/dart-build-cli-app/SKILL.md +185 -0
- package/template/.opencode/skills/dart-collect-coverage/SKILL.md +141 -0
- package/template/.opencode/skills/dart-fix-runtime-errors/SKILL.md +166 -0
- package/template/.opencode/skills/dart-generate-test-mocks/SKILL.md +155 -0
- package/template/.opencode/skills/dart-migrate-to-checks-package/SKILL.md +126 -0
- package/template/.opencode/skills/dart-resolve-package-conflicts/SKILL.md +116 -0
- package/template/.opencode/skills/dart-run-static-analysis/SKILL.md +104 -0
- package/template/.opencode/skills/dart-use-pattern-matching/SKILL.md +146 -0
- package/template/.opencode/skills/django-patterns/SKILL.md +733 -0
- package/template/.opencode/skills/django-security/SKILL.md +592 -0
- package/template/.opencode/skills/django-tdd/SKILL.md +728 -0
- package/template/.opencode/skills/django-verification/SKILL.md +460 -0
- package/template/.opencode/skills/eval-harness/SKILL.md +227 -0
- package/template/.opencode/skills/firebase-basics/SKILL.md +103 -0
- package/template/.opencode/skills/firebase-basics/references/additional-skills.md +113 -0
- package/template/.opencode/skills/firebase-basics/references/cli-usage.md +31 -0
- package/template/.opencode/skills/firebase-basics/references/client-library-usage.md +45 -0
- package/template/.opencode/skills/firebase-basics/references/core-concepts.md +61 -0
- package/template/.opencode/skills/firebase-basics/references/iac-usage.md +40 -0
- package/template/.opencode/skills/firebase-basics/references/iam-security.md +74 -0
- package/template/.opencode/skills/firebase-basics/references/mcp-usage.md +63 -0
- package/template/.opencode/skills/flutter/SKILL.md +292 -0
- package/template/.opencode/skills/flutter-add-integration-test/SKILL.md +163 -0
- package/template/.opencode/skills/flutter-add-widget-preview/SKILL.md +145 -0
- package/template/.opencode/skills/flutter-add-widget-test/SKILL.md +154 -0
- package/template/.opencode/skills/flutter-apply-architecture-best-practices/SKILL.md +162 -0
- package/template/.opencode/skills/flutter-build-responsive-layout/SKILL.md +139 -0
- package/template/.opencode/skills/flutter-fix-layout-issues/SKILL.md +130 -0
- package/template/.opencode/skills/flutter-implement-json-serialization/SKILL.md +153 -0
- package/template/.opencode/skills/flutter-setup-declarative-routing/SKILL.md +255 -0
- package/template/.opencode/skills/flutter-setup-localization/SKILL.md +210 -0
- package/template/.opencode/skills/flutter-use-http-package/SKILL.md +174 -0
- package/template/.opencode/skills/frontend-design/SKILL.md +89 -0
- package/template/.opencode/skills/frontend-patterns/SKILL.md +631 -0
- package/template/.opencode/skills/golang-patterns/SKILL.md +673 -0
- package/template/.opencode/skills/golang-testing/SKILL.md +719 -0
- package/template/.opencode/skills/impeccable/SKILL.md +165 -0
- package/template/.opencode/skills/impeccable/agents/impeccable-asset-producer.md +101 -0
- package/template/.opencode/skills/impeccable/reference/adapt.md +190 -0
- package/template/.opencode/skills/impeccable/reference/animate.md +175 -0
- package/template/.opencode/skills/impeccable/reference/audit.md +133 -0
- package/template/.opencode/skills/impeccable/reference/bolder.md +113 -0
- package/template/.opencode/skills/impeccable/reference/brand.md +118 -0
- package/template/.opencode/skills/impeccable/reference/clarify.md +174 -0
- package/template/.opencode/skills/impeccable/reference/codex.md +105 -0
- package/template/.opencode/skills/impeccable/reference/cognitive-load.md +106 -0
- package/template/.opencode/skills/impeccable/reference/color-and-contrast.md +105 -0
- package/template/.opencode/skills/impeccable/reference/colorize.md +154 -0
- package/template/.opencode/skills/impeccable/reference/craft.md +123 -0
- package/template/.opencode/skills/impeccable/reference/critique.md +273 -0
- package/template/.opencode/skills/impeccable/reference/delight.md +302 -0
- package/template/.opencode/skills/impeccable/reference/distill.md +111 -0
- package/template/.opencode/skills/impeccable/reference/document.md +427 -0
- package/template/.opencode/skills/impeccable/reference/extract.md +69 -0
- package/template/.opencode/skills/impeccable/reference/harden.md +347 -0
- package/template/.opencode/skills/impeccable/reference/heuristics-scoring.md +234 -0
- package/template/.opencode/skills/impeccable/reference/interaction-design.md +195 -0
- package/template/.opencode/skills/impeccable/reference/layout.md +141 -0
- package/template/.opencode/skills/impeccable/reference/live.md +622 -0
- package/template/.opencode/skills/impeccable/reference/motion-design.md +109 -0
- package/template/.opencode/skills/impeccable/reference/onboard.md +234 -0
- package/template/.opencode/skills/impeccable/reference/optimize.md +258 -0
- package/template/.opencode/skills/impeccable/reference/overdrive.md +130 -0
- package/template/.opencode/skills/impeccable/reference/personas.md +179 -0
- package/template/.opencode/skills/impeccable/reference/polish.md +242 -0
- package/template/.opencode/skills/impeccable/reference/product.md +62 -0
- package/template/.opencode/skills/impeccable/reference/quieter.md +99 -0
- package/template/.opencode/skills/impeccable/reference/responsive-design.md +114 -0
- package/template/.opencode/skills/impeccable/reference/shape.md +165 -0
- package/template/.opencode/skills/impeccable/reference/spatial-design.md +100 -0
- package/template/.opencode/skills/impeccable/reference/teach.md +156 -0
- package/template/.opencode/skills/impeccable/reference/typeset.md +124 -0
- package/template/.opencode/skills/impeccable/reference/typography.md +159 -0
- package/template/.opencode/skills/impeccable/reference/ux-writing.md +107 -0
- package/template/.opencode/skills/impeccable/scripts/cleanup-deprecated.mjs +284 -0
- package/template/.opencode/skills/impeccable/scripts/command-metadata.json +94 -0
- package/template/.opencode/skills/impeccable/scripts/critique-storage.mjs +242 -0
- package/template/.opencode/skills/impeccable/scripts/design-parser.mjs +820 -0
- package/template/.opencode/skills/impeccable/scripts/detect-csp.mjs +198 -0
- package/template/.opencode/skills/impeccable/scripts/detect.mjs +21 -0
- package/template/.opencode/skills/impeccable/scripts/impeccable-paths.mjs +110 -0
- package/template/.opencode/skills/impeccable/scripts/is-generated.mjs +69 -0
- package/template/.opencode/skills/impeccable/scripts/live-accept.mjs +595 -0
- package/template/.opencode/skills/impeccable/scripts/live-browser-session.js +123 -0
- package/template/.opencode/skills/impeccable/scripts/live-browser.js +4860 -0
- package/template/.opencode/skills/impeccable/scripts/live-complete.mjs +75 -0
- package/template/.opencode/skills/impeccable/scripts/live-completion.mjs +18 -0
- package/template/.opencode/skills/impeccable/scripts/live-inject.mjs +446 -0
- package/template/.opencode/skills/impeccable/scripts/live-poll.mjs +200 -0
- package/template/.opencode/skills/impeccable/scripts/live-resume.mjs +48 -0
- package/template/.opencode/skills/impeccable/scripts/live-server.mjs +838 -0
- package/template/.opencode/skills/impeccable/scripts/live-session-store.mjs +254 -0
- package/template/.opencode/skills/impeccable/scripts/live-status.mjs +47 -0
- package/template/.opencode/skills/impeccable/scripts/live-wrap.mjs +632 -0
- package/template/.opencode/skills/impeccable/scripts/live.mjs +247 -0
- package/template/.opencode/skills/impeccable/scripts/load-context.mjs +141 -0
- package/template/.opencode/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/template/.opencode/skills/impeccable/scripts/pin.mjs +214 -0
- package/template/.opencode/skills/iterative-retrieval/SKILL.md +202 -0
- package/template/.opencode/skills/java-coding-standards/SKILL.md +138 -0
- package/template/.opencode/skills/jetpack-compose/.skillfish.json +10 -0
- package/template/.opencode/skills/jetpack-compose/SKILL.md +420 -0
- package/template/.opencode/skills/jpa-patterns/SKILL.md +141 -0
- package/template/.opencode/skills/nutrient-document-processing/SKILL.md +165 -0
- package/template/.opencode/skills/nuxt-ui/SKILL.md +334 -0
- package/template/.opencode/skills/nuxt-ui/references/components.md +377 -0
- package/template/.opencode/skills/nuxt-ui/references/composables.md +127 -0
- package/template/.opencode/skills/nuxt-ui/references/layouts/chat.md +266 -0
- package/template/.opencode/skills/nuxt-ui/references/layouts/dashboard.md +220 -0
- package/template/.opencode/skills/nuxt-ui/references/layouts/docs.md +141 -0
- package/template/.opencode/skills/nuxt-ui/references/layouts/editor.md +168 -0
- package/template/.opencode/skills/nuxt-ui/references/layouts/page.md +260 -0
- package/template/.opencode/skills/nuxt-ui/references/theming.md +427 -0
- package/template/.opencode/skills/postgres-patterns/SKILL.md +146 -0
- package/template/.opencode/skills/project-guidelines-example/SKILL.md +345 -0
- package/template/.opencode/skills/python-patterns/SKILL.md +749 -0
- package/template/.opencode/skills/python-testing/SKILL.md +815 -0
- package/template/.opencode/skills/security-review/SKILL.md +494 -0
- package/template/.opencode/skills/security-review/cloud-infrastructure-security.md +361 -0
- package/template/.opencode/skills/shadcn-ui/README.md +248 -0
- package/template/.opencode/skills/shadcn-ui/SKILL.md +326 -0
- package/template/.opencode/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
- package/template/.opencode/skills/shadcn-ui/examples/data-table.tsx +313 -0
- package/template/.opencode/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
- package/template/.opencode/skills/shadcn-ui/resources/component-catalog.md +481 -0
- package/template/.opencode/skills/shadcn-ui/resources/customization-guide.md +516 -0
- package/template/.opencode/skills/shadcn-ui/resources/migration-guide.md +463 -0
- package/template/.opencode/skills/shadcn-ui/resources/setup-guide.md +412 -0
- package/template/.opencode/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
- package/template/.opencode/skills/springboot-patterns/SKILL.md +304 -0
- package/template/.opencode/skills/springboot-security/SKILL.md +119 -0
- package/template/.opencode/skills/springboot-tdd/SKILL.md +157 -0
- package/template/.opencode/skills/springboot-verification/SKILL.md +100 -0
- package/template/.opencode/skills/strategic-compact/SKILL.md +63 -0
- package/template/.opencode/skills/strategic-compact/suggest-compact.sh +52 -0
- package/template/.opencode/skills/tdd-workflow/SKILL.md +409 -0
- package/template/.opencode/skills/vercel-composition-patterns/AGENTS.md +946 -0
- package/template/.opencode/skills/vercel-composition-patterns/SKILL.md +89 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/architecture-avoid-boolean-props.md +100 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/architecture-compound-components.md +112 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/patterns-children-over-render-props.md +87 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/patterns-explicit-variants.md +100 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/react19-no-forwardref.md +42 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/state-context-interface.md +191 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/state-decouple-implementation.md +113 -0
- package/template/.opencode/skills/vercel-composition-patterns/rules/state-lift-state.md +125 -0
- package/template/.opencode/skills/vercel-react-best-practices/AGENTS.md +2934 -0
- package/template/.opencode/skills/vercel-react-best-practices/SKILL.md +136 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-init-once.md +42 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/advanced-use-latest.md +39 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/async-api-routes.md +38 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/async-defer-await.md +80 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/async-dependencies.md +51 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/async-parallel.md +28 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-conditional.md +31 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/bundle-preload.md +50 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/client-event-listeners.md +74 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/client-localstorage-schema.md +71 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/client-passive-event-listeners.md +48 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/client-swr-dedup.md +56 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-batch-dom-css.md +107 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-function-results.md +80 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-property-access.md +28 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-cache-storage.md +70 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-combine-iterations.md +32 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-early-exit.md +50 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-index-maps.md +37 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-length-check-first.md +49 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-min-max-loop.md +82 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-activity.md +26 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-hydration-suppress-warning.md +30 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rendering-usetransition-loading.md +75 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-dependencies.md +45 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-derived-state.md +29 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-memo-with-default-value.md +38 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-memo.md +44 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-transitions.md +40 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-auth-actions.md +96 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-cache-lru.md +41 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-cache-react.md +76 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-dedup-props.md +65 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-parallel-fetching.md +83 -0
- package/template/.opencode/skills/vercel-react-best-practices/rules/server-serialization.md +38 -0
- package/template/.opencode/skills/verification-loop/SKILL.md +120 -0
- package/template/.opencode/skills/web-design-guidelines/SKILL.md +39 -0
- package/template/AGENTS.md +32 -0
- package/template/opencode.json +354 -0
|
@@ -0,0 +1,881 @@
|
|
|
1
|
+
# 🔌 MCP Integration Guide - Frontend Developer Agent
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) integration untuk Frontend Developer Agent dengan fokus pada Nuxt.js stack.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 📋 Table of Contents
|
|
8
|
+
|
|
9
|
+
1. [What is MCP?](#what-is-mcp)
|
|
10
|
+
2. [Available MCP Servers](#available-mcp-servers)
|
|
11
|
+
3. [Usage Examples](#usage-examples)
|
|
12
|
+
4. [Best Practices](#best-practices)
|
|
13
|
+
5. [Troubleshooting](#troubleshooting)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## What is MCP?
|
|
18
|
+
|
|
19
|
+
**Model Context Protocol (MCP)** adalah standar protocol yang memungkinkan AI assistants mengakses external data sources dan tools secara terstruktur.
|
|
20
|
+
|
|
21
|
+
### Benefits
|
|
22
|
+
|
|
23
|
+
✅ **Accurate Information** - Langsung dari official docs, bukan hallucination
|
|
24
|
+
✅ **Always Updated** - Selalu menggunakan latest docs
|
|
25
|
+
✅ **Tool Integration** - Browser automation, design file access
|
|
26
|
+
✅ **Structured Data** - JSON responses yang konsisten
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Available MCP Servers
|
|
31
|
+
|
|
32
|
+
Project ini menggunakan **4 MCP servers**:
|
|
33
|
+
|
|
34
|
+
### 1. 🟢 Nuxt MCP (Always Active)
|
|
35
|
+
|
|
36
|
+
**URL**: `https://nuxt.com/mcp`
|
|
37
|
+
**Status**: ✅ Active
|
|
38
|
+
**Permission**: Allow
|
|
39
|
+
|
|
40
|
+
#### Purpose
|
|
41
|
+
|
|
42
|
+
Official Nuxt.js documentation, blog posts, deployment guides, dan migration help.
|
|
43
|
+
|
|
44
|
+
#### Available Tools
|
|
45
|
+
|
|
46
|
+
| Tool | Description | Example Use |
|
|
47
|
+
| --------------------------- | ----------------------- | ---------------------------- |
|
|
48
|
+
| `list_documentation_pages` | Browse all Nuxt docs | Get overview of v4 features |
|
|
49
|
+
| `get_documentation_page` | Get specific doc page | Fetch useFetch documentation |
|
|
50
|
+
| `get_getting_started_guide` | Quick start guide | New to Nuxt setup |
|
|
51
|
+
| `list_blog_posts` | Browse blog posts | Find release notes |
|
|
52
|
+
| `get_blog_post` | Get blog content | Read Nuxt 4 announcement |
|
|
53
|
+
| `list_deploy_providers` | List hosting options | See deployment options |
|
|
54
|
+
| `get_deploy_provider` | Deployment instructions | Get Vercel setup guide |
|
|
55
|
+
|
|
56
|
+
#### Available Prompts
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
find_documentation_for_topic # Find best docs for a topic
|
|
60
|
+
deployment_guide # Get deployment instructions
|
|
61
|
+
migration_help # Nuxt version migration
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
#### When to Use
|
|
65
|
+
|
|
66
|
+
- ✅ Looking up Nuxt 4 features or APIs
|
|
67
|
+
- ✅ Understanding composables (`useFetch`, `useRoute`, `useState`)
|
|
68
|
+
- ✅ SSR/SSG implementation patterns
|
|
69
|
+
- ✅ Auto-imports and directory structure
|
|
70
|
+
- ✅ Deployment configuration
|
|
71
|
+
- ✅ Migration from Nuxt 3 to Nuxt 4
|
|
72
|
+
- ✅ Server API routes and Nitro
|
|
73
|
+
|
|
74
|
+
#### Example Queries
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
User: "How does useFetch work in Nuxt 4?"
|
|
78
|
+
Agent:
|
|
79
|
+
1. Use Nuxt MCP: get_documentation_page for "useFetch"
|
|
80
|
+
2. Read official API documentation
|
|
81
|
+
3. Explain with accurate examples
|
|
82
|
+
4. Implement using official patterns
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
User: "Show me file-based routing in Nuxt 4"
|
|
87
|
+
Agent:
|
|
88
|
+
1. Use Nuxt MCP: find_documentation_for_topic("routing")
|
|
89
|
+
2. Get pages directory documentation
|
|
90
|
+
3. Explain with examples (index.vue, [id].vue, etc.)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
### 2. 🟢 Nuxt UI MCP (Always Active)
|
|
96
|
+
|
|
97
|
+
**URL**: `https://ui.nuxt.com/mcp`
|
|
98
|
+
**Status**: ✅ Active
|
|
99
|
+
**Permission**: Allow
|
|
100
|
+
|
|
101
|
+
#### Purpose
|
|
102
|
+
|
|
103
|
+
Complete Nuxt UI component library documentation dan examples.
|
|
104
|
+
|
|
105
|
+
#### Available Resources
|
|
106
|
+
|
|
107
|
+
**Form Components**:
|
|
108
|
+
|
|
109
|
+
- `UForm` - Form wrapper dengan validation
|
|
110
|
+
- `UFormGroup` - Form field group dengan label
|
|
111
|
+
- `UInput` - Text input
|
|
112
|
+
- `UTextarea` - Multi-line text
|
|
113
|
+
- `USelect` - Dropdown select
|
|
114
|
+
- `USelectMenu` - Advanced select dengan search
|
|
115
|
+
- `UCheckbox` - Checkbox input
|
|
116
|
+
- `URadio` - Radio button
|
|
117
|
+
- `URadioGroup` - Radio group
|
|
118
|
+
- `UToggle` - Toggle switch
|
|
119
|
+
- `URangeSlider` - Range slider
|
|
120
|
+
|
|
121
|
+
**Button Components**:
|
|
122
|
+
|
|
123
|
+
- `UButton` - Button dengan variants
|
|
124
|
+
- `UButtonGroup` - Button group
|
|
125
|
+
|
|
126
|
+
**Layout Components**:
|
|
127
|
+
|
|
128
|
+
- `UCard` - Card container dengan slots
|
|
129
|
+
- `UContainer` - Max-width container
|
|
130
|
+
- `UDivider` - Horizontal/vertical divider
|
|
131
|
+
- `UPage` - Page wrapper
|
|
132
|
+
- `UPageHeader` - Page header
|
|
133
|
+
- `UPageBody` - Page body
|
|
134
|
+
- `UPageGrid` - Page grid layout
|
|
135
|
+
|
|
136
|
+
**Navigation Components**:
|
|
137
|
+
|
|
138
|
+
- `UDropdown` - Dropdown menu
|
|
139
|
+
- `UCommandPalette` - Command palette (⌘K)
|
|
140
|
+
- `UTabs` - Tabs navigation
|
|
141
|
+
- `UBreadcrumb` - Breadcrumb navigation
|
|
142
|
+
- `UVerticalNavigation` - Sidebar navigation
|
|
143
|
+
- `UHorizontalNavigation` - Horizontal nav
|
|
144
|
+
- `UPagination` - Pagination
|
|
145
|
+
|
|
146
|
+
**Feedback Components**:
|
|
147
|
+
|
|
148
|
+
- `UNotification` - Toast notifications
|
|
149
|
+
- `UNotifications` - Notification container
|
|
150
|
+
- `UModal` - Modal dialog
|
|
151
|
+
- `USlideover` - Slide-over panel
|
|
152
|
+
- `UAlert` - Alert messages
|
|
153
|
+
- `UProgress` - Progress bar
|
|
154
|
+
- `USkeleton` - Loading skeleton
|
|
155
|
+
|
|
156
|
+
**Data Display**:
|
|
157
|
+
|
|
158
|
+
- `UTable` - Data table
|
|
159
|
+
- `UBadge` - Badge/tag
|
|
160
|
+
- `UAvatar` - Avatar image
|
|
161
|
+
- `UAvatarGroup` - Avatar group
|
|
162
|
+
- `UMeter` - Meter/progress
|
|
163
|
+
- `UKbd` - Keyboard shortcut
|
|
164
|
+
|
|
165
|
+
**And More**: Check Nuxt UI MCP for complete list!
|
|
166
|
+
|
|
167
|
+
#### When to Use
|
|
168
|
+
|
|
169
|
+
- ✅ Building ANY UI component (check Nuxt UI first!)
|
|
170
|
+
- ✅ Implementing forms with validation
|
|
171
|
+
- ✅ Creating modals, dropdowns, notifications
|
|
172
|
+
- ✅ Data tables and lists
|
|
173
|
+
- ✅ Navigation (tabs, breadcrumbs, pagination)
|
|
174
|
+
- ✅ Dark mode implementation
|
|
175
|
+
- ✅ Theme customization
|
|
176
|
+
- ✅ Icons and typography
|
|
177
|
+
|
|
178
|
+
#### Example Queries
|
|
179
|
+
|
|
180
|
+
```
|
|
181
|
+
User: "Create a form for market creation"
|
|
182
|
+
Agent:
|
|
183
|
+
1. Check Nuxt UI MCP for form components
|
|
184
|
+
2. Find: UForm, UFormGroup, UInput, UTextarea, UButton
|
|
185
|
+
3. Get props and usage examples
|
|
186
|
+
4. Implement using Nuxt UI components
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
User: "Add a notification when market is created"
|
|
191
|
+
Agent:
|
|
192
|
+
1. Check Nuxt UI MCP for UNotification
|
|
193
|
+
2. Learn usage: useToast() composable
|
|
194
|
+
3. Implement toast notification
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
### 3. 🟢 Playwright MCP (Always Active)
|
|
200
|
+
|
|
201
|
+
**Command**: `npx @modelcontextprotocol/server-playwright`
|
|
202
|
+
**Status**: ✅ Active
|
|
203
|
+
**Permission**: Allow
|
|
204
|
+
|
|
205
|
+
#### Purpose
|
|
206
|
+
|
|
207
|
+
Browser automation dan E2E testing dengan Playwright.
|
|
208
|
+
|
|
209
|
+
#### Available Capabilities
|
|
210
|
+
|
|
211
|
+
**Browser Automation**:
|
|
212
|
+
|
|
213
|
+
- Navigate to pages
|
|
214
|
+
- Click elements
|
|
215
|
+
- Fill forms
|
|
216
|
+
- Select dropdowns
|
|
217
|
+
- Upload files
|
|
218
|
+
- Take screenshots
|
|
219
|
+
- Record videos
|
|
220
|
+
|
|
221
|
+
**Testing Features**:
|
|
222
|
+
|
|
223
|
+
- Assertions (expect API)
|
|
224
|
+
- Network interception
|
|
225
|
+
- Mock API responses
|
|
226
|
+
- Wait for elements
|
|
227
|
+
- Auto-waiting
|
|
228
|
+
- Retry assertions
|
|
229
|
+
|
|
230
|
+
**Performance**:
|
|
231
|
+
|
|
232
|
+
- Measure load times
|
|
233
|
+
- Core Web Vitals (LCP, FID, CLS)
|
|
234
|
+
- Network performance
|
|
235
|
+
- JavaScript execution time
|
|
236
|
+
|
|
237
|
+
**Accessibility**:
|
|
238
|
+
|
|
239
|
+
- ARIA role testing
|
|
240
|
+
- Keyboard navigation
|
|
241
|
+
- Screen reader compatibility
|
|
242
|
+
- Color contrast
|
|
243
|
+
|
|
244
|
+
#### When to Use
|
|
245
|
+
|
|
246
|
+
- ✅ Writing E2E tests for critical user flows
|
|
247
|
+
- ✅ Testing form submissions
|
|
248
|
+
- ✅ Verifying navigation and routing
|
|
249
|
+
- ✅ Visual regression testing
|
|
250
|
+
- ✅ Performance measurement
|
|
251
|
+
- ✅ Accessibility audits
|
|
252
|
+
- ✅ Integration testing
|
|
253
|
+
|
|
254
|
+
#### Example Usage
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
// E2E Test: Create Market Flow
|
|
258
|
+
import { test, expect } from '@playwright/test'
|
|
259
|
+
|
|
260
|
+
test('user can create new market', async ({ page }) => {
|
|
261
|
+
// Navigate
|
|
262
|
+
await page.goto('/markets/create')
|
|
263
|
+
|
|
264
|
+
// Fill form
|
|
265
|
+
await page.fill('[name="title"]', 'Bitcoin Price 2024')
|
|
266
|
+
await page.fill('[name="description"]', 'Will Bitcoin reach $100k?')
|
|
267
|
+
await page.selectOption('[name="category"]', 'crypto')
|
|
268
|
+
|
|
269
|
+
// Submit
|
|
270
|
+
await page.click('button[type="submit"]')
|
|
271
|
+
|
|
272
|
+
// Verify success
|
|
273
|
+
await expect(page).toHaveURL(/\/markets\/\d+/)
|
|
274
|
+
await expect(page.locator('h1')).toContainText('Bitcoin Price 2024')
|
|
275
|
+
})
|
|
276
|
+
|
|
277
|
+
// Visual Regression Test
|
|
278
|
+
test('market card renders correctly', async ({ page }) => {
|
|
279
|
+
await page.goto('/markets')
|
|
280
|
+
const card = page.locator('[data-testid="market-card"]').first()
|
|
281
|
+
await expect(card).toHaveScreenshot('market-card.png')
|
|
282
|
+
})
|
|
283
|
+
|
|
284
|
+
// Accessibility Test
|
|
285
|
+
test('form is accessible', async ({ page }) => {
|
|
286
|
+
await page.goto('/markets/create')
|
|
287
|
+
|
|
288
|
+
// Check keyboard navigation
|
|
289
|
+
await page.keyboard.press('Tab')
|
|
290
|
+
await expect(page.locator(':focus')).toHaveAttribute('name', 'title')
|
|
291
|
+
|
|
292
|
+
// Check ARIA labels
|
|
293
|
+
await expect(page.locator('label[for="title"]')).toBeVisible()
|
|
294
|
+
|
|
295
|
+
// Check required fields
|
|
296
|
+
await expect(page.locator('[name="title"]')).toHaveAttribute('aria-required', 'true')
|
|
297
|
+
})
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
---
|
|
301
|
+
|
|
302
|
+
### 4. 🟡 Figma MCP (On Request)
|
|
303
|
+
|
|
304
|
+
**Command**: `npx @modelcontextprotocol/server-figma`
|
|
305
|
+
**Status**: ⚠️ Requires Setup
|
|
306
|
+
**Permission**: Ask
|
|
307
|
+
|
|
308
|
+
#### Purpose
|
|
309
|
+
|
|
310
|
+
Access Figma design files untuk extract design tokens dan inspect components.
|
|
311
|
+
|
|
312
|
+
#### Setup Required
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
# User needs to provide Figma Personal Access Token
|
|
316
|
+
# Get from: https://www.figma.com/developers/api#access-tokens
|
|
317
|
+
|
|
318
|
+
export FIGMA_ACCESS_TOKEN="figd_your_token_here"
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
#### Available Capabilities
|
|
322
|
+
|
|
323
|
+
**Design Inspection**:
|
|
324
|
+
|
|
325
|
+
- Get file structure
|
|
326
|
+
- Read component properties
|
|
327
|
+
- Extract styles (colors, typography, spacing)
|
|
328
|
+
- Get component variants
|
|
329
|
+
- Access design tokens
|
|
330
|
+
|
|
331
|
+
**Asset Export**:
|
|
332
|
+
|
|
333
|
+
- Export images
|
|
334
|
+
- Get SVG code
|
|
335
|
+
- Download assets
|
|
336
|
+
- Get component screenshots
|
|
337
|
+
|
|
338
|
+
#### When to Use
|
|
339
|
+
|
|
340
|
+
- ✅ Implementing designs from Figma
|
|
341
|
+
- ✅ Extracting exact colors, spacing, typography
|
|
342
|
+
- ✅ Verifying component specifications
|
|
343
|
+
- ✅ Getting design assets (icons, images)
|
|
344
|
+
- ✅ Creating design system from Figma
|
|
345
|
+
|
|
346
|
+
#### Example Usage
|
|
347
|
+
|
|
348
|
+
```typescript
|
|
349
|
+
// After user provides Figma file URL and token
|
|
350
|
+
|
|
351
|
+
// Extract color palette
|
|
352
|
+
const colors = await getFigmaStyles(fileId, 'FILL')
|
|
353
|
+
// Result: { primary: '#3b82f6', secondary: '#8b5cf6', ... }
|
|
354
|
+
|
|
355
|
+
// Get component specs
|
|
356
|
+
const buttonSpecs = await getFigmaComponent(fileId, 'Button')
|
|
357
|
+
// Result: {
|
|
358
|
+
// variants: ['primary', 'secondary', 'ghost'],
|
|
359
|
+
// sizes: ['sm', 'md', 'lg'],
|
|
360
|
+
// padding: { sm: '8px 12px', md: '12px 16px' },
|
|
361
|
+
// borderRadius: '6px'
|
|
362
|
+
// }
|
|
363
|
+
|
|
364
|
+
// Implement with exact values
|
|
365
|
+
<UButton
|
|
366
|
+
:style="{
|
|
367
|
+
padding: buttonSpecs.padding.md,
|
|
368
|
+
borderRadius: buttonSpecs.borderRadius
|
|
369
|
+
}"
|
|
370
|
+
>
|
|
371
|
+
Submit
|
|
372
|
+
</UButton>
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
---
|
|
376
|
+
|
|
377
|
+
## Usage Examples
|
|
378
|
+
|
|
379
|
+
### Example 1: Building a Market Card
|
|
380
|
+
|
|
381
|
+
```markdown
|
|
382
|
+
User: "Create a MarketCard component to display market information"
|
|
383
|
+
|
|
384
|
+
Agent Workflow:
|
|
385
|
+
|
|
386
|
+
1. CHECK NUXT UI MCP:
|
|
387
|
+
Query: "What card components are available?"
|
|
388
|
+
Found: UCard with header, body, footer slots
|
|
389
|
+
2. CHECK NUXT MCP:
|
|
390
|
+
Query: "Component structure best practices in Nuxt 4"
|
|
391
|
+
Found: Use <script setup lang="ts">, auto-imports
|
|
392
|
+
3. IMPLEMENT:
|
|
393
|
+
```
|
|
394
|
+
|
|
395
|
+
```vue
|
|
396
|
+
<script setup lang="ts">
|
|
397
|
+
// From Nuxt MCP: composables are auto-imported
|
|
398
|
+
interface Props {
|
|
399
|
+
market: Market
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
const props = defineProps<Props>()
|
|
403
|
+
|
|
404
|
+
// From Nuxt MCP: router composables auto-imported
|
|
405
|
+
const router = useRouter()
|
|
406
|
+
|
|
407
|
+
const navigateToMarket = () => {
|
|
408
|
+
router.push(`/markets/${props.market.id}`)
|
|
409
|
+
}
|
|
410
|
+
</script>
|
|
411
|
+
|
|
412
|
+
<template>
|
|
413
|
+
<!-- From Nuxt UI MCP: UCard component -->
|
|
414
|
+
<UCard
|
|
415
|
+
:ui="{
|
|
416
|
+
body: { padding: 'p-4 sm:p-6' },
|
|
417
|
+
header: { padding: 'p-4 sm:p-6' },
|
|
418
|
+
}"
|
|
419
|
+
@click="navigateToMarket"
|
|
420
|
+
>
|
|
421
|
+
<template #header>
|
|
422
|
+
<div class="flex items-center justify-between">
|
|
423
|
+
<h3 class="text-lg font-semibold">
|
|
424
|
+
{{ market.title }}
|
|
425
|
+
</h3>
|
|
426
|
+
<!-- From Nuxt UI MCP: UBadge component -->
|
|
427
|
+
<UBadge :color="market.status === 'active' ? 'green' : 'gray'">
|
|
428
|
+
{{ market.status }}
|
|
429
|
+
</UBadge>
|
|
430
|
+
</div>
|
|
431
|
+
</template>
|
|
432
|
+
|
|
433
|
+
<p class="text-gray-600 dark:text-gray-400">
|
|
434
|
+
{{ market.description }}
|
|
435
|
+
</p>
|
|
436
|
+
|
|
437
|
+
<template #footer>
|
|
438
|
+
<!-- From Nuxt UI MCP: UButton component -->
|
|
439
|
+
<UButton variant="ghost" block> View Details </UButton>
|
|
440
|
+
</template>
|
|
441
|
+
</UCard>
|
|
442
|
+
</template>
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
```markdown
|
|
446
|
+
4. TEST WITH PLAYWRIGHT MCP:
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
```typescript
|
|
450
|
+
test('market card is interactive', async ({ page }) => {
|
|
451
|
+
await page.goto('/markets')
|
|
452
|
+
const card = page.locator('[data-testid="market-card"]').first()
|
|
453
|
+
|
|
454
|
+
// Click card
|
|
455
|
+
await card.click()
|
|
456
|
+
|
|
457
|
+
// Should navigate to market detail
|
|
458
|
+
await expect(page).toHaveURL(/\/markets\/\d+/)
|
|
459
|
+
})
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
### Example 2: Form with Validation
|
|
465
|
+
|
|
466
|
+
```markdown
|
|
467
|
+
User: "Create form for creating a market with validation"
|
|
468
|
+
|
|
469
|
+
Agent Workflow:
|
|
470
|
+
|
|
471
|
+
1. CHECK NUXT UI MCP:
|
|
472
|
+
Components: UForm, UFormGroup, UInput, UTextarea, UButton
|
|
473
|
+
Validation: Supports Zod schema
|
|
474
|
+
2. CHECK NUXT MCP:
|
|
475
|
+
Form handling: useForm composable (if available)
|
|
476
|
+
Validation: Zod integration
|
|
477
|
+
3. IMPLEMENT:
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
```vue
|
|
481
|
+
<script setup lang="ts">
|
|
482
|
+
import { z } from 'zod'
|
|
483
|
+
|
|
484
|
+
// Validation schema
|
|
485
|
+
const schema = z.object({
|
|
486
|
+
title: z.string().min(5, 'Min 5 characters').max(200, 'Max 200 characters'),
|
|
487
|
+
description: z.string().min(20, 'Min 20 characters').max(2000, 'Max 2000 chars'),
|
|
488
|
+
category: z.enum(['sports', 'politics', 'crypto', 'entertainment']),
|
|
489
|
+
endDate: z.string().refine((date) => new Date(date) > new Date(), {
|
|
490
|
+
message: 'End date must be in the future',
|
|
491
|
+
}),
|
|
492
|
+
})
|
|
493
|
+
|
|
494
|
+
type Schema = z.output<typeof schema>
|
|
495
|
+
|
|
496
|
+
const state = reactive({
|
|
497
|
+
title: '',
|
|
498
|
+
description: '',
|
|
499
|
+
category: undefined,
|
|
500
|
+
endDate: '',
|
|
501
|
+
})
|
|
502
|
+
|
|
503
|
+
const toast = useToast()
|
|
504
|
+
|
|
505
|
+
async function onSubmit(event: FormSubmitEvent<Schema>) {
|
|
506
|
+
try {
|
|
507
|
+
const result = await $fetch('/api/markets', {
|
|
508
|
+
method: 'POST',
|
|
509
|
+
body: event.data,
|
|
510
|
+
})
|
|
511
|
+
|
|
512
|
+
toast.add({
|
|
513
|
+
title: 'Market created!',
|
|
514
|
+
description: 'Your market has been published',
|
|
515
|
+
color: 'green',
|
|
516
|
+
})
|
|
517
|
+
|
|
518
|
+
navigateTo(`/markets/${result.id}`)
|
|
519
|
+
} catch (error) {
|
|
520
|
+
toast.add({
|
|
521
|
+
title: 'Error',
|
|
522
|
+
description: 'Failed to create market',
|
|
523
|
+
color: 'red',
|
|
524
|
+
})
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
</script>
|
|
528
|
+
|
|
529
|
+
<template>
|
|
530
|
+
<!-- From Nuxt UI MCP: UForm component with validation -->
|
|
531
|
+
<UForm :schema="schema" :state="state" @submit="onSubmit">
|
|
532
|
+
<!-- From Nuxt UI MCP: UFormGroup with validation -->
|
|
533
|
+
<UFormGroup label="Title" name="title" required>
|
|
534
|
+
<UInput v-model="state.title" placeholder="Enter market title" />
|
|
535
|
+
</UFormGroup>
|
|
536
|
+
|
|
537
|
+
<UFormGroup label="Description" name="description" required>
|
|
538
|
+
<UTextarea v-model="state.description" placeholder="Describe your market" :rows="5" />
|
|
539
|
+
</UFormGroup>
|
|
540
|
+
|
|
541
|
+
<UFormGroup label="Category" name="category" required>
|
|
542
|
+
<USelect
|
|
543
|
+
v-model="state.category"
|
|
544
|
+
:options="[
|
|
545
|
+
{ label: 'Sports', value: 'sports' },
|
|
546
|
+
{ label: 'Politics', value: 'politics' },
|
|
547
|
+
{ label: 'Crypto', value: 'crypto' },
|
|
548
|
+
{ label: 'Entertainment', value: 'entertainment' },
|
|
549
|
+
]"
|
|
550
|
+
/>
|
|
551
|
+
</UFormGroup>
|
|
552
|
+
|
|
553
|
+
<UFormGroup label="End Date" name="endDate" required>
|
|
554
|
+
<UInput v-model="state.endDate" type="datetime-local" />
|
|
555
|
+
</UFormGroup>
|
|
556
|
+
|
|
557
|
+
<UButton type="submit" block> Create Market </UButton>
|
|
558
|
+
</UForm>
|
|
559
|
+
</template>
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
```markdown
|
|
563
|
+
4. TEST WITH PLAYWRIGHT MCP:
|
|
564
|
+
```
|
|
565
|
+
|
|
566
|
+
```typescript
|
|
567
|
+
test('form validation works', async ({ page }) => {
|
|
568
|
+
await page.goto('/markets/create')
|
|
569
|
+
|
|
570
|
+
// Try submit without filling
|
|
571
|
+
await page.click('button[type="submit"]')
|
|
572
|
+
|
|
573
|
+
// Should show validation errors
|
|
574
|
+
await expect(page.locator('.text-red-500')).toContainText('Min 5 characters')
|
|
575
|
+
|
|
576
|
+
// Fill form with valid data
|
|
577
|
+
await page.fill('[name="title"]', 'Bitcoin Price Prediction')
|
|
578
|
+
await page.fill('[name="description"]', 'Will Bitcoin reach $100k by end of 2024?')
|
|
579
|
+
await page.selectOption('[name="category"]', 'crypto')
|
|
580
|
+
await page.fill('[name="endDate"]', '2024-12-31T23:59')
|
|
581
|
+
|
|
582
|
+
// Submit
|
|
583
|
+
await page.click('button[type="submit"]')
|
|
584
|
+
|
|
585
|
+
// Should navigate to market page
|
|
586
|
+
await expect(page).toHaveURL(/\/markets\/\d+/)
|
|
587
|
+
})
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
---
|
|
591
|
+
|
|
592
|
+
### Example 3: Deploy to Vercel
|
|
593
|
+
|
|
594
|
+
```markdown
|
|
595
|
+
User: "How do I deploy this Nuxt app to Vercel?"
|
|
596
|
+
|
|
597
|
+
Agent Workflow:
|
|
598
|
+
|
|
599
|
+
1. CHECK NUXT MCP:
|
|
600
|
+
Tool: get_deploy_provider('vercel')
|
|
601
|
+
2. GET INSTRUCTIONS:
|
|
602
|
+
- Install Vercel CLI or use dashboard
|
|
603
|
+
- Nuxt preset auto-detected
|
|
604
|
+
- Environment variables setup
|
|
605
|
+
- Build configuration
|
|
606
|
+
3. PROVIDE STEPS:
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
```bash
|
|
610
|
+
# Option 1: Vercel CLI
|
|
611
|
+
npm i -g vercel
|
|
612
|
+
vercel
|
|
613
|
+
|
|
614
|
+
# Option 2: Git Integration (Recommended)
|
|
615
|
+
# 1. Push code to GitHub
|
|
616
|
+
git add .
|
|
617
|
+
git commit -m "feat: ready for deployment"
|
|
618
|
+
git push
|
|
619
|
+
|
|
620
|
+
# 2. Go to vercel.com/new
|
|
621
|
+
# 3. Import repository
|
|
622
|
+
# 4. Vercel auto-detects Nuxt
|
|
623
|
+
# 5. Add environment variables
|
|
624
|
+
# 6. Deploy!
|
|
625
|
+
|
|
626
|
+
# Environment Variables to set:
|
|
627
|
+
# - NUXT_PUBLIC_API_URL
|
|
628
|
+
# - DATABASE_URL
|
|
629
|
+
# - etc.
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
---
|
|
633
|
+
|
|
634
|
+
## Best Practices
|
|
635
|
+
|
|
636
|
+
### DO ✅
|
|
637
|
+
|
|
638
|
+
1. **Always Check MCP First**
|
|
639
|
+
|
|
640
|
+
```markdown
|
|
641
|
+
Before implementing, ask:
|
|
642
|
+
|
|
643
|
+
- Is there a Nuxt UI component for this?
|
|
644
|
+
- What's the official Nuxt pattern?
|
|
645
|
+
- How does the API actually work?
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
2. **Use Nuxt UI Components**
|
|
649
|
+
|
|
650
|
+
```vue
|
|
651
|
+
<!-- ✅ GOOD: Use Nuxt UI -->
|
|
652
|
+
<UButton variant="solid" color="primary">Submit</UButton>
|
|
653
|
+
|
|
654
|
+
<!-- ❌ BAD: Custom button -->
|
|
655
|
+
<button class="btn btn-primary">Submit</button>
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
3. **Verify API with MCP**
|
|
659
|
+
|
|
660
|
+
```typescript
|
|
661
|
+
// ✅ GOOD: Check Nuxt MCP for correct API
|
|
662
|
+
const { data } = await useFetch('/api/markets', {
|
|
663
|
+
query: { status: 'active' },
|
|
664
|
+
transform: (data) => data.markets,
|
|
665
|
+
})
|
|
666
|
+
|
|
667
|
+
// ❌ BAD: Guess the API
|
|
668
|
+
const data = await fetch('/api/markets?status=active').then((r) => r.json())
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
4. **Write Tests with Playwright**
|
|
672
|
+
|
|
673
|
+
```typescript
|
|
674
|
+
// ✅ GOOD: Comprehensive E2E test
|
|
675
|
+
test('critical user flow', async ({ page }) => {
|
|
676
|
+
// Test complete user journey
|
|
677
|
+
})
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
5. **Announce MCP Usage**
|
|
681
|
+
```markdown
|
|
682
|
+
📚 Checking Nuxt UI MCP for available components...
|
|
683
|
+
Found UButton with these props: [list props]
|
|
684
|
+
Implementing now with official API.
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
### DON'T ❌
|
|
688
|
+
|
|
689
|
+
1. **Don't Create Custom Components Unnecessarily**
|
|
690
|
+
|
|
691
|
+
```vue
|
|
692
|
+
<!-- ❌ BAD: Custom card when UCard exists -->
|
|
693
|
+
<div class="custom-card">
|
|
694
|
+
<div class="custom-card-header">...</div>
|
|
695
|
+
</div>
|
|
696
|
+
|
|
697
|
+
<!-- ✅ GOOD: Use UCard -->
|
|
698
|
+
<UCard>
|
|
699
|
+
<template #header>...</template>
|
|
700
|
+
</UCard>
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
2. **Don't Guess API Usage**
|
|
704
|
+
|
|
705
|
+
```typescript
|
|
706
|
+
// ❌ BAD: Guessing useFetch options
|
|
707
|
+
useFetch('/api/data', { cache: true }) // cache option doesn't exist!
|
|
708
|
+
|
|
709
|
+
// ✅ GOOD: Check Nuxt MCP for correct options
|
|
710
|
+
useFetch('/api/data', {
|
|
711
|
+
key: 'data',
|
|
712
|
+
lazy: true,
|
|
713
|
+
server: true,
|
|
714
|
+
})
|
|
715
|
+
```
|
|
716
|
+
|
|
717
|
+
3. **Don't Skip Testing**
|
|
718
|
+
|
|
719
|
+
```typescript
|
|
720
|
+
// ❌ BAD: No tests
|
|
721
|
+
// Just ship it!
|
|
722
|
+
|
|
723
|
+
// ✅ GOOD: Test critical flows
|
|
724
|
+
test('user can complete checkout', async ({ page }) => {
|
|
725
|
+
// Test the flow
|
|
726
|
+
})
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
4. **Don't Ignore Documentation**
|
|
730
|
+
```markdown
|
|
731
|
+
❌ BAD: "I think it works like this..."
|
|
732
|
+
✅ GOOD: "According to Nuxt MCP, the correct way is..."
|
|
733
|
+
```
|
|
734
|
+
|
|
735
|
+
---
|
|
736
|
+
|
|
737
|
+
## Troubleshooting
|
|
738
|
+
|
|
739
|
+
### MCP Server Not Responding
|
|
740
|
+
|
|
741
|
+
```bash
|
|
742
|
+
# Check MCP connection
|
|
743
|
+
opencode mcp status
|
|
744
|
+
|
|
745
|
+
# Reconnect
|
|
746
|
+
opencode mcp reconnect nuxt
|
|
747
|
+
opencode mcp reconnect nuxt-ui
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
### Figma MCP Not Working
|
|
751
|
+
|
|
752
|
+
```bash
|
|
753
|
+
# Check token is set
|
|
754
|
+
echo $FIGMA_ACCESS_TOKEN
|
|
755
|
+
|
|
756
|
+
# If not set, add to .env or shell profile
|
|
757
|
+
export FIGMA_ACCESS_TOKEN="figd_your_token_here"
|
|
758
|
+
|
|
759
|
+
# Restart OpenCode
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
### Playwright Tests Failing
|
|
763
|
+
|
|
764
|
+
```bash
|
|
765
|
+
# Install browsers
|
|
766
|
+
npx playwright install
|
|
767
|
+
|
|
768
|
+
# Run in headed mode for debugging
|
|
769
|
+
npx playwright test --headed
|
|
770
|
+
|
|
771
|
+
# Run with UI
|
|
772
|
+
npx playwright test --ui
|
|
773
|
+
```
|
|
774
|
+
|
|
775
|
+
### Wrong Documentation Version
|
|
776
|
+
|
|
777
|
+
```typescript
|
|
778
|
+
// Specify Nuxt version when querying
|
|
779
|
+
list_documentation_pages({ version: '4.x' }) // Not 3.x
|
|
780
|
+
|
|
781
|
+
// Or check which version docs you're reading
|
|
782
|
+
get_documentation_page({ path: '/guide/directory-structure/app' })
|
|
783
|
+
// Make sure it says "Nuxt 4" at the top
|
|
784
|
+
```
|
|
785
|
+
|
|
786
|
+
---
|
|
787
|
+
|
|
788
|
+
## MCP Command Reference
|
|
789
|
+
|
|
790
|
+
### Nuxt MCP
|
|
791
|
+
|
|
792
|
+
```bash
|
|
793
|
+
# List all docs
|
|
794
|
+
list_documentation_pages()
|
|
795
|
+
list_documentation_pages({ version: '4.x' })
|
|
796
|
+
|
|
797
|
+
# Get specific doc
|
|
798
|
+
get_documentation_page({ path: '/api/composables/use-fetch' })
|
|
799
|
+
|
|
800
|
+
# Search for topic
|
|
801
|
+
find_documentation_for_topic({ topic: 'server api routes' })
|
|
802
|
+
|
|
803
|
+
# Get deployment guide
|
|
804
|
+
get_deploy_provider({ provider: 'vercel' })
|
|
805
|
+
list_deploy_providers()
|
|
806
|
+
|
|
807
|
+
# Migration help
|
|
808
|
+
migration_help({ from: '3.x', to: '4.x' })
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
### Nuxt UI MCP
|
|
812
|
+
|
|
813
|
+
```bash
|
|
814
|
+
# Browse components
|
|
815
|
+
# Check MCP for available queries
|
|
816
|
+
|
|
817
|
+
# Get component docs
|
|
818
|
+
# [Component documentation URLs from ui.nuxt.com]
|
|
819
|
+
```
|
|
820
|
+
|
|
821
|
+
### Playwright MCP
|
|
822
|
+
|
|
823
|
+
```typescript
|
|
824
|
+
// Run test
|
|
825
|
+
await page.goto(url)
|
|
826
|
+
await page.click(selector)
|
|
827
|
+
await page.fill(selector, value)
|
|
828
|
+
await expect(page.locator(selector)).toBeVisible()
|
|
829
|
+
|
|
830
|
+
// Screenshot
|
|
831
|
+
await page.screenshot({ path: 'screenshot.png' })
|
|
832
|
+
|
|
833
|
+
// Performance
|
|
834
|
+
const metrics = await page.evaluate(() => performance.getEntriesByType('navigation'))
|
|
835
|
+
```
|
|
836
|
+
|
|
837
|
+
---
|
|
838
|
+
|
|
839
|
+
## Quick Reference Card
|
|
840
|
+
|
|
841
|
+
```
|
|
842
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
843
|
+
│ MCP INTEGRATION - Quick Reference │
|
|
844
|
+
├─────────────────────────────────────────────────────────────┤
|
|
845
|
+
│ │
|
|
846
|
+
│ BEFORE IMPLEMENTING: │
|
|
847
|
+
│ 1. Check Nuxt UI MCP for components │
|
|
848
|
+
│ 2. Check Nuxt MCP for framework patterns │
|
|
849
|
+
│ 3. Implement using official APIs │
|
|
850
|
+
│ 4. Test with Playwright MCP │
|
|
851
|
+
│ │
|
|
852
|
+
│ AVAILABLE MCPs: │
|
|
853
|
+
│ 🟢 Nuxt - https://nuxt.com/mcp │
|
|
854
|
+
│ 🟢 Nuxt UI - https://ui.nuxt.com/mcp │
|
|
855
|
+
│ 🟢 Playwright - Browser automation │
|
|
856
|
+
│ 🟡 Figma - Design files (requires token) │
|
|
857
|
+
│ │
|
|
858
|
+
│ COMMON QUERIES: │
|
|
859
|
+
│ • "What Nuxt UI components are available?" │
|
|
860
|
+
│ • "How does useFetch work in Nuxt 4?" │
|
|
861
|
+
│ • "Show me file-based routing structure" │
|
|
862
|
+
│ • "Get deployment guide for Vercel" │
|
|
863
|
+
│ │
|
|
864
|
+
│ REMEMBER: │
|
|
865
|
+
│ ✅ MCP first, custom last │
|
|
866
|
+
│ ✅ Verify APIs, don't guess │
|
|
867
|
+
│ ✅ Use Nuxt UI components │
|
|
868
|
+
│ ✅ Test with Playwright │
|
|
869
|
+
│ │
|
|
870
|
+
└─────────────────────────────────────────────────────────────┘
|
|
871
|
+
```
|
|
872
|
+
|
|
873
|
+
---
|
|
874
|
+
|
|
875
|
+
**Happy coding with MCP! 🚀**
|
|
876
|
+
|
|
877
|
+
For more information:
|
|
878
|
+
|
|
879
|
+
- Nuxt MCP Docs: https://nuxt.com/docs/guide/ai/mcp
|
|
880
|
+
- Nuxt UI: https://ui.nuxt.com
|
|
881
|
+
- Playwright: https://playwright.dev
|