{"id":"3a8494ce-25e3-4307-b12c-0bca2f01fcd7","entityType":"agent","slug":"clawhub-bovinphang-fec-legacy-to-modern-migration","name":"Legacy To Modern Migration","canonicalUrl":"https://www.xpersona.co/agent/clawhub-bovinphang-fec-legacy-to-modern-migration","canonicalPath":"/agent/clawhub-bovinphang-fec-legacy-to-modern-migration","generatedAt":"2026-10-14T06:57:06.745Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T23:40:35.588Z","emptyReason":null},"description":"Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chi","descriptionLabel":"Source description","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 974 downloads reported by the source. Last updated 10/11/2026.","installCommand":"clawhub skill install s175m64gr8tsfc06cj22czzfys83mp52:fec-legacy-to-modern-migration","sourceUrl":"https://clawhub.ai/bovinphang/fec-legacy-to-modern-migration","homepage":"https://clawhub.ai/bovinphang/skills/fec-legacy-to-modern-migration","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/bovinphang/fec-legacy-to-modern-migration","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/bovinphang/skills/fec-legacy-to-modern-migration","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Legacy To Modern Migration technical dossier on Xpersona with agent coverage, OPENCLEW support, and live trust metadata."},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-11T23:40:35.588Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T23:40:35.588Z","emptyReason":null},"stars":null,"forks":null,"downloads":974,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"2.9.0","tractionLabel":"974 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T23:40:35.522Z","emptyReason":null},"lastUpdatedAt":"2026-10-11T23:40:35.588Z","lastCrawledAt":"2026-10-11T23:40:35.522Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-12T23:40:35.522Z","lastVerifiedAt":null,"highlights":[{"version":"2.9.0","createdAt":"2026-09-26T15:03:53.463Z","changelog":"- Updated skill documentation to English for broader accessibility. - Added LICENSE file to clarify usage and distribution terms. - Removed skill-card.md for streamlined project files. - No changes to migration strategy, procedures, or constraints—content remains equivalent in English.","fileCount":10,"zipByteSize":12613},{"version":"2.7.0","createdAt":"2026-06-11T02:12:05.535Z","changelog":"- Expanded scope to explicitly support migration toward any modern frontend stack, including React, Vue, Next.js, Nuxt, TypeScript, or modernized MPA. - Added new structured references for migration strategy, mapping, and execution checklist, shifting detailed guidance out of SKILL.md and into dedicated files. - Updated constraints to clarify requirements for code, visual, and functional verification; now mandates automated or manual regression checks for key user flows. - Refined guidance around icons, images, and inline styles, allowing well-justified exceptions and defining validation procedures. - Removed inlined concept mapping tables and phased migration steps from SKILL.md—these are now loaded from external reference files for better maintainability. - skill-card.md removed; migration documentation and references now provided through updated materials.","fileCount":9,"zipByteSize":12177},{"version":"2.5.0","createdAt":"2026-06-03T12:24:30.694Z","changelog":"- Skill renamed to `fec-legacy-to-modern-migration` for improved clarity and consistency. - Refined and clarified usage description and triggers; now explicitly excludes routine legacy bug fixes unless involving a stack migration. - Added internationalization (i18n) requirements and checklist items for new code and migration scenarios. - Reorganized sample report location: expects reference loading from `references/migration-report-template.md`. - Added files: `README.md`, `metadata.json`, `package.json`, and migration report template; removed unused `skill-card.md`. - General wording improvements, consistent table formatting, and enforced stricter output and implementation guidance.","fileCount":7,"zipByteSize":9276}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s175m64gr8tsfc06cj22czzfys83mp52:fec-legacy-to-modern-migration","setupComplexity":"low","setupSteps":["Install using `clawhub skill install s175m64gr8tsfc06cj22czzfys83mp52:fec-legacy-to-modern-migration` in an isolated environment before connecting it to live workloads.","No published capability contract is available yet, so validate auth and request/response behavior manually.","Review the upstream CLAWHUB listing at https://clawhub.ai/bovinphang/fec-legacy-to-modern-migration before using production credentials."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bovinphang-fec-legacy-to-modern-migration/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bovinphang-fec-legacy-to-modern-migration/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bovinphang-fec-legacy-to-modern-migration/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-bovinphang-fec-legacy-to-modern-migration/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-bovinphang-fec-legacy-to-modern-migration/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-bovinphang-fec-legacy-to-modern-migration/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-14T06:57:06.744Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bovinphang-fec-legacy-to-modern-migration/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bovinphang-fec-legacy-to-modern-migration/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bovinphang-fec-legacy-to-modern-migration/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-bovinphang-fec-legacy-to-modern-migration/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-11T23:40:35.588Z","emptyReason":null},"readme":"Skill: Legacy To Modern Migration\n\nOwner: bovinphang\n\nSummary: Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chi\n\nTags: latest:2.9.0\n\nVersion history:\n\nv2.9.0 | 2026-09-26T15:03:53.463Z | user\n\n- Updated skill documentation to English for broader accessibility.\n- Added LICENSE file to clarify usage and distribution terms.\n- Removed skill-card.md for streamlined project files.\n- No changes to migration strategy, procedures, or constraints—content remains equivalent in English.\n\nv2.7.0 | 2026-06-11T02:12:05.535Z | user\n\n- Expanded scope to explicitly support migration toward any modern frontend stack, including React, Vue, Next.js, Nuxt, TypeScript, or modernized MPA.\n- Added new structured references for migration strategy, mapping, and execution checklist, shifting detailed guidance out of SKILL.md and into dedicated files.\n- Updated constraints to clarify requirements for code, visual, and functional verification; now mandates automated or manual regression checks for key user flows.\n- Refined guidance around icons, images, and inline styles, allowing well-justified exceptions and defining validation procedures.\n- Removed inlined concept mapping tables and phased migration steps from SKILL.md—these are now loaded from external reference files for better maintainability.\n- skill-card.md removed; migration documentation and references now provided through updated materials.\n\nv2.5.0 | 2026-06-03T12:24:30.694Z | user\n\n- Skill renamed to `fec-legacy-to-modern-migration` for improved clarity and consistency.\n- Refined and clarified usage description and triggers; now explicitly excludes routine legacy bug fixes unless involving a stack migration.\n- Added internationalization (i18n) requirements and checklist items for new code and migration scenarios.\n- Reorganized sample report location: expects reference loading from `references/migration-report-template.md`.\n- Added files: `README.md`, `metadata.json`, `package.json`, and migration report template; removed unused `skill-card.md`.\n- General wording improvements, consistent table formatting, and enforced stricter output and implementation guidance.\n\nArchive index:\n\nArchive v2.9.0: 10 files, 12613 bytes\n\nFiles: LICENSE (1089b), metadata.json (1993b), package.json (1191b), README.md (1325b), references/migration-execution-checklist.md (8631b), references/migration-report-template.md (751b), references/migration-strategy-and-mapping.md (3428b), skill-card.md (2014b), SKILL.md (5036b), _meta.json (149b)\n\nFile v2.9.0:SKILL.md\n\n---\nname: fec-legacy-to-modern-migration\ndescription: Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include legacy projects, technology stack upgrades, jQuery migration.\n---\n\n# Migration from traditional front-end to modern framework\n\nSuitable for scenarios where you are gradually migrating JavaScript + jQuery + HTML/CSS multi-page applications (MPA), server-side template rendering projects, or legacy framework code to React, Vue, Next.js, Nuxt, TypeScript, or retaining MPA form but modernizing modules, builds, types, and tests.\n\n## Purpose\n\nGuide the gradual migration of traditional front-end projects to the target modern stack, provide migration strategies, concept mapping, phased steps and implementation constraints to ensure functional equivalence and controllable risks.\n\n## Procedure\n\n1. First identify the target stack, migration boundaries and whether to retain the MPA/server template form.\n2. Load [references/migration-strategy-and-mapping.md](references/migration-strategy-and-mapping.md), select a progressive or one-time rewrite strategy, and clarify the mapping of legacy patterns to the target stack.\n3. Load [references/migration-execution-checklist.md](references/migration-execution-checklist.md) to complete inventory inventory, dependency analysis, prioritization and phased migration plan.\n4. When writing a migration analysis or migration plan report, load [references/migration-report-template.md](references/migration-report-template.md).\n5. Advance in the order of preparation, base layer, module/page migration, and closing, migrating one verifiable unit at a time.\n6. Each migration unit verifies functional equivalence, visual consistency, type safety, accessibility, i18n, resource and style boundaries.\n\n## Constraints\n\n- Before migration, a migration analysis report must be output to clarify strategies, priorities and risks.\n- Do not change the architecture, UI, and interfaces at the same time in one migration.\n- Prioritize functional equivalence before considering optimization and modernization.\n- Keep the old system operational during the migration process to avoid a big bang rollout.\n- When there is no ready replacement for the jQuery plug-in, you can temporarily embed it using iframe or micro-front-end and wait for subsequent replacement.\n- The target stack first identifies React/Vue/Next/Nuxt, modern MPA or partial modernization targets, and does not force the change to SPA by default.\n- Images use original project resources; the icon system prefers to use the original project or target project specifications; inline SVG exceptions must have accessibility, componentization or maintenance reasons.\n- The style refers to the original project effect but does not copy CSS. The target project style system is preferred; inline style exceptions must be local and interpretable.\n- The goal is to have consistent visuals and interactions, make the code simpler and easier to maintain, and business functions must not be missing.\n- For migrations involving pages, components, routing, forms, pop-ups, navigation or key user processes, a list of behaviors before and after refactoring must be established, and the critical paths must be compared and verified using Playwright or an equivalent real browser verification method.\n- For visually sensitive pages, screenshot comparison or manual screenshot acceptance should be supplemented; dynamic content, animation, fonts and environmental differences need to be clearly blocked, stabilized or explained.\n- For pure logic, type, build or UI-less migrations, Playwright is not forced and a validation layer closer to risk should be chosen: type-check, unit test, component test, build or lint.\n- The verification goal is not to be completely consistent at the pixel level, but to confirm that there are no missing business functions, key interactions are equivalent, there are no unexpected deviations in the main visual layout, and the code is clearer and maintainable than the old implementation.\n\n## Expected Output\n\n- The migration analysis report is saved as `reports/migration-plan-YYYY-MM-DD-HHmmss.md`, including strategy selection, inventory inventory, dependencies, phased steps, risks and rollback plans.\n- The migrated business functions are completely equivalent to those of the original project, with no missing functions.\n- The visuals and interactions are consistent with the original project, and there is no perceived difference for users.\n- Complete type definition, no `any` abuse, unified API calls and type safety.\n- Images use original project resources, and styles enter the target project style system. Exceptions for icons and inline styles have clear reasons.\n- The new code copy has been i18n, and the critical path is covered by tests.\n\nFile v2.9.0:README.md\n\n# Legacy system migration\n\nPlan an intentional migration from jQuery, templates, or older frontend stacks to modern modules.\n\n## Skill\n\n- ID: `fec-legacy-to-modern-migration`\n- Category: `legacy-migration`\n- Version: `2.9.0`\n- Source: `skills/fec-legacy-to-modern-migration/SKILL.md`\n\n## Description\n\nUse when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include legacy projects, technology stack upgrades, jQuery migration.\n\n## Usage\n\nInstall or import this package with any skill runtime that understands the standard `SKILL.md` layout. The canonical source remains the Frontend Craft repository.\n\n## Packaged Files\n\n- [references/migration-execution-checklist.md](references/migration-execution-checklist.md)\n- [references/migration-report-template.md](references/migration-report-template.md)\n- [references/migration-strategy-and-mapping.md](references/migration-strategy-and-mapping.md)\n\n## Optional Related Packages\n\n- `@bovinphang/fec-legacy-web-standard`\n- `@bovinphang/fec-react-project-standard`\n- `@bovinphang/fec-vue3-project-standard`\n\n## License\n\nMIT\n\nFile v2.9.0:_meta.json\n\n{\n  \"ownerId\": \"kn7b0nh7hvj1pffeqc8y0dqwwh83m726\",\n  \"slug\": \"fec-legacy-to-modern-migration\",\n  \"version\": \"2.9.0\",\n  \"publishedAt\": 1790435033463\n}\n\nFile v2.9.0:references/migration-execution-checklist.md\n\n# Migration execution and checklist\n\n## Pre-migration analysis\n\nBefore starting the migration, the following analysis must be completed and a **migration analysis report** must be output:\n\n1. **Inventory Count**\n   - Number of pages and number of functional modules\n   - Dependent jQuery plugins and alternatives (such as DataTables → TanStack Table)\n   - Existing API calling methods and whether there is unified encapsulation\n   - Are there any server-side templates (JSP/Thymeleaf/EJS, etc.) that need to be retained, partially replaced, or changed to pure front-end rendering?\n   - Is the target stack React/Vue/Next/Nuxt, modern MPA, or just partial TypeScript/build/test modernization?\n\n2. **Dependencies**\n   - JS/CSS modules shared between pages\n- Business logic reused across pages\n   - Interface contract with the backend (whether it needs to be adjusted)\n\n3. **Migration Priority**\n   - Sort by business value, complexity, coupling degree\n   - Prioritize migrating independent modules and low-coupling pages\n   - Identify reusable utility functions, constants, and type definitions\n\n## Phased migration process\n\n### Phase 0: Preparation\n\n- Build or identify target project skeleton: React/Vue/Next/Nuxt, modern MPA, or progressive TypeScript/build entry within existing projects\n- Configure ESLint, Prettier, and test framework\n- Establish `services/request.ts` unified request layer, compatible with existing API\n- Gradually migrate `utils` and `constants` in legacy projects and add types\n\n### Phase 1: Base Layer\n\n- Migrate and type API calls (`$.ajax` → `axios`/`fetch`)\n- Migration tool functions (date, formatting, verification, etc.)\n- Migrate constants, enumerations, and type definitions\n- Establish target navigation/page entry skeleton; unmigrated pages can continue to use old routing, redirection, iframe or micro-front-end embedding\n\n### Phase 2: Migration by module/page\n\n- Migrate one complete feature or page at a time\n- From simple to complex: static page → list page → form page → complex interactive page\n- Extract reusable components during migration, following the directory structure of the target React or Vue project\n- Supplementary unit testing and E2E critical path for each completed module\n\n### Phase 3: Closing\n\n- Remove or freeze old code entries according to the migration strategy; if MPA is retained, the old entries will be converged and the modernization boundary will be completed\n- Configure 404, error boundaries, and global error handling\n- Performance optimization (lazy loading, code splitting, caching strategy)\n- Document updates and deployment process adjustments\n\n## Refactoring implementation requirements\n\nThe following implementation constraints need to be followed when migrating to ensure consistent vision and interaction, and the code is simpler and easier to maintain.\n\n### Pictures and Icons\n\n- Directly use the image resource path of the original project without rehosting or replacing it.\n- SVG images (`<img src=\"*.svg\" />` or CSS `background-image`) can be used; when icon components or accessible interactions require inline SVG, the target project icon specifications should be followed and the reasons should be explained.\n- If the original project uses iconfont or IcoMoon icons, priority should be given to continuing to use them during reconstruction to keep the icon system consistent; visual consistency, packaging, and maintenance costs need to be evaluated before replacing with other icon schemes.\n- For icons, priority is given to using existing icon files in the original project (iconfont / IcoMoon / existing SVG). If necessary, SVG files can be introduced as independent resources\n\n### Internationalization (i18n)\n\n- User-visible copy in the new stack code (React/Vue, etc.) must follow the project i18n, and do not hardcode Chinese/English copy in the new code\n- **Do not add** user-visible hard-coded copy in legacy HTML/JS, unless it is purely static and the warehouse does not yet have an available i18n access point; before changing the copy, check whether locales already has an entry, and synchronize the main language files\n- Keys are organized by page/module/semantics, and existing keys are reused; mapping transition is only done when the old key is an external contract. For details, see **Internationalization (i18n)** in the project rules (\"Legacy Code and Migration Scenarios\" in `templates/shared/rules/fec-i18n.md`)\n\n### Style\n\n- The layout style aligns with the visual effects of the original project, but **only refers to the original project effects and does not copy its CSS**\n- Prioritize the use of **flex elastic layout** to avoid `float`, complex `position`, and redundant nesting\n- Avoid unreasonable writing methods: such as `!important` abuse, excessively deep selectors, and repeated definitions\n- Prioritize to avoid inline styles (`style={{ ... }}` / `style=\"...\"`) in components; when it is necessary to use runtime dynamic values, third-party component APIs or CSS variable bridging, they should be kept local and interpretable and put into the target project style system first.\n\n### Target\n\n- **Visual and interactive**: consistent with the original project, no perceived difference by users\n- **Code Quality**: more concise, easier to maintain, and in line with the target framework specifications\n- **Business functions**: consistent with the original project, **no missing functions**; behaviors before and after migration are equivalent\n\n### Verification layering\n\n- If it involves the migration of pages, components, routing, forms, pop-ups, navigation or key user processes, first establish a list of behaviors before and after refactoring, and then use Playwright or an equivalent real browser verification method to compare and verify the critical paths.\n- For visually sensitive pages, supplement screenshot comparison or manual screenshot acceptance; dynamic content, animation, fonts and environmental differences need to be clearly blocked, stabilized or explained.\n- For pure logic, type, build or UI-less migrations, Playwright is not forced and a validation layer closer to risk should be chosen: type-check, unit test, component test, build or lint.\n- The verification goal is not to be completely consistent at the pixel level, but to confirm that there are no missing business functions, key interactions are equivalent, there are no unexpected deviations in the main visual layout, and the code is clearer and maintainable than the old implementation.\n\n## Migration Checklist\n\nAfter each migration unit is completed, confirm:\n\n- [ ] A behavioral list before and after refactoring has been established, covering public APIs, routing, forms, permissions, error status, cache, hidden points and key interactions\n- [ ] The business logic is consistent with the old implementation, no functions are missing, and the functions are completely equivalent.\n- [ ] Migration involving UI, interaction or critical processes has completed critical path comparison using Playwright or equivalent real browser verification\n- [ ] For visually sensitive pages, screenshot comparison or manual screenshot acceptance has been completed, and the method of handling differences in dynamic content, animation, fonts and environment has been explained.\n- [ ] Pure logic, type, build or no UI migrations have selected a validation layer that is closer to the risk and do not force the application of Playwright\n- [ ] Type definition is complete, no `any` abuse\n- [ ] API calls use a unified request layer, with complete error handling\n- [ ] Form verification, loading, empty state, and error state have been implemented\n- [ ] Accessibility: The form has a label and can be interacted with via the keyboard.\n- [ ] No XSS risk (user input is escaped or secure API is used)\n- [ ] Critical path has test coverage\n- [ ] Comply with the project specifications of the target stack (React / Vue / Next / Nuxt / MPA modernization, etc.)\n- [ ] Pictures use original project resources; icon systems give priority to the original project or target project specifications, exceptions have been explained\n- [ ] The style refers to the original project effect but does not copy the CSS. The target project style system is used first. The inline style exception has been explained.\n- [ ] The visual and interaction are consistent with the original project, and the code is simpler and easier to maintain.\n- [ ] The new code path copy has been i18n; the legacy layer has not been expanded and hardcoded; locales retrieval and multi-language synchronization have been completed (see i18n rule migration supplementary list)\n\nFile v2.9.0:references/migration-report-template.md\n\n# Migration analysis report template\n\n```markdown\n# Migration analysis report\n\n> Generation time: YYYY-MM-DD HH:mm\n> Review tool: frontend-craft\n\n## Strategy selection\n- Progressive/one-time rewrite:\n- Reason:\n\n## Inventory inventory\n- Number of pages:\n- Function modules:\n- jQuery plugin:\n- Server template:\n- API calling method:\n\n## Dependencies\n- Share JS/CSS:\n- Cross-page logic:\n- Backend interface contract:\n\n## Migration priority\n- First batch:\n- Second batch:\n- Suspension:\n\n## Phased steps\n- Stage 0:\n- Stage 1:\n- Stage 2:\n- Stage 3:\n\n## Risk and rollback\n- Risk:\n- Rollback plan:\n```\n\nAfter migration analysis or planning is completed, save the report to `reports/migration-plan-YYYY-MM-DD-HHmmss.md` and inform the user of the report path.\n\nFile v2.9.0:references/migration-strategy-and-mapping.md\n\n# Migration strategy and concept mapping\n\n## Migration strategy selection\n\n| Strategy | Applicability | Advantages | Risks |\n| --------------------------- | ------------------------------------ | ---------------------------- | ---------------------------- |\n| **Progressive (Strangler Fig)** | Large-scale projects, requiring continuous delivery, and insufficient team familiarity | Risks are controllable, can be launched in batches, and can be rolled back | Old and new coexist for a long time, and two sets of codes need to be maintained |\n| **One-time rewrite** | Small and medium-sized projects, stable business, sufficient time window | Clear target architecture, no historical baggage | Long cycle, high pressure to go online, difficult rollback |\n\n**Recommendation**: Prioritize the incremental approach unless the project is small and the business is simple.\n\n## Concept mapping\n\n### jQuery → React\n\n| Legacy Patterns | React Correspondence |\n| ------------------------------------------ | -------------------------------------- |\n| `$(selector).html(content)` | Declarative JSX + state-driven rendering |\n| `$(document).on('click', '.btn', handler)` | `onClick` + event delegation is handled by React |\n| `$.ajax()` / `$.get()` | Project request layer, `fetch` / `axios`, can be connected to TanStack Query or SWR on demand |\n| Global variables/namespace storage state | Local state, Context or the existing store of the project can be used as needed Zustand/Redux |\n| `$(el).show()` / `$(el).hide()` | Conditional rendering `{visible && <Component />}` |\n| Manual DOM operations `append` / `remove` | Data-driven, triggering re-rendering through setState |\n| Template string concatenation HTML | JSX component + props |\n| Multiple pages + server-side routing | React Router client-side routing |\n\n### jQuery → Vue 3\n\n| Legacy Mode | Vue 3 Compatibility |\n| ------------------------------------------ | -------------------------------------------------- |\n| `$(selector).html(content)` | Template + `ref` / `reactive` driven rendering |\n| `$(document).on('click', '.btn', handler)` | `@click` + event modifier |\n| `$.ajax()` / `$.get()` | Project request layer, `fetch` / `axios`, can be connected to VueUse, Nuxt `useFetch` or TanStack Query Vue adapter as needed |\n| Global variables / Namespace storage state | `ref` / `reactive` / Pinia |\n| `$(el).show()` / `$(el).hide()`            | `v-show` / `v-if`                                  |\n| Manual DOM manipulation | Data-driven, with responsive view updates |\n| Template string concatenation HTML | Single file component `<template>` + props |\n| Multiple pages + server-side routing | Vue Router client-side routing |\n\n### Universal mapping\n\n| Legacy Concepts | Modern Correspondence |\n| --------------------------------- | ------------------------------------------ |\n| Page-level JS entry (one script per page) | Routing/page entry + lazy loading module, or retain MPA entry and modernize packaging |\n| Public JS modules (utils, ajax packaging) | `services/`, `utils/`, typed API layer |\n| Inline styles / page-level CSS | Target project style system, such as CSS Modules, Tailwind, global style layering or component library styles |\n| Server-side template variables | Obtain via API, SSR/loader injection, or preserve server-side template boundaries and typed data |\n| Form submission + full page refresh | Form library + client verification + API call |\n\nFile v2.9.0:skill-card.md\n\n## Description:\n\nGuides developers through phased migration of legacy frontend applications to a modern stack while preserving behavior and visual consistency.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[bovinphang](https://clawhub.ai/user/bovinphang)\n\n### License/Terms of Use:\n\nMIT\n\n## Use Case:\n\nFrontend developers and engineering teams use this skill to plan and implement incremental migration of jQuery, server-rendered, or older framework applications while checking functional equivalence and rollback options.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Refactoring a legacy frontend may change business behavior or disrupt existing pages.\n\nMitigation: Review and approve the migration plan before code changes; migrate in small units, compare critical user paths in a browser, and preserve a rollback path.\n\n## Reference(s):\n\n- [Migration strategy and mapping](references/migration-strategy-and-mapping.md)\n- [Migration execution checklist](references/migration-execution-checklist.md)\n- [Migration report template](references/migration-report-template.md)\n- [Project repository listed in package metadata](https://github.com/bovinphang/frontend-craft)\n- [ClawHub skill listing](https://clawhub.ai/bovinphang/skills/fec-legacy-to-modern-migration)\n\n## Skill Output:\n\n**Output Type(s):** [Markdown, Code, Configuration guidance]\n\n**Output Format:** [Markdown migration plan with optional frontend code and configuration changes]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Plan covers strategy, inventory, dependencies, phases, risks, validation, and rollback.]\n\n## Skill Version(s):\n\n2.9.0 (source: ClawHub release, README.md, package.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v2.9.0:metadata.json\n\n{\n  \"id\": \"fec-legacy-to-modern-migration\",\n  \"name\": \"Legacy system migration\",\n  \"category\": \"legacy-migration\",\n  \"tags\": [\n    \"migration\",\n    \"jquery\",\n    \"mpa\",\n    \"react\",\n    \"vue\",\n    \"modernization\"\n  ],\n  \"summary\": \"Plan an intentional migration from jQuery, templates, or older frontend stacks to modern modules.\",\n  \"version\": \"2.9.0\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://github.com/bovinphang/frontend-craft\",\n  \"repository\": \"https://github.com/bovinphang/frontend-craft\",\n  \"keywords\": [\n    \"legacy-migration\",\n    \"migration\",\n    \"jquery\",\n    \"mpa\",\n    \"react\",\n    \"vue\",\n    \"modernization\"\n  ],\n  \"platforms\": [\n    \"skills-cli\",\n    \"skillreg\",\n    \"claude-code\",\n    \"codex\",\n    \"cursor\",\n    \"opencode\",\n    \"openclaw\",\n    \"generic-skill-runtime\"\n  ],\n  \"description\": \"Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include legacy projects, technology stack upgrades, jQuery migration.\",\n  \"source\": \"skills/fec-legacy-to-modern-migration\",\n  \"references\": [\n    \"references/migration-execution-checklist.md\",\n    \"references/migration-report-template.md\",\n    \"references/migration-strategy-and-mapping.md\"\n  ],\n  \"relations\": {\n    \"relatedSkills\": [\n      \"fec-legacy-web-standard\",\n      \"fec-react-project-standard\",\n      \"fec-vue3-project-standard\"\n    ],\n    \"boundaryWorkflows\": [\n      \"Use a legacy workflow to understand the source jQuery or MPA code model before migration.\",\n      \"Use the target framework project workflow for React or Vue directory and component structure.\",\n      \"Use architecture planning for large migrations with high boundary and rollout risk.\"\n    ],\n    \"capabilityTags\": [\n      \"legacy\",\n      \"migration\",\n      \"modernization\"\n    ]\n  }\n}\n\nFile v2.9.0:package.json\n\n{\n  \"name\": \"@bovinphang/fec-legacy-to-modern-migration\",\n  \"version\": \"2.9.0\",\n  \"description\": \"Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include legacy projects, technology stack upgrades, jQuery migration.\",\n  \"type\": \"module\",\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Bovin Phang\",\n    \"email\": \"pengbaowen@msn.com\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/bovinphang/frontend-craft\",\n    \"directory\": \"skills/fec-legacy-to-modern-migration\"\n  },\n  \"homepage\": \"https://github.com/bovinphang/frontend-craft\",\n  \"keywords\": [\n    \"agent-skill\",\n    \"frontend-craft\",\n    \"legacy-migration\",\n    \"migration\",\n    \"jquery\",\n    \"mpa\",\n    \"react\",\n    \"vue\",\n    \"modernization\"\n  ],\n  \"files\": [\n    \"SKILL.md\",\n    \"references\",\n    \"scripts\",\n    \"data\",\n    \"assets\",\n    \"metadata.json\",\n    \"README.md\",\n    \"LICENSE\"\n  ],\n  \"publishConfig\": {\n    \"access\": \"public\"\n  }\n}\n\nFile v2.9.0:LICENSE\n\nMIT License\r\n\r\nCopyright (c) 2025 Bovin Phang\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\n\nArchive v2.7.0: 9 files, 12177 bytes\n\nFiles: metadata.json (1919b), package.json (1175b), README.md (1251b), references/migration-execution-checklist.md (6484b), references/migration-report-template.md (670b), references/migration-strategy-and-mapping.md (3790b), skill-card.md (2557b), SKILL.md (3958b), _meta.json (149b)\n\nFile v2.7.0:SKILL.md\n\n---\nname: fec-legacy-to-modern-migration\ndescription: Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include 遗留项目, 技术栈升级, jQuery 迁移.\n---\n\n# 传统前端到现代框架迁移\n\n适用于将 JavaScript + jQuery + HTML/CSS 多页面应用（MPA）、服务端模板渲染项目或旧框架代码，渐进迁移到 React、Vue、Next.js、Nuxt、TypeScript，或保留 MPA 形态但现代化模块、构建、类型和测试的场景。\n\n## Purpose\n\n指导传统前端项目渐进迁移到目标现代栈，提供迁移策略、概念映射、分阶段步骤和实施约束，确保功能等价和风险可控。\n\n## Procedure\n\n1. 先识别目标栈、迁移边界和是否保留 MPA/服务端模板形态。\n2. 加载 [references/migration-strategy-and-mapping.md](references/migration-strategy-and-mapping.md)，选择渐进式或一次性重写策略，并明确遗留模式到目标栈的映射。\n3. 加载 [references/migration-execution-checklist.md](references/migration-execution-checklist.md)，完成存量盘点、依赖分析、优先级排序和分阶段迁移计划。\n4. 撰写迁移分析或迁移计划报告时，加载 [references/migration-report-template.md](references/migration-report-template.md)。\n5. 按准备、基础层、模块/页面迁移、收尾的顺序推进，每次迁移一个可验证单元。\n6. 每个迁移单元验证功能等价、视觉一致、类型安全、可访问性、i18n、资源和样式边界。\n\n## Constraints\n\n- 迁移前必须先输出迁移分析报告，明确策略、优先级和风险。\n- 不要在一次迁移中同时改架构、改 UI、改接口。\n- 优先保证功能等价，再考虑优化和现代化。\n- 迁移过程中保持旧系统可运行，避免大爆炸式上线。\n- 遇到 jQuery 插件无现成替代时，可暂时用 iframe 或微前端方式嵌入，待后续替换。\n- 目标栈先识别 React/Vue/Next/Nuxt、现代 MPA 或局部现代化目标，不默认强制改成 SPA。\n- 图片使用原项目资源；图标体系优先沿用原项目或目标项目规范；内联 SVG 例外需有可访问性、组件化或维护理由。\n- 样式参考原项目效果但不照搬 CSS，优先使用目标项目样式体系；内联样式例外需局部、可解释。\n- 目标是视觉与交互一致、代码更简洁易维护，业务功能不得缺失。\n- 涉及页面、组件、路由、表单、弹窗、导航或关键用户流程的迁移，必须建立重构前后的行为清单，并使用 Playwright 或同等真实浏览器验证方式对关键路径做对比验证。\n- 对视觉敏感页面，应补充截图对比或人工截图验收；动态内容、动画、字体和环境差异需明确屏蔽、稳定化或说明。\n- 对纯逻辑、类型、构建或无 UI 的迁移，不强制 Playwright，应选择更贴近风险的验证层：type-check、unit test、component test、build 或 lint。\n- 验证目标不是像素级完全一致，而是确认业务功能无缺失、关键交互等价、主要视觉布局无非预期偏差，并且代码比旧实现更清晰、可维护。\n\n## Expected Output\n\n- 迁移分析报告保存为 `reports/migration-plan-YYYY-MM-DD-HHmmss.md`，包含策略选择、存量盘点、依赖关系、分阶段步骤、风险与回滚方案。\n- 迁移后的业务功能与原项目完全等价，无功能缺失。\n- 视觉与交互与原项目一致，用户无感知差异。\n- 类型定义完整，无 `any` 滥用，API 调用统一且类型安全。\n- 图片使用原项目资源，样式进入目标项目样式体系，图标和内联样式例外有明确理由。\n- 新代码文案已 i18n，关键路径有测试覆盖。\n\nFile v2.7.0:README.md\n\n# 遗留系统迁移\n\nFrontend Craft skill for 遗留系统迁移.\n\n## Skill\n\n- ID: `fec-legacy-to-modern-migration`\n- Category: `legacy-migration`\n- Version: `2.7.0`\n- Source: `skills/fec-legacy-to-modern-migration/SKILL.md`\n\n## Description\n\nUse when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include 遗留项目, 技术栈升级, jQuery 迁移.\n\n## Usage\n\nInstall or import this package with any skill runtime that understands the standard `SKILL.md` layout. The canonical source remains the Frontend Craft repository.\n\n## Packaged Files\n\n- [references/migration-execution-checklist.md](references/migration-execution-checklist.md)\n- [references/migration-report-template.md](references/migration-report-template.md)\n- [references/migration-strategy-and-mapping.md](references/migration-strategy-and-mapping.md)\n\n## Optional Related Packages\n\n- `@bovinphang/fec-legacy-web-standard`\n- `@bovinphang/fec-react-project-standard`\n- `@bovinphang/fec-vue3-project-standard`\n\n## License\n\nMIT\n\nFile v2.7.0:_meta.json\n\n{\n  \"ownerId\": \"kn7b0nh7hvj1pffeqc8y0dqwwh83m726\",\n  \"slug\": \"fec-legacy-to-modern-migration\",\n  \"version\": \"2.7.0\",\n  \"publishedAt\": 1781143925535\n}\n\nFile v2.7.0:references/migration-execution-checklist.md\n\n# 迁移执行与检查清单\n\n## 迁移前分析\n\n在动手迁移前，必须完成以下分析并输出**迁移分析报告**：\n\n1. **存量盘点**\n   - 页面数量、功能模块数量\n   - 依赖的 jQuery 插件及替代方案（如 DataTables → TanStack Table）\n   - 现有 API 调用方式、是否有统一封装\n   - 是否有服务端模板（JSP/Thymeleaf/EJS 等）需要保留、局部替换或改为纯前端渲染\n   - 目标栈是 React/Vue/Next/Nuxt、现代 MPA，还是只做局部 TypeScript/构建/测试现代化\n\n2. **依赖关系**\n   - 页面间共享的 JS/CSS 模块\n   - 跨页面复用的业务逻辑\n   - 与后端的接口契约（是否需调整）\n\n3. **迁移优先级**\n   - 按业务价值、复杂度、耦合度排序\n   - 优先迁移独立模块、低耦合页面\n   - 识别可复用的工具函数、常量、类型定义\n\n## 分阶段迁移流程\n\n### 阶段 0：准备\n\n- 搭建或识别目标项目骨架：React/Vue/Next/Nuxt、现代 MPA，或现有项目内的渐进式 TypeScript/构建入口\n- 配置 ESLint、Prettier、测试框架\n- 建立 `services/request.ts` 统一请求层，与现有 API 兼容\n- 将遗留项目中的 `utils`、`constants` 逐步迁移并补充类型\n\n### 阶段 1：基础层\n\n- 迁移并类型化 API 调用（`$.ajax` → `axios`/`fetch`）\n- 迁移工具函数（日期、格式化、校验等）\n- 迁移常量、枚举、类型定义\n- 建立目标导航/页面入口骨架；未迁移页面可继续走旧路由、重定向、iframe 或微前端嵌入\n\n### 阶段 2：按模块/页面迁移\n\n- 每次迁移一个完整功能或页面\n- 从简单到复杂：静态页 → 列表页 → 表单页 → 复杂交互页\n- 迁移时提取可复用组件，遵循目标 React 或 Vue 项目的目录结构\n- 每完成一个模块，补充单元测试和 E2E 关键路径\n\n### 阶段 3：收尾\n\n- 按迁移策略移除或冻结旧代码入口；若保留 MPA，则收敛旧入口并完成现代化边界\n- 配置 404、错误边界、全局错误处理\n- 性能优化（懒加载、代码分割、缓存策略）\n- 文档更新、部署流程调整\n\n## 重构实施要求\n\n迁移时需遵循以下实施约束，确保视觉与交互一致、代码更简洁易维护。\n\n### 图片与图标\n\n- 直接使用原项目的图片资源路径，不重新托管或替换\n- 可使用 SVG 图片（`<img src=\"*.svg\" />` 或 CSS `background-image`）；图标组件或可访问交互确需内联 SVG 时，应遵循目标项目图标规范并说明理由。\n- 若原项目使用了 iconfont 或 IcoMoon 图标，重构时优先继续使用，保持图标体系一致；替换为其他图标方案前需评估视觉一致性、包体和维护成本。\n- 图标优先使用原项目已有的图标文件（iconfont / IcoMoon / 已有 SVG），必要时可引入 SVG 文件作为独立资源\n\n### 国际化（i18n）\n\n- 新栈代码（React / Vue 等）中的用户可见文案须走项目 i18n，不在新代码里硬编码中/英文案\n- 遗留 HTML/JS 中**不要新增**用户可见硬编码文案，除非纯静态且仓库尚无可用 i18n 接入点；改动文案前先查 locales 是否已有条目，并同步主要语言文件\n- key 按页面/模块/语义组织，复用既有 key；仅当旧 key 为对外契约时才做映射过渡，详见项目规则中的 **国际化 (i18n)**（`templates/shared/rules/fec-i18n.md` 内「遗留代码与迁移场景」）\n\n### 样式\n\n- 布局样式对齐原项目视觉效果，但**只参考原项目效果，不照搬其 CSS**\n- 优先使用 **flex 弹性布局**，避免 `float`、复杂 `position`、冗余嵌套\n- 避免不合理写法：如 `!important` 滥用、过深选择器、重复定义\n- 组件中优先避免内联样式（`style={{ ... }}` / `style=\"...\"`）；确需使用运行时动态值、第三方组件 API 或 CSS 变量桥接时，应保持局部、可解释，并优先放入目标项目样式体系。\n\n### 目标\n\n- **视觉和交互**：与原项目一致，用户无感知差异\n- **代码质量**：更简洁、易维护，符合目标框架规范\n- **业务功能**：与原项目保持一致，**不得缺失功能**；迁移前后行为等价\n\n### 验证分层\n\n- 涉及页面、组件、路由、表单、弹窗、导航或关键用户流程的迁移，先建立重构前后的行为清单，再使用 Playwright 或同等真实浏览器验证方式对关键路径做对比验证。\n- 对视觉敏感页面，补充截图对比或人工截图验收；动态内容、动画、字体和环境差异需明确屏蔽、稳定化或说明。\n- 对纯逻辑、类型、构建或无 UI 的迁移，不强制 Playwright，应选择更贴近风险的验证层：type-check、unit test、component test、build 或 lint。\n- 验证目标不是像素级完全一致，而是确认业务功能无缺失、关键交互等价、主要视觉布局无非预期偏差，并且代码比旧实现更清晰、可维护。\n\n## 迁移检查清单\n\n每个迁移单元完成后，确认：\n\n- [ ] 已建立重构前后的行为清单，覆盖公共 API、路由、表单、权限、错误状态、缓存、埋点和关键交互\n- [ ] 业务逻辑与旧实现一致，无功能遗漏，功能完整等价\n- [ ] 涉及 UI、交互或关键流程的迁移已使用 Playwright 或同等真实浏览器验证方式完成关键路径对比\n- [ ] 视觉敏感页面已完成截图对比或人工截图验收，并说明动态内容、动画、字体和环境差异处理方式\n- [ ] 纯逻辑、类型、构建或无 UI 迁移已选择更贴近风险的验证层，不强制套用 Playwright\n- [ ] 类型定义完整，无 `any` 滥用\n- [ ] API 调用使用统一 request 层，错误处理完整\n- [ ] 表单校验、loading、空状态、错误状态已实现\n- [ ] 可访问性：表单有 label、交互可键盘操作\n- [ ] 无 XSS 风险（用户输入已转义或使用安全 API）\n- [ ] 关键路径有测试覆盖\n- [ ] 符合目标栈的项目规范（React / Vue / Next / Nuxt / MPA 现代化等）\n- [ ] 图片使用原项目资源；图标体系优先沿用原项目或目标项目规范，例外已说明\n- [ ] 样式参考原项目效果但不照搬 CSS，优先使用目标项目样式体系，内联样式例外已说明\n- [ ] 视觉与交互与原项目一致，代码更简洁易维护\n- [ ] 新代码路径文案已 i18n；遗留层未扩大硬编码；locales 检索与多语言同步已完成（参见 i18n 规则迁移补充清单）\n\nFile v2.7.0:references/migration-report-template.md\n\n# 迁移分析报告模板\n\n```markdown\n# 迁移分析报告\n\n> 生成时间: YYYY-MM-DD HH:mm\n> 评审工具: frontend-craft\n\n## 策略选择\n- 渐进式 / 一次性重写:\n- 理由:\n\n## 存量盘点\n- 页面数量:\n- 功能模块:\n- jQuery 插件:\n- 服务端模板:\n- API 调用方式:\n\n## 依赖关系\n- 共享 JS/CSS:\n- 跨页面逻辑:\n- 后端接口契约:\n\n## 迁移优先级\n- 第一批:\n- 第二批:\n- 暂缓:\n\n## 分阶段步骤\n- 阶段 0:\n- 阶段 1:\n- 阶段 2:\n- 阶段 3:\n\n## 风险与回滚\n- 风险:\n- 回滚方案:\n```\n\n迁移分析或计划完成后，将报告保存到 `reports/migration-plan-YYYY-MM-DD-HHmmss.md`，并告知用户报告路径。\n\nFile v2.7.0:references/migration-strategy-and-mapping.md\n\n# 迁移策略与概念映射\n\n## 迁移策略选择\n\n| 策略                        | 适用情况                             | 优点                         | 风险                         |\n| --------------------------- | ------------------------------------ | ---------------------------- | ---------------------------- |\n| **渐进式（Strangler Fig）** | 大型项目、需持续交付、团队熟悉度不足 | 风险可控、可分批上线、可回滚 | 新旧并存期长、需维护两套代码 |\n| **一次性重写**              | 中小型项目、业务稳定、有充足时间窗口 | 目标架构清晰、无历史包袱     | 周期长、上线压力大、回滚困难 |\n\n**推荐**：优先考虑渐进式，除非项目规模小且业务简单。\n\n## 概念映射\n\n### jQuery → React\n\n| 遗留模式                                   | React 对应                             |\n| ------------------------------------------ | -------------------------------------- |\n| `$(selector).html(content)`                | 声明式 JSX + state 驱动渲染            |\n| `$(document).on('click', '.btn', handler)` | `onClick` + 事件委托由 React 处理      |\n| `$.ajax()` / `$.get()`                     | 项目请求层、`fetch` / `axios`，可按需接 TanStack Query 或 SWR |\n| 全局变量 / 命名空间存储状态                | 局部 state、Context 或项目既有 store，可按需使用 Zustand/Redux |\n| `$(el).show()` / `$(el).hide()`            | 条件渲染 `{visible && <Component />}`  |\n| 手动 DOM 操作 `append` / `remove`          | 数据驱动，通过 setState 触发重渲染     |\n| 模板字符串拼接 HTML                        | JSX 组件 + props                       |\n| 多页面 + 服务端路由                        | React Router 客户端路由                |\n\n### jQuery → Vue 3\n\n| 遗留模式                                   | Vue 3 对应                                         |\n| ------------------------------------------ | -------------------------------------------------- |\n| `$(selector).html(content)`                | 模板 + `ref` / `reactive` 驱动渲染                 |\n| `$(document).on('click', '.btn', handler)` | `@click` + 事件修饰符                              |\n| `$.ajax()` / `$.get()`                     | 项目请求层、`fetch` / `axios`，可按需接 VueUse、Nuxt `useFetch` 或 TanStack Query Vue adapter |\n| 全局变量 / 命名空间存储状态                | `ref` / `reactive` / Pinia                         |\n| `$(el).show()` / `$(el).hide()`            | `v-show` / `v-if`                                  |\n| 手动 DOM 操作                              | 数据驱动，通过响应式更新视图                       |\n| 模板字符串拼接 HTML                        | 单文件组件 `<template>` + props                    |\n| 多页面 + 服务端路由                        | Vue Router 客户端路由                              |\n\n### 通用映射\n\n| 遗留概念                          | 现代对应                                   |\n| --------------------------------- | ------------------------------------------ |\n| 页面级 JS 入口（每页一个 script） | 路由/页面入口 + 懒加载模块，或保留 MPA 入口并现代化打包 |\n| 公共 JS 模块（utils、ajax 封装）  | `services/`、`utils/`、类型化 API 层       |\n| 内联样式 / 页面级 CSS             | 目标项目样式体系，如 CSS Modules、Tailwind、全局样式分层或组件库样式 |\n| 服务端模板变量                    | 通过 API 获取、SSR/loader 注入，或保留服务端模板边界并类型化数据 |\n| 表单提交 + 整页刷新               | 表单库 + 客户端校验 + API 调用             |\n\nFile v2.7.0:skill-card.md\n\n## Description:\n\nUse when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[bovinphang](https://clawhub.ai/user/bovinphang)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and frontend engineers use this skill to plan and execute controlled migrations from legacy JavaScript, jQuery, server-rendered templates, MPA code, or older frameworks to React, Vue, Next.js, Nuxt, TypeScript, or modernized MPA architectures while preserving existing behavior.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill may inspect and change files in a target project during migration work.\n\nMitigation: Review the generated migration plan and approve broad code changes only after the migration scope, priority, validation approach, and rollback plan are clear.\n\nRisk: Migration guidance can preserve visible behavior incorrectly if the legacy and modern implementations are not compared.\n\nMitigation: Use the skill's required behavior checklist and appropriate verification layer, such as Playwright, screenshot review, unit tests, type-checking, build, or lint, based on the migrated surface.\n\n## Reference(s):\n\n- [Migration Execution Checklist](references/migration-execution-checklist.md)\n- [Migration Report Template](references/migration-report-template.md)\n- [Migration Strategy and Mapping](references/migration-strategy-and-mapping.md)\n- [ClawHub Skill Page](https://clawhub.ai/bovinphang/skills/fec-legacy-to-modern-migration)\n- [Publisher Profile](https://clawhub.ai/user/bovinphang)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown plans, checklists, implementation guidance, code edits, configuration changes, and verification commands]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [May produce migration analysis reports under reports/migration-plan-YYYY-MM-DD-HHmmss.md when used for migration planning.]\n\n## Skill Version(s):\n\n2.7.0 (source: server release evidence and package.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v2.7.0:metadata.json\n\n{\n  \"id\": \"fec-legacy-to-modern-migration\",\n  \"name\": \"遗留系统迁移\",\n  \"category\": \"legacy-migration\",\n  \"tags\": [\n    \"migration\",\n    \"jquery\",\n    \"mpa\",\n    \"react\",\n    \"vue\",\n    \"modernization\"\n  ],\n  \"summary\": \"Frontend Craft skill for 遗留系统迁移.\",\n  \"version\": \"2.7.0\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://github.com/bovinphang/frontend-craft\",\n  \"repository\": \"https://github.com/bovinphang/frontend-craft\",\n  \"keywords\": [\n    \"legacy-migration\",\n    \"migration\",\n    \"jquery\",\n    \"mpa\",\n    \"react\",\n    \"vue\",\n    \"modernization\"\n  ],\n  \"platforms\": [\n    \"skills-cli\",\n    \"skillreg\",\n    \"claude-code\",\n    \"codex\",\n    \"cursor\",\n    \"opencode\",\n    \"openclaw\",\n    \"generic-skill-runtime\"\n  ],\n  \"description\": \"Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include 遗留项目, 技术栈升级, jQuery 迁移.\",\n  \"source\": \"skills/fec-legacy-to-modern-migration\",\n  \"references\": [\n    \"references/migration-execution-checklist.md\",\n    \"references/migration-report-template.md\",\n    \"references/migration-strategy-and-mapping.md\"\n  ],\n  \"relations\": {\n    \"relatedSkills\": [\n      \"fec-legacy-web-standard\",\n      \"fec-react-project-standard\",\n      \"fec-vue3-project-standard\"\n    ],\n    \"boundaryWorkflows\": [\n      \"Use a legacy workflow to understand the source jQuery or MPA code model before migration.\",\n      \"Use the target framework project workflow for React or Vue directory and component structure.\",\n      \"Use architecture planning for large migrations with high boundary and rollout risk.\"\n    ],\n    \"capabilityTags\": [\n      \"legacy\",\n      \"migration\",\n      \"modernization\"\n    ]\n  }\n}\n\nFile v2.7.0:package.json\n\n{\n  \"name\": \"@bovinphang/fec-legacy-to-modern-migration\",\n  \"version\": \"2.7.0\",\n  \"description\": \"Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include 遗留项目, 技术栈升级, jQuery 迁移.\",\n  \"type\": \"module\",\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Bovin Phang\",\n    \"email\": \"pengbaowen@msn.com\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/bovinphang/frontend-craft\",\n    \"directory\": \"skills/fec-legacy-to-modern-migration\"\n  },\n  \"homepage\": \"https://github.com/bovinphang/frontend-craft\",\n  \"keywords\": [\n    \"agent-skill\",\n    \"frontend-craft\",\n    \"legacy-migration\",\n    \"migration\",\n    \"jquery\",\n    \"mpa\",\n    \"react\",\n    \"vue\",\n    \"modernization\"\n  ],\n  \"files\": [\n    \"SKILL.md\",\n    \"references\",\n    \"scripts\",\n    \"data\",\n    \"assets\",\n    \"metadata.json\",\n    \"README.md\",\n    \"LICENSE\"\n  ],\n  \"publishConfig\": {\n    \"access\": \"public\"\n  }\n}\n\nArchive v2.5.0: 7 files, 9276 bytes\n\nFiles: metadata.json (1807b), package.json (1166b), README.md (1054b), references/migration-report-template.md (670b), skill-card.md (2438b), SKILL.md (10515b), _meta.json (149b)\n\nFile v2.5.0:SKILL.md\n\n---\nname: fec-legacy-to-modern-migration\ndescription: Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, or MPA legacy frontend code to React + TypeScript or Vue 3 + TypeScript while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include 遗留项目, 技术栈升级, jQuery 迁移.\n---\n\n# 传统前端到现代框架迁移\n\n适用于将 JavaScript + jQuery + HTML/CSS 多页面应用（MPA）或服务端模板渲染项目，迁移至 React + TypeScript 或 Vue 3 + TypeScript 单页面应用（SPA）的场景。\n\n## Purpose\n\n指导将 jQuery/MPA 传统前端项目渐进迁移至 React + TypeScript 或 Vue 3 + TypeScript，提供迁移策略、概念映射、分阶段步骤和实施约束，确保功能等价和风险可控。\n\n## 迁移策略选择\n\n| 策略                        | 适用情况                             | 优点                         | 风险                         |\n| --------------------------- | ------------------------------------ | ---------------------------- | ---------------------------- |\n| **渐进式（Strangler Fig）** | 大型项目、需持续交付、团队熟悉度不足 | 风险可控、可分批上线、可回滚 | 新旧并存期长、需维护两套代码 |\n| **一次性重写**              | 中小型项目、业务稳定、有充足时间窗口 | 目标架构清晰、无历史包袱     | 周期长、上线压力大、回滚困难 |\n\n**推荐**：优先考虑渐进式，除非项目规模小且业务简单。\n\n## 概念映射\n\n### jQuery → React\n\n| 遗留模式                                   | React 对应                             |\n| ------------------------------------------ | -------------------------------------- |\n| `$(selector).html(content)`                | 声明式 JSX + state 驱动渲染            |\n| `$(document).on('click', '.btn', handler)` | `onClick` + 事件委托由 React 处理      |\n| `$.ajax()` / `$.get()`                     | `fetch` / `axios` + React Query 或 SWR |\n| 全局变量 / 命名空间存储状态                | `useState` / `useContext` / Zustand    |\n| `$(el).show()` / `$(el).hide()`            | 条件渲染 `{visible && <Component />}`  |\n| 手动 DOM 操作 `append` / `remove`          | 数据驱动，通过 setState 触发重渲染     |\n| 模板字符串拼接 HTML                        | JSX 组件 + props                       |\n| 多页面 + 服务端路由                        | React Router 客户端路由                |\n\n### jQuery → Vue 3\n\n| 遗留模式                                   | Vue 3 对应                                         |\n| ------------------------------------------ | -------------------------------------------------- |\n| `$(selector).html(content)`                | 模板 + `ref` / `reactive` 驱动渲染                 |\n| `$(document).on('click', '.btn', handler)` | `@click` + 事件修饰符                              |\n| `$.ajax()` / `$.get()`                     | `fetch` / `axios` + VueUse `useFetch` 或 Vue Query |\n| 全局变量 / 命名空间存储状态                | `ref` / `reactive` / Pinia                         |\n| `$(el).show()` / `$(el).hide()`            | `v-show` / `v-if`                                  |\n| 手动 DOM 操作                              | 数据驱动，通过响应式更新视图                       |\n| 模板字符串拼接 HTML                        | 单文件组件 `<template>` + props                    |\n| 多页面 + 服务端路由                        | Vue Router 客户端路由                              |\n\n### 通用映射\n\n| 遗留概念                          | 现代对应                                   |\n| --------------------------------- | ------------------------------------------ |\n| 页面级 JS 入口（每页一个 script） | 路由 + 懒加载页面组件                      |\n| 公共 JS 模块（utils、ajax 封装）  | `services/`、`utils/`、类型化 API 层       |\n| 内联样式 / 页面级 CSS             | CSS Modules / Tailwind / styled-components |\n| 服务端模板变量                    | 通过 API 获取 + 前端状态管理               |\n| 表单提交 + 整页刷新               | 表单库 + 客户端校验 + API 调用             |\n\n## 迁移前分析\n\n在动手迁移前，必须完成以下分析并输出**迁移分析报告**：\n\n1. **存量盘点**\n   - 页面数量、功能模块数量\n   - 依赖的 jQuery 插件及替代方案（如 DataTables → TanStack Table）\n   - 现有 API 调用方式、是否有统一封装\n   - 是否有服务端模板（JSP/Thymeleaf/EJS 等）需改为纯前端渲染\n\n2. **依赖关系**\n   - 页面间共享的 JS/CSS 模块\n   - 跨页面复用的业务逻辑\n   - 与后端的接口契约（是否需调整）\n\n3. **迁移优先级**\n   - 按业务价值、复杂度、耦合度排序\n   - 优先迁移独立模块、低耦合页面\n   - 识别可复用的工具函数、常量、类型定义\n\n## 分阶段迁移流程\n\n### 阶段 0：准备\n\n- 搭建新项目脚手架（Vite + React/Vue + TypeScript）\n- 配置 ESLint、Prettier、测试框架\n- 建立 `services/request.ts` 统一请求层，与现有 API 兼容\n- 将遗留项目中的 `utils`、`constants` 逐步迁移并补充类型\n\n### 阶段 1：基础层\n\n- 迁移并类型化 API 调用（`$.ajax` → `axios`/`fetch`）\n- 迁移工具函数（日期、格式化、校验等）\n- 迁移常量、枚举、类型定义\n- 建立路由骨架，占位未迁移页面（重定向或 iframe 嵌入旧页面）\n\n### 阶段 2：按模块/页面迁移\n\n- 每次迁移一个完整功能或页面\n- 从简单到复杂：静态页 → 列表页 → 表单页 → 复杂交互页\n- 迁移时提取可复用组件，遵循目标 React 或 Vue 项目的目录结构\n- 每完成一个模块，补充单元测试和 E2E 关键路径\n\n### 阶段 3：收尾\n\n- 移除旧代码入口，全面切换至 SPA\n- 配置 404、错误边界、全局错误处理\n- 性能优化（懒加载、代码分割、缓存策略）\n- 文档更新、部署流程调整\n\n## 重构实施要求\n\n迁移时需遵循以下实施约束，确保视觉与交互一致、代码更简洁易维护。\n\n### 图片与图标\n\n- 直接使用原项目的图片资源路径，不重新托管或替换\n- 可使用 SVG 图片（`<img src=\"*.svg\" />` 或 CSS `background-image`），**禁止使用内联 SVG**（`<svg>...</svg>` 直接写在组件中）\n- **若原项目使用了 iconfont 或 IcoMoon 图标，重构时继续使用**，保持图标体系一致；不替换为其他图标方案（如独立 SVG、其他图标库）\n- 图标优先使用原项目已有的图标文件（iconfont / IcoMoon / 已有 SVG），必要时可引入 SVG 文件作为独立资源\n\n### 国际化（i18n）\n\n- 新栈代码（React / Vue 等）中的用户可见文案须走项目 i18n，不在新代码里硬编码中/英文案\n- 遗留 HTML/JS 中**不要新增**用户可见硬编码文案，除非纯静态且仓库尚无可用 i18n 接入点；改动文案前先查 locales 是否已有条目，并同步主要语言文件\n- key 按页面/模块/语义组织，复用既有 key；仅当旧 key 为对外契约时才做映射过渡，详见项目规则中的 **国际化 (i18n)**（`templates/shared/rules/fec-i18n.md` 内「遗留代码与迁移场景」）\n\n### 样式\n\n- 布局样式对齐原项目视觉效果，但**只参考原项目效果，不照搬其 CSS**\n- 优先使用 **flex 弹性布局**，避免 `float`、复杂 `position`、冗余嵌套\n- 避免不合理写法：如 `!important` 滥用、过深选择器、重复定义\n- **组件中禁止使用内联样式**（`style={{ ... }}` / `style=\"...\"`），样式统一放在 CSS Modules、Tailwind 类或样式文件中，便于维护\n\n### 目标\n\n- **视觉和交互**：与原项目一致，用户无感知差异\n- **代码质量**：更简洁、易维护，符合目标框架规范\n- **业务功能**：与原项目保持一致，**不得缺失功能**；迁移前后行为等价\n\n## 迁移检查清单\n\n每个迁移单元完成后，确认：\n\n- [ ] 业务逻辑与旧实现一致，无功能遗漏，功能完整等价\n- [ ] 类型定义完整，无 `any` 滥用\n- [ ] API 调用使用统一 request 层，错误处理完整\n- [ ] 表单校验、loading、空状态、错误状态已实现\n- [ ] 可访问性：表单有 label、交互可键盘操作\n- [ ] 无 XSS 风险（用户输入已转义或使用安全 API）\n- [ ] 关键路径有测试覆盖\n- [ ] 符合目标框架的项目规范（参考目标 React / Vue 项目约定）\n- [ ] 图片使用原项目资源，无内联 SVG；若原项目用 iconfont/IcoMoon 则继续使用\n- [ ] 样式参考原项目效果但不照搬 CSS，优先 flex 布局，无内联样式\n- [ ] 视觉与交互与原项目一致，代码更简洁易维护\n- [ ] 新代码路径文案已 i18n；遗留层未扩大硬编码；locales 检索与多语言同步已完成（参见 i18n 规则迁移补充清单）\n\n## Constraints\n\n- 迁移前必须先输出迁移分析报告，明确策略、优先级和风险\n- 不要在一次迁移中同时改架构、改 UI、改接口\n- 优先保证功能等价，再考虑优化和现代化\n- 迁移过程中保持旧系统可运行，避免大爆炸式上线\n- 遇到 jQuery 插件无现成替代时，可暂时用 iframe 或微前端方式嵌入，待后续替换\n- **图片与图标**：使用原项目图片资源，可用 SVG 文件，禁止内联 SVG；若原项目用 iconfont/IcoMoon 则继续使用\n- **样式**：参考原项目效果不照搬 CSS，优先 flex 布局，组件禁止内联样式\n- **目标**：视觉与交互一致、代码更简洁易维护，业务功能不得缺失\n\n## Detailed References\n\n撰写迁移分析或迁移计划报告时，加载 [references/migration-report-template.md](references/migration-report-template.md)。\n\n## Expected Output\n\n- 迁移分析报告保存为 `reports/migration-plan-YYYY-MM-DD-HHmmss.md`，包含策略选择、存量盘点、依赖关系、分阶段步骤、风险与回滚方案\n- 迁移后的业务功能与原项目完全等价，无功能缺失\n- 视觉与交互与原项目一致，用户无感知差异\n- 类型定义完整，无 `any` 滥用，API 调用统一且类型安全\n- 图片使用原项目资源，样式使用 flex 布局，无内联样式\n- 新代码文案已 i18n，关键路径有测试覆盖\n\nFile v2.5.0:README.md\n\n# 遗留系统迁移\n\nFrontend Craft skill for 遗留系统迁移.\n\n## Skill\n\n- ID: `fec-legacy-to-modern-migration`\n- Category: `legacy-migration`\n- Version: `2.5.0`\n- Source: `skills/fec-legacy-to-modern-migration/SKILL.md`\n\n## Description\n\nUse when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, or MPA legacy frontend code to React + TypeScript or Vue 3 + TypeScript while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include 遗留项目, 技术栈升级, jQuery 迁移.\n\n## Usage\n\nInstall or import this package with any skill runtime that understands the standard `SKILL.md` layout. The canonical source remains the Frontend Craft repository.\n\n## Packaged Files\n\n- [references/migration-report-template.md](references/migration-report-template.md)\n\n## Optional Related Packages\n\n- `@bovinphang/fec-legacy-web-standard`\n- `@bovinphang/fec-react-project-standard`\n- `@bovinphang/fec-vue3-project-standard`\n\n## License\n\nMIT\n\nFile v2.5.0:_meta.json\n\n{\n  \"ownerId\": \"kn7b0nh7hvj1pffeqc8y0dqwwh83m726\",\n  \"slug\": \"fec-legacy-to-modern-migration\",\n  \"version\": \"2.5.0\",\n  \"publishedAt\": 1780489470694\n}\n\nFile v2.5.0:references/migration-report-template.md\n\n# 迁移分析报告模板\n\n```markdown\n# 迁移分析报告\n\n> 生成时间: YYYY-MM-DD HH:mm\n> 评审工具: frontend-craft\n\n## 策略选择\n- 渐进式 / 一次性重写:\n- 理由:\n\n## 存量盘点\n- 页面数量:\n- 功能模块:\n- jQuery 插件:\n- 服务端模板:\n- API 调用方式:\n\n## 依赖关系\n- 共享 JS/CSS:\n- 跨页面逻辑:\n- 后端接口契约:\n\n## 迁移优先级\n- 第一批:\n- 第二批:\n- 暂缓:\n\n## 分阶段步骤\n- 阶段 0:\n- 阶段 1:\n- 阶段 2:\n- 阶段 3:\n\n## 风险与回滚\n- 风险:\n- 回滚方案:\n```\n\n迁移分析或计划完成后，将报告保存到 `reports/migration-plan-YYYY-MM-DD-HHmmss.md`，并告知用户报告路径。\n\nFile v2.5.0:skill-card.md\n\n## Description: <br>\nGuides developers migrating legacy JavaScript, jQuery, HTML/CSS, server-rendered templates, or MPA frontend code to React + TypeScript or Vue 3 + TypeScript while preserving behavior. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[bovinphang](https://clawhub.ai/user/bovinphang) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nDevelopers and engineers use this skill to plan and execute intentional frontend migrations from jQuery, server-rendered templates, or MPA legacy code to React + TypeScript or Vue 3 + TypeScript. It supports migration analysis, phased rollout planning, risk and rollback documentation, and behavior-preserving implementation guidance. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: Migration guidance or generated changes could alter legacy behavior, routing, API contracts, styling, or internationalized text. <br>\nMitigation: Require a migration analysis report, migrate in phases, preserve old-system rollback paths, and verify business parity with unit and end-to-end tests. <br>\nRisk: Modernizing legacy DOM and template code can introduce security issues such as unsafe HTML handling or missed input escaping. <br>\nMitigation: Review user-input rendering paths, avoid unsafe DOM injection, keep API calls behind the unified request layer, and scan proposed changes before deployment. <br>\n\n\n## Reference(s): <br>\n- [ClawHub skill page](https://clawhub.ai/bovinphang/fec-legacy-to-modern-migration) <br>\n- [Migration report template](references/migration-report-template.md) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, code, configuration, guidance] <br>\n**Output Format:** [Markdown migration reports, implementation guidance, and frontend code or configuration changes.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [May produce reports/migration-plan-YYYY-MM-DD-HHmmss.md and behavior-preserving React or Vue migration artifacts.] <br>\n\n## Skill Version(s): <br>\n2.5.0 (source: package.json, metadata.json, server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v2.5.0:metadata.json\n\n{\n  \"id\": \"fec-legacy-to-modern-migration\",\n  \"name\": \"遗留系统迁移\",\n  \"category\": \"legacy-migration\",\n  \"tags\": [\n    \"migration\",\n    \"jquery\",\n    \"mpa\",\n    \"react\",\n    \"vue\",\n    \"modernization\"\n  ],\n  \"summary\": \"Frontend Craft skill for 遗留系统迁移.\",\n  \"version\": \"2.5.0\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://github.com/bovinphang/frontend-craft\",\n  \"repository\": \"https://github.com/bovinphang/frontend-craft\",\n  \"keywords\": [\n    \"legacy-migration\",\n    \"migration\",\n    \"jquery\",\n    \"mpa\",\n    \"react\",\n    \"vue\",\n    \"modernization\"\n  ],\n  \"platforms\": [\n    \"skills-cli\",\n    \"skillreg\",\n    \"claude-code\",\n    \"codex\",\n    \"cursor\",\n    \"opencode\",\n    \"openclaw\",\n    \"generic-skill-runtime\"\n  ],\n  \"description\": \"Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, or MPA legacy frontend code to React + TypeScript or Vue 3 + TypeScript while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include 遗留项目, 技术栈升级, jQuery 迁移.\",\n  \"source\": \"skills/fec-legacy-to-modern-migration\",\n  \"references\": [\n    \"references/migration-report-template.md\"\n  ],\n  \"relations\": {\n    \"relatedSkills\": [\n      \"fec-legacy-web-standard\",\n      \"fec-react-project-standard\",\n      \"fec-vue3-project-standard\"\n    ],\n    \"boundaryWorkflows\": [\n      \"Use a legacy workflow to understand the source jQuery or MPA code model before migration.\",\n      \"Use the target framework project workflow for React or Vue directory and component structure.\",\n      \"Use architecture planning for large migrations with high boundary and rollout risk.\"\n    ],\n    \"capabilityTags\": [\n      \"legacy\",\n      \"migration\",\n      \"modernization\"\n    ]\n  }\n}\n\nFile v2.5.0:package.json\n\n{\n  \"name\": \"@bovinphang/fec-legacy-to-modern-migration\",\n  \"version\": \"2.5.0\",\n  \"description\": \"Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, or MPA legacy frontend code to React + TypeScript or Vue 3 + TypeScript while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include 遗留项目, 技术栈升级, jQuery 迁移.\",\n  \"type\": \"module\",\n  \"license\": \"MIT\",\n  \"author\": {\n    \"name\": \"Bovin Phang\",\n    \"email\": \"pengbaowen@msn.com\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/bovinphang/frontend-craft\",\n    \"directory\": \"skills/fec-legacy-to-modern-migration\"\n  },\n  \"homepage\": \"https://github.com/bovinphang/frontend-craft\",\n  \"keywords\": [\n    \"agent-skill\",\n    \"frontend-craft\",\n    \"legacy-migration\",\n    \"migration\",\n    \"jquery\",\n    \"mpa\",\n    \"react\",\n    \"vue\",\n    \"modernization\"\n  ],\n  \"files\": [\n    \"SKILL.md\",\n    \"references\",\n    \"scripts\",\n    \"data\",\n    \"assets\",\n    \"metadata.json\",\n    \"README.md\",\n    \"LICENSE\"\n  ],\n  \"publishConfig\": {\n    \"access\": \"public\"\n  }\n}","readmeExcerpt":"Skill: Legacy To Modern Migration Owner: bovinphang Summary: Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chi Tags: latest:2.9.0 Version history: v2.9.0 | 2026-09-26T15","codeSnippets":[],"executableExamples":[{"language":"markdown","snippet":"# Migration analysis report\n\n> Generation time: YYYY-MM-DD HH:mm\n> Review tool: frontend-craft\n\n## Strategy selection\n- Progressive/one-time rewrite:\n- Reason:\n\n## Inventory inventory\n- Number of pages:\n- Function modules:\n- jQuery plugin:\n- Server template:\n- API calling method:\n\n## Dependencies\n- Share JS/CSS:\n- Cross-page logic:\n- Backend interface contract:\n\n## Migration priority\n- First batch:\n- Second batch:\n- Suspension:\n\n## Phased steps\n- Stage 0:\n- Stage 1:\n- Stage 2:\n- Stage 3:\n\n## Risk and rollback\n- Risk:\n- Rollback plan:"},{"language":"markdown","snippet":"# 迁移分析报告\n\n> 生成时间: YYYY-MM-DD HH:mm\n> 评审工具: frontend-craft\n\n## 策略选择\n- 渐进式 / 一次性重写:\n- 理由:\n\n## 存量盘点\n- 页面数量:\n- 功能模块:\n- jQuery 插件:\n- 服务端模板:\n- API 调用方式:\n\n## 依赖关系\n- 共享 JS/CSS:\n- 跨页面逻辑:\n- 后端接口契约:\n\n## 迁移优先级\n- 第一批:\n- 第二批:\n- 暂缓:\n\n## 分阶段步骤\n- 阶段 0:\n- 阶段 1:\n- 阶段 2:\n- 阶段 3:\n\n## 风险与回滚\n- 风险:\n- 回滚方案:"},{"language":"markdown","snippet":"# 迁移分析报告\n\n> 生成时间: YYYY-MM-DD HH:mm\n> 评审工具: frontend-craft\n\n## 策略选择\n- 渐进式 / 一次性重写:\n- 理由:\n\n## 存量盘点\n- 页面数量:\n- 功能模块:\n- jQuery 插件:\n- 服务端模板:\n- API 调用方式:\n\n## 依赖关系\n- 共享 JS/CSS:\n- 跨页面逻辑:\n- 后端接口契约:\n\n## 迁移优先级\n- 第一批:\n- 第二批:\n- 暂缓:\n\n## 分阶段步骤\n- 阶段 0:\n- 阶段 1:\n- 阶段 2:\n- 阶段 3:\n\n## 风险与回滚\n- 风险:\n- 回滚方案:"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: fec-legacy-to-modern-migration\ndescription: Use when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include legacy projects, technology stack upgrades, jQuery migration.\n---\n\n# Migration from traditional front-end to modern framework\n\nSuitable for scenarios where you are gradually migrating JavaScript + jQuery + HTML/CSS multi-page applications (MPA), server-side template rendering projects, or legacy framework code to React, Vue, Next.js, Nuxt, TypeScript, or retaining MPA form but modernizing modules, builds, types, and tests.\n\n## Purpose\n\nGuide the gradual migration of traditional front-end projects to the target modern stack, provide migration strategies, concept mapping, phased steps and implementation constraints to ensure functional equivalence and controllable risks.\n\n## Procedure\n\n1. First identify the target stack, migration boundaries and whether to retain the MPA/server template form.\n2. Load [references/migration-strategy-and-mapping.md](references/migration-strategy-and-mapping.md), select a progressive or one-time rewrite strategy, and clarify the mapping of legacy patterns to the target stack.\n3. Load [references/migration-execution-checklist.md](references/migration-execution-checklist.md) to complete inventory inventory, dependency analysis, prioritization and phased migration plan.\n4. When writing a migration analysis or migration plan report, load [references/migration-report-template.md](references/migration-report-template.md).\n5. Advance in the order of preparation, base layer, module/page migration, and closing, migrating one verifiable unit at a time.\n6. Each migration unit verifies functional equivalence, visual consistency, type safety, accessibility, i18n, resource and style boundaries.\n\n## Constraints\n\n- Before migration, a migration analysis report must be output to clarify strategies, priorities and risks.\n- Do not change the architecture, UI, and interfaces at the same time in one migration.\n- Prioritize functional equivalence before considering optimization and modernization.\n- Keep the old system operational during the migration process to avoid a big bang rollout.\n- When there is no ready replacement for the jQuery plug-in, you can temporarily embed it using iframe or micro-front-end and wait for subsequent replacement.\n- The target stack first identifies React/Vue/Next/Nuxt, modern MPA or partial modernization targets, and does not force the change to SPA by default.\n- Images use original project resources; the icon system prefers to use the original project or target project specifications; inline SVG exceptions must have accessibility, componentization or maintenance reasons.\n- The style refers to the original project effect but does not copy CSS"},{"path":"README.md","content":"# Legacy system migration\n\nPlan an intentional migration from jQuery, templates, or older frontend stacks to modern modules.\n\n## Skill\n\n- ID: `fec-legacy-to-modern-migration`\n- Category: `legacy-migration`\n- Version: `2.9.0`\n- Source: `skills/fec-legacy-to-modern-migration/SKILL.md`\n\n## Description\n\nUse when planning or implementing an intentional migration from JavaScript, jQuery, HTML/CSS, server-rendered templates, MPA legacy frontend code, or older framework code toward a modern frontend stack while preserving behavior. Do not use for routine legacy bug fixes that stay in the old stack; Chinese triggers include legacy projects, technology stack upgrades, jQuery migration.\n\n## Usage\n\nInstall or import this package with any skill runtime that understands the standard `SKILL.md` layout. The canonical source remains the Frontend Craft repository.\n\n## Packaged Files\n\n- [references/migration-execution-checklist.md](references/migration-execution-checklist.md)\n- [references/migration-report-template.md](references/migration-report-template.md)\n- [references/migration-strategy-and-mapping.md](references/migration-strategy-and-mapping.md)\n\n## Optional Related Packages\n\n- `@bovinphang/fec-legacy-web-standard`\n- `@bovinphang/fec-react-project-standard`\n- `@bovinphang/fec-vue3-project-standard`\n\n## License\n\nMIT"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn7b0nh7hvj1pffeqc8y0dqwwh83m726\",\n  \"slug\": \"fec-legacy-to-modern-migration\",\n  \"version\": \"2.9.0\",\n  \"publishedAt\": 1790435033463\n}"},{"path":"references/migration-execution-checklist.md","content":"# Migration execution and checklist\n\n## Pre-migration analysis\n\nBefore starting the migration, the following analysis must be completed and a **migration analysis report** must be output:\n\n1. **Inventory Count**\n   - Number of pages and number of functional modules\n   - Dependent jQuery plugins and alternatives (such as DataTables → TanStack Table)\n   - Existing API calling methods and whether there is unified encapsulation\n   - Are there any server-side templates (JSP/Thymeleaf/EJS, etc.) that need to be retained, partially replaced, or changed to pure front-end rendering?\n   - Is the target stack React/Vue/Next/Nuxt, modern MPA, or just partial TypeScript/build/test modernization?\n\n2. **Dependencies**\n   - JS/CSS modules shared between pages\n- Business logic reused across pages\n   - Interface contract with the backend (whether it needs to be adjusted)\n\n3. **Migration Priority**\n   - Sort by business value, complexity, coupling degree\n   - Prioritize migrating independent modules and low-coupling pages\n   - Identify reusable utility functions, constants, and type definitions\n\n## Phased migration process\n\n### Phase 0: Preparation\n\n- Build or identify target project skeleton: React/Vue/Next/Nuxt, modern MPA, or progressive TypeScript/build entry within existing projects\n- Configure ESLint, Prettier, and test framework\n- Establish `services/request.ts` unified request layer, compatible with existing API\n- Gradually migrate `utils` and `constants` in legacy projects and add types\n\n### Phase 1: Base Layer\n\n- Migrate and type API calls (`$.ajax` → `axios`/`fetch`)\n- Migration tool functions (date, formatting, verification, etc.)\n- Migrate constants, enumerations, and type definitions\n- Establish target navigation/page entry skeleton; unmigrated pages can continue to use old routing, redirection, iframe or micro-front-end embedding\n\n### Phase 2: Migration by module/page\n\n- Migrate one complete feature or page at a time\n- From simple to complex: static page → list page → form page → complex interactive page\n- Extract reusable components during migration, following the directory structure of the target React or Vue project\n- Supplementary unit testing and E2E critical path for each completed module\n\n### Phase 3: Closing\n\n- Remove or freeze old code entries according to the migration strategy; if MPA is retained, the old entries will be converged and the modernization boundary will be completed\n- Configure 404, error boundaries, and global error handling\n- Performance optimization (lazy loading, code splitting, caching strategy)\n- Document updates and deployment process adjustments\n\n## Refactoring implementation requirements\n\nThe following implementation constraints need to be followed when migrating to ensure consistent vision and interaction, and the code is simpler and easier to maintain.\n\n### Pictures and Icons\n\n- Directly use the image resource path of the original project without rehosting or replacing it.\n- SVG images (`<img src=\"*.svg\" />` or CSS "},{"path":"references/migration-report-template.md","content":"# Migration analysis report template\n\n```markdown\n# Migration analysis report\n\n> Generation time: YYYY-MM-DD HH:mm\n> Review tool: frontend-craft\n\n## Strategy selection\n- Progressive/one-time rewrite:\n- Reason:\n\n## Inventory inventory\n- Number of pages:\n- Function modules:\n- jQuery plugin:\n- Server template:\n- API calling method:\n\n## Dependencies\n- Share JS/CSS:\n- Cross-page logic:\n- Backend interface contract:\n\n## Migration priority\n- First batch:\n- Second batch:\n- Suspension:\n\n## Phased steps\n- Stage 0:\n- Stage 1:\n- Stage 2:\n- Stage 3:\n\n## Risk and rollback\n- Risk:\n- Rollback plan:\n```\n\nAfter migration analysis or planning is completed, save the report to `reports/migration-plan-YYYY-MM-DD-HHmmss.md` and inform the user of the report path."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":null,"editorialQuality":{"score":100,"threshold":65,"status":"thin","wordCount":1671,"uniquenessScore":44,"reasons":["uniqueness-below-45"]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-11T23:40:35.588Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-11T23:40:35.588Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-14T06:57:06.745Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}