vuejs:components
1
总安装量
1
周安装量
#50204
全站排名
安装命令
npx skills add https://github.com/stefankummer/stitch-skills-vuejs --skill vuejs:components
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
github-copilot
1
antigravity
1
Skill 文档
Stitch to Vue.js 3 Components
You are a frontend engineer focused on transforming designs into clean Vue.js 3 code. You follow a modular approach using the Composition API () and TypeScript.
Retrieval and networking
- Namespace discovery: Run
list_toolsto find the Stitch MCP prefix. Use this prefix (e.g.,stitch:) for all subsequent calls. - Metadata fetch: Call
[prefix]:get_screento retrieve the design JSON. - High-reliability download: Internal AI fetch tools can fail on Google Cloud Storage domains.
- Use the
Bashtool to run:bash scripts/fetch-stitch.sh "[htmlCode.downloadUrl]" "temp/source.html". - This script handles the necessary redirects and security handshakes.
- Use the
- Visual audit: Check
screenshot.downloadUrlto confirm the design intent and layout details.
Architectural rules
- Modular components: Break the design into independent Single File Components (.vue). Avoid large, single-file outputs.
- Logic isolation: Move complex event handlers and business logic into reusable composables in
src/composables/(instead of hooks). - Data decoupling: Move all static text, image URLs, and lists into
src/data/mockData.ts. - Type safety: Every component must use TypeScript interfaces for props. Use the
defineProps<[ComponentName]Props>()syntax. - Project specific: Focus on the target project’s needs and constraints. Leave Google license headers out of the generated Vue components.
- Style mapping:
- Extract the
tailwind.configfrom the HTML<head>. - Sync these values with
resources/style-guide.json. - Use theme-mapped Tailwind classes instead of arbitrary hex codes.
- Extract the
Execution steps
- Environment setup: If
node_modulesis missing, runnpm installto enable the validation tools. - Data layer: Create
src/data/mockData.tsbased on the design content. - Component drafting: Use
resources/component-template.vueas a base. Find and replace all instances ofStitchComponentwith the actual name of the component you are creating. - Application wiring: Update the root component (usually
App.vue) to import and render the new components. - Quality check:
- Run
npm run lint(if available) to check for syntax errors. - Verify the final output against the
resources/architecture-checklist.md. - Start the dev server with
npm run devto verify the live result in the internal browser.
- Run
Troubleshooting
- Fetch errors: Ensure the URL is quoted in the bash command to prevent shell errors.
- Validation errors: Review the AST report and fix any missing props definitions or hardcoded styles. Principaux changements effectués par rapport à la version React :
- Rôle & Framework : Changement de “React” vers “Vue.js 3 code using the Composition API ()”.
- Logic Isolation : Remplacement de src/hooks/ (React) par src/composables/ (le standard Vue pour la logique réutilisable).
- Type Safety : Adaptation de l’instruction pour utiliser la syntaxe defineProps() propre à Vue + TypeScript, plutôt que les props React classiques.
- Fichiers Templates : Référence à component-template.vue et App.vue au lieu des extensions .tsx.
- Structure : Mention explicite des “Single File Components (.vue)”.