Skip to content

feat: add ui-to-vue skill for batch UI-to-Vue conversion#1438

Open
EricLeeN1 wants to merge 3 commits intoaffaan-m:mainfrom
EricLeeN1:add-ui-to-vue-skill
Open

feat: add ui-to-vue skill for batch UI-to-Vue conversion#1438
EricLeeN1 wants to merge 3 commits intoaffaan-m:mainfrom
EricLeeN1:add-ui-to-vue-skill

Conversation

@EricLeeN1
Copy link
Copy Markdown

@EricLeeN1 EricLeeN1 commented Apr 15, 2026

Summary

  • Add new skill ui-to-vue for batch converting UI design screenshots to Vue 3 components
  • Support for Vant/Element Plus/Ant Design Vue UI libraries
  • Three-level cut image hierarchy (page > module > global)
  • Automatic public component extraction
  • Route configuration generation

Details

This skill enables users to quickly convert UI screenshots from tools like 蓝湖/Figma into production-ready Vue 3 Composition API code.

npm package: ui-to-vue-converter@1.0.2

GitHub repo: https://github.com/EricLeeN1/ui2VueConverter

Test Plan

  • Skill file follows marketplace conventions
  • Description uses "Use when..." pattern for discovery
  • Includes all necessary sections (When to Use, Usage, Common Mistakes, etc.)

🤖 Generated with Claude Code


Summary by cubic

Adds the ui-to-vue skill to batch-convert UI screenshots (Figma/蓝湖) into Vue 3 Composition API components. Registers the skill and documents secure setup.

  • New Features

    • Converts design folders to code via ui-to-vue-converter@1.0.2.
    • Maps to vant, element-plus, or antd-vue; auto-extracts shared components; generates routes.
    • Supports three-level cut images and outputs views/components/router.
  • Documentation and Setup

    • Rewrote SKILL.md in English with usage, config (DASHSCOPE_API_KEY), and troubleshooting.
    • Added origin: community and a warning to add .ui-to-vue.config.json to .gitignore.
    • Registered skills/ui-to-vue in manifests/install-modules.json.

Written for commit 5c591dd. Summary will update on new commits.

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive guide for the "UI to Vue Components" skill covering scope, conversion strategies, input/output structure, naming conventions, supported UI libraries, CLI usage and parameters, API key configuration priority, verification checklist, and troubleshooting.
  • Chores
    • Registered the new "UI to Vue Components" skill in the installation manifest for discovery by the framework installer.

Add a new skill that converts UI design screenshots (蓝湖/Figma/etc)
to Vue 3 Composition API components with support for:
- Vant/Element Plus/Ant Design Vue
- Three-level cut image hierarchy
- Automatic public component extraction
- Route configuration generation

npm package: ui-to-vue-converter@1.0.2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

📝 Walkthrough

Walkthrough

Added a new skill doc skills/ui-to-vue/SKILL.md describing batch conversion of UI designs to Vue 3 components, and registered skills/ui-to-vue in manifests/install-modules.json under the framework-language module.

Changes

Cohort / File(s) Summary
UI-to-Vue Skill Documentation
skills/ui-to-vue/SKILL.md
New ~147-line document describing applicable scenarios, constraints, core concepts (page-state grouping, element→UI-library mapping, slice priority, auto-extracted components), input/output conventions, supported UI libs, CLI usage/flags, API key priority, .gitignore snippet, troubleshooting, and checklist.
Module Manifest
manifests/install-modules.json
Added skills/ui-to-vue to the framework-language module paths array to register the new skill.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer/CLI
    participant FS as File System (designs & slices)
    participant Skill as UI-to-Vue Skill
    participant AI as External API (OCR / Model)
    participant Repo as Output (views/components/router)

    Dev->>FS: provide input directory & slices
    Dev->>Skill: run CLI (--input, --ui, --output, --config)
    Skill->>FS: read designs & slice files
    Skill->>AI: request conversion (layout -> Vue components)
    AI-->>Skill: return component code & assets
    Skill->>Repo: write generated views, components, router entries
    Skill-->>Dev: emit summary and verification checklist
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested reviewers

  • affaan-m

Poem

🐇 I nibble pixels, stitch each view,
Slices hum softly, components debut.
CLI hops in, I map and compose,
Vue doors swing open where designs rose.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a new 'ui-to-vue' skill for batch UI-to-Vue conversion, which is the primary objective of this pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 15, 2026

Greptile Summary

This PR adds a community skill (ui-to-vue) for batch-converting UI design screenshots to Vue 3 Composition API components using the ui-to-vue-converter npm package, and registers it in the install manifest. Previous review concerns (missing origin, manifest registration, .gitignore warning, and Chinese-only body) have all been addressed in this revision.

  • P1: The Usage section documents npm install ui-to-vue-converter (local install) but immediately runs ui-to-vue as a bare CLI command — this will fail with command not found for any user following the instructions exactly. Needs -g flag or npx.
  • P2: skills/ui-to-vue is inserted out of alphabetical order in manifests/install-modules.json (between frontend-slides and golang-patterns); it should follow springboot-verification.

Confidence Score: 4/5

Safe to merge after fixing the local-vs-global install mismatch that will cause the documented CLI workflow to fail.

One P1 issue remains: the install instructions produce a locally-installed package whose binary isn't on PATH, breaking the documented run step for every user. All prior review concerns have been resolved; only this one blocker and a minor ordering nit remain.

skills/ui-to-vue/SKILL.md — Usage section install/run mismatch

Important Files Changed

Filename Overview
skills/ui-to-vue/SKILL.md New community skill for batch UI-screenshot-to-Vue-3 conversion via ui-to-vue-converter npm package; has a P1 CLI install/usage mismatch that will break the documented workflow for users.
manifests/install-modules.json Registers the new skill correctly but inserts it out of alphabetical order between frontend-slides and golang-patterns instead of at the end (after springboot-verification).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User runs: npm install -g ui-to-vue-converter] --> B[Configure DASHSCOPE_API_KEY]
    B --> C{Config source}
    C -->|Env var| D[DASHSCOPE_API_KEY]
    C -->|Config file| E[.ui-to-vue.config.json]
    C -->|CLI flag| F[--config path]
    D & E & F --> G[Run: ui-to-vue --input ./screenshots --ui vant --output ./src]
    G --> H[Scan screenshot directory]
    H --> I[Three-level cut image resolution\nPage > Module > Global]
    I --> J[Qwen VL via DashScope API\nAnalyses each design image]
    J --> K{UI library}
    K -->|vant| L[Mobile H5 components\nrem units / 375px]
    K -->|element-plus| M[PC admin components\npx / 1920px]
    K -->|antd-vue| N[Enterprise components\npx / 1920px]
    L & M & N --> O[Output: views/ + components/ + router/index.js]
Loading

Reviews (4): Last reviewed commit: "fix: add trailing newline to SKILL.md" | Re-trigger Greptile

Comment thread skills/ui-to-vue/SKILL.md
Comment thread skills/ui-to-vue/SKILL.md
Comment thread skills/ui-to-vue/SKILL.md
Comment thread skills/ui-to-vue/SKILL.md Outdated
Comment thread skills/ui-to-vue/SKILL.md Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
skills/ui-to-vue/SKILL.md (2)

139-139: Add newline at end of file.

The file is missing a trailing newline, which is a common convention for text files.

📝 Suggested fix
 - GitHub: https://github.com/EricLeeN1/ui2VueConverter
 - npm: ui-to-vue-converter
+
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/ui-to-vue/SKILL.md` at line 139, Add a trailing newline to the end of
SKILL.md so the file ends with a newline character (ensure the final line "npm:
ui-to-vue-converter" is followed by a newline); this follows the text-file
convention and fixes the missing EOF newline.

137-139: Consider adding full npm URL for consistency.

The Resources section provides a full GitHub URL but only lists the npm package name. For consistency and easier access, consider adding the full npm URL.

📎 Suggested enhancement
 ## Resources
 
 - GitHub: https://github.com/EricLeeN1/ui2VueConverter
-- npm: ui-to-vue-converter
+- npm: https://www.npmjs.com/package/ui-to-vue-converter
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/ui-to-vue/SKILL.md` around lines 137 - 139, Update the Resources
section in SKILL.md to include the full npm URL for the package instead of (or
in addition to) just the package name; replace or augment the line "- npm:
ui-to-vue-converter" with "- npm:
https://www.npmjs.com/package/ui-to-vue-converter" so it matches the full GitHub
URL style already used and makes the npm link directly clickable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/ui-to-vue/SKILL.md`:
- Line 73: Replace or remove the broken GitHub repository reference
"https://github.com/EricLeeN1/ui2VueConverter" in SKILL.md: either update that
URL to the correct repository for the npm package "ui-to-vue-converter" (or the
package's official homepage) or delete the repository line entirely; ensure the
accompanying npm instruction ("npm install ui-to-vue-converter") and CLI mention
("ui-to-vue") remain accurate and, if adding a new link, verify it resolves and
points to the public repo or package homepage.

---

Nitpick comments:
In `@skills/ui-to-vue/SKILL.md`:
- Line 139: Add a trailing newline to the end of SKILL.md so the file ends with
a newline character (ensure the final line "npm: ui-to-vue-converter" is
followed by a newline); this follows the text-file convention and fixes the
missing EOF newline.
- Around line 137-139: Update the Resources section in SKILL.md to include the
full npm URL for the package instead of (or in addition to) just the package
name; replace or augment the line "- npm: ui-to-vue-converter" with "- npm:
https://www.npmjs.com/package/ui-to-vue-converter" so it matches the full GitHub
URL style already used and makes the npm link directly clickable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 447829be-9a66-41d0-bb38-8d193205cb88

📥 Commits

Reviewing files that changed from the base of the PR and between e0ddb33 and 0d5f9d3.

📒 Files selected for processing (1)
  • skills/ui-to-vue/SKILL.md

Comment thread skills/ui-to-vue/SKILL.md
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="skills/ui-to-vue/SKILL.md">

<violation number="1" location="skills/ui-to-vue/SKILL.md:2">
P1: This skill is not registered in `manifests/install-modules.json`. Without an entry there, the skill will never be installed by users running the ECC install flow, making this contribution functionally inert.</violation>

<violation number="2" location="skills/ui-to-vue/SKILL.md:138">
P2: User-facing skill doc adds an external GitHub repo link without evidence of org vetting, conflicting with repository supply-chain review policy.</violation>

<violation number="3" location="skills/ui-to-vue/SKILL.md:139">
P3: Markdown file is missing the required trailing newline, which can fail markdownlint (MD047) and block CI.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread skills/ui-to-vue/SKILL.md
Comment thread skills/ui-to-vue/SKILL.md

## Resources

- GitHub: https://github.com/EricLeeN1/ui2VueConverter
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: User-facing skill doc adds an external GitHub repo link without evidence of org vetting, conflicting with repository supply-chain review policy.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At skills/ui-to-vue/SKILL.md, line 138:

<comment>User-facing skill doc adds an external GitHub repo link without evidence of org vetting, conflicting with repository supply-chain review policy.</comment>

<file context>
@@ -0,0 +1,139 @@
+
+## Resources
+
+- GitHub: https://github.com/EricLeeN1/ui2VueConverter
+- npm: ui-to-vue-converter
\ No newline at end of file
</file context>
Fix with Cubic

Comment thread skills/ui-to-vue/SKILL.md Outdated
EricLeeN1 and others added 2 commits April 15, 2026 10:33
…tration, security warning

- Rewrite SKILL.md in English (repository convention)
- Add origin: community frontmatter
- Add security warning for API key config file (.gitignore)
- Register skill in manifests/install-modules.json (framework-language module)

Addresses:
- Missing manifest registration (skill wouldn't be distributed)
- Chinese-only body (inconsistent with English-first repository)
- Missing .gitignore warning for API key exposure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@EricLeeN1
Copy link
Copy Markdown
Author

I fixed it before,make check again

@EricLeeN1 EricLeeN1 closed this Apr 15, 2026
@EricLeeN1 EricLeeN1 reopened this Apr 15, 2026
Comment thread skills/ui-to-vue/SKILL.md
Comment on lines +73 to +85
# Install
npm install ui-to-vue-converter

# Configure API key (Qwen VL - Alibaba DashScope)
export DASHSCOPE_API_KEY=your_key
# Or create .ui-to-vue.config.json

# Run
ui-to-vue --input ./screenshots --ui vant --output ./src

# PC project
ui-to-vue --input ./designs --ui element-plus --output ./src
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Local install, global CLI mismatch

npm install ui-to-vue-converter installs the package locally in ./node_modules/.bin/, but the very next step runs ui-to-vue as a bare command. In a plain terminal, ./node_modules/.bin is not in $PATH, so users following these instructions will get command not found: ui-to-vue immediately. The install should either use -g for a global install, or the run step should use npx:

Suggested change
# Install
npm install ui-to-vue-converter
# Configure API key (Qwen VL - Alibaba DashScope)
export DASHSCOPE_API_KEY=your_key
# Or create .ui-to-vue.config.json
# Run
ui-to-vue --input ./screenshots --ui vant --output ./src
# PC project
ui-to-vue --input ./designs --ui element-plus --output ./src
```
# Install globally
npm install -g ui-to-vue-converter
# Configure API key (Qwen VL - Alibaba DashScope)
# Set DASHSCOPE_API_KEY env var, or create .ui-to-vue.config.json
# Run
ui-to-vue --input ./screenshots --ui vant --output ./src
# PC project
ui-to-vue --input ./designs --ui element-plus --output ./src

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant