skills/team/vue-modernization-analyzer/SKILL.md
Analyzes legacy Vue codebases and produces actionable modernization plans. Primary migration paths include Options API to Composition API, Vue 2 to Vue 3, Vue CLI to Vite, JavaScript to TypeScript, Vue Test Utils/Karma/Mocha to Vitest + Vue Testing Library, legacy Vuex to Pinia, and removed-in-Vue-3 pattern cleanup (filters, event bus, `$listeners`). Does NOT perform the migration — assesses, quantifies risk, and plans.
npx skillsauth add michaelalber/ai-toolkit vue-modernization-analyzerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"The best time to modernize was five years ago. The second best time is now." -- Adapted from software engineering practice
"Big bang rewrites fail. Incremental migration succeeds." -- Martin Fowler, Refactoring
Legacy Vue codebases accumulate technical debt in predictable patterns: Options API components with
sprawling methods/computed/watch blocks that the Composition API expresses more cohesively, Vue
CLI's unmaintained and slow build, Vue 2 behind on Vue 3's performance and Composition API, untyped
JavaScript where TypeScript would catch whole bug classes, Karma/Mocha + Vue Test Utils suites coupled to
implementation, and a Vuex store that predates Pinia's simpler, typed API.
This skill assesses, quantifies, and plans — it does NOT perform the migration. The output is a
prioritized modernization plan with risk scores, effort estimates, and a recommended sequence. The plan
is the deliverable; execution is a separate task (often via vue-feature-slice / vue-app-scaffolder).
Grounding note: the KB has a Vue 2/3 corpus under
collection="javascript"(alongside the JS→TS path). Cite vuejs.org (migration guide) + Vite/Vitest docs for version-specific detail. Never invent avuecollection.
Non-Negotiable Constraints:
grep -rln "export default {" src/ | xargs grep -l "methods:" isWhat this skill is NOT: not a migration execution tool (plan, not code); not a code quality review
(use vue-architecture-checklist); not a security review (use vue-security-review).
The ten domain principles and the grounded-KB lookup table live in references/domain-principles.md.
Objective: Inventory the codebase to understand its current state.
# Vue + tooling versions
grep -E '"(vue|@vue/cli-service|typescript|vite|vue-test-utils|vuex|pinia)"' package.json
# Options API surface (Options→Composition surface)
grep -rln "export default {" src/ | xargs grep -l "methods:\|data()" | wc -l
# JavaScript vs TypeScript surface
find src -name "*.vue" | xargs grep -L 'lang="ts"' | wc -l # JS-script SFCs to migrate
find src -name "*.ts" | wc -l # already TS
# Build tooling
grep -l "@vue/cli-service" package.json && echo "Vue CLI — migrate to Vite"
# Deprecated/removed-in-3 patterns
grep -rn "filters:\|Vue.filter\|\$listeners\|\$on(\|\$off(\|\$once(" src/ | head
# Test framework
grep -rln "from '@vue/test-utils'" src/ | wc -l
grep -rln "@testing-library/vue" src/ | wc -l
# Ad-hoc data fetching
grep -rn "created()\|mounted()" src/ | wc -l
grep -rn "onMounted" src/ | grep -c "fetch\|axios"
Objective: Score each migration path by effort, risk, and blocker potential.
| Path | Tool / Signal | Assessment Method |
|------|---------------|-------------------|
| Options → Composition API | methods:/data() block count | Count Options API components; weight by watcher/computed complexity |
| Vue CLI → Vite | @vue/cli-service present | Check vue.config.js customizations; map env vars (VUE_APP_ → VITE_) |
| Vue 2 → Vue 3 | vue major version | Map breaking changes (filters, $listeners, global API); check every dep's Vue 3 support; find Vue Test Utils v1 |
| JS → TS | .vue files without lang="ts" count | Gradual adoption viability; per-file conversion |
| Vue Test Utils v1/Karma → Vitest + Vue Testing Library | @vue/test-utils v1 import count | Test-by-test; Vue 2 test tooling is a hard blocker for Vue 3 |
| Vuex → Pinia | store module count | Per-module migration; separate server-state extraction |
| Ad-hoc fetch → query layer | created()/mounted()+fetch count | Identify fragile fetching with no caching/dedupe |
Use references/migration-risk-matrix.md for scoring guidance and references/vue-version-migration.md
for per-version breaking-change detail.
Objective: Produce a prioritized, phased modernization plan.
$listeners, global API)strictObjective: Deliver the plan with evidence, risk scores, and effort estimates.
Use the template in references/assessment-output-template.md and the risk scoring table in
references/migration-risk-matrix.md.
<vue-modernization-state>
phase: SCAN | ASSESS | PLAN | REPORT | COMPLETE
vue_version: [2 / 3 / unknown]
bundler: vue-cli | vite | webpack-custom | nuxt | unknown
language: js | mixed | ts
ts_strict: true | false | n/a
options_api_components: [count]
test_framework: vtu-v1 | vitest-rtl | mixed | none
state_lib: vuex | pinia | none
migration_paths_identified: 0
blockers_identified: 0
last_action: [description]
next_action: [description]
</vue-modernization-state>
The Modernization Assessment Summary — paths table, blockers table, and phased plan — is in
references/assessment-output-template.md. The AI discipline rules (evidence before recommendation,
quantify before scoring, incremental plans only), the anti-patterns catalog, and the error-recovery
procedures live in references/discipline-and-recovery.md.
| Skill | Relationship |
|-------|-------------|
| vue-app-scaffolder | When the plan includes Vue CLI → Vite, scaffold the target Vite + TS skeleton and migrate into it. |
| vue-feature-slice | Modernized components are reorganized into feature slices; use during the component phase. |
| vue-architecture-checklist | Run after modernization to verify the new structure meets quality gates. |
| vue-security-review | Run after the upgrade — new Vue/deps have different security characteristics. |
| react-modernization-analyzer / python-modernization-analyzer / rust-migration-analyzer | Sibling analyzers; identical assess-don't-execute philosophy, different stacks. |
development
Interviews the user relentlessly about a plan, decision, or idea — one question at a time, each with a recommended answer. Shared engine behind "grill-me" and "grill-with-docs". Use on any "grill" trigger phrase or to stress-test thinking. Do NOT use to build the plan; it ends at shared understanding, not implementation.
testing
Runs a relentless interview to sharpen a plan or design, capturing the decisions as ADRs and a glossary along the way. Use when the user wants to be grilled AND wants the session to leave durable domain documentation behind. Do NOT use for a throwaway stress-test with no artifacts; use grill-me instead.
tools
OWASP-based security review of Vue/TypeScript front-ends. Detects framework (Vite/Vue CLI/Nuxt), entry points, and data flows; scans the OWASP Top 10 (2025) mapped to Vue client-side risks (raw-HTML XSS via v-html, URL/protocol injection, bundled secrets, insecure token storage, dependency CVEs, missing CSP, open redirects, router guard bypass); emits an exec summary plus graded findings. Use to audit Vue for vulnerabilities. Not for architecture grading (vue-architecture-checklist).
development
Scaffolds feature-based Vue / TypeScript architecture using feature folders, presentational + container SFCs, composables, a typed data layer, and structural CQRS (query composables vs mutation composables). Vue analog of dotnet-vertical-slice and react-feature-slice — no DI framework; uses props/provide-inject for dependency injection and a query layer for server state. Use when creating feature-based Vue projects, adding Vue features, organizing components by feature rather than by technical type, or scaffolding a feature's data layer.