weapp-vite-vue-sfc-best-practices
Skill by weapp-vite
Guides Vue SFC authoring for weapp-vite mini program projects. It covers JSON macros, template compatibility, usingComponents, the built-in i18n behavior, and the .weapp-vite typing workflow.
Install weapp-vite-vue-sfc-best-practices
Built from the published package, never by AI.
git clone --depth 1 https://github.com/weapp-vite/weapp-vite /tmp/weapp-vite && mkdir -p ~/.claude/skills && cp -r /tmp/weapp-vite/skills/weapp-vite-vue-sfc-best-practices ~/.claude/skills/weapp-vite-vue-sfc-best-practicesRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install weapp-vite-vue-sfc-best-practices in Claude Code
git clone --depth 1 https://github.com/weapp-vite/weapp-vite /tmp/weapp-vite && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/weapp-vite/skills/weapp-vite-vue-sfc-best-practices ~/.gemini/antigravity-cli/skills/weapp-vite-vue-sfc-best-practicesAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install weapp-vite-vue-sfc-best-practices in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a practical guide for writing Vue single-file components (SFCs) in mini program projects that use weapp-vite. It covers script setup, template-only SFCs, JSON macros, definePageMeta and layouts, defineModel, usingComponents, the built-in i18n behavior, JSX and TSX script blocks, template directive compatibility, multi-platform SFCs, and the .weapp-vite typing files with the managed prepare workflow.
The skill tells the assistant to first identify the problem stage (compile time, runtime, or tooling), then apply SFC-level changes and template compatibility rules. It expects the answer to include a stage diagnosis, SFC changes, template notes, and minimal verification commands. It is aimed at developers building weapp-vite mini programs who hit template compile errors or type drift.
Written from the project's SKILL.md and checked against it.
What it can do
- Stage diagnosisSorts a問题 into compile time, runtime, or tooling before suggesting changes.
- JSON macrosGuides use of defineAppJson, definePageJson, and defineComponentJson, and definePageMeta for page metadata.
- Template compatibilityLists template rules such as v-model targets, usingComponents sourcing, and optional chaining conversion.
- Slot handlingExplains when slot wrappers and scoped slot generation apply in mini program templates.
- i18n usageShows how to attach the built-in i18n behavior and call translations from templates and logic.
- Typing and prepareCovers .weapp-vite typing outputs, route and component type drift, and running wv prepare.
- Multi-platform checksAdvises verifying one -p platform target at a time and testing on the target mini program IDE or device.
What you need
- A weapp-vite mini program project
- Vue SFC files (.vue)
Try asking
- Which JSON macro should I use for this page in my weapp-vite project?
- My .vue template fails to compile in weapp-vite. Diagnose the stage and fix it.
- Run the right checks after my components.d.ts drifted in weapp-vite.
Good to know
- Does not cover project build configuration, wevu lifecycle, or migration planning.
- Built-in i18n v1 supports only simple key lookup and {name} interpolation, not ICU or MessageFormat.
- Forwarded slots and some :deep or :slotted forms are experimental on platforms other than WeChat until verified.
- React JSX/TSX in projects with weapp.react enabled is handled by a different skill.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/weapp-vite-vue-sfc-best-practices/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB -
agents/openai.yaml386 B -
references/macro-config-checklist.md820 B -
references/template-compat-matrix.md833 B -
references/tooling-and-hmr-matrix.md1 KB
Show all 6 files
-
references/troubleshooting-playbook.md489 B
Alternatives to weapp-vite-vue-sfc-best-practices
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
weapp-vite-vue-sfc-best-practices: common questions
Does this skill work for template-only .vue files?
Yes. The source says pure template SFCs may have no script block, and wv prepare must scan them as SFC templates.
Can I use Wot UI or uview-plus with this skill?
The source covers uni-app Vue SFC component libraries such as Wot UI and uview-plus. It says their resolver setup needs weapp.uniApp.include, and uview-plus should call mount$u().
What should I do if typed-router.d.ts or components.d.ts drifts?
Run wv prepare first, according to the source. It also says to check .weapp-vite/tsconfig.app.json when Volar type problems appear.
How do I install weapp-vite-vue-sfc-best-practices?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is weapp-vite-vue-sfc-best-practices free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is weapp-vite-vue-sfc-best-practices safe to use?
It scores 80 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to weapp-vite-vue-sfc-best-practices?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
