Ui To Vue

by affaan-mef648e01899bNo license275K starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 3 days ago

UIスクリーンショットやデザインエクスポートをVue 3コンポーネントに一括変換する際に使用。Vant、Element Plus、Ant Design Vueに対応。

AI-generated overview

Converts UI design screenshots into Vue 3 Composition API components using Vant, Element Plus, or Ant Design Vue.

What it does
This skill guides the conversion of directories of UI screenshots and design exports into Vue 3 Composition API component code. It groups screenshots into page components, maps visual elements to Vant, Element Plus, or Ant Design Vue components, prioritizes cut-out image assets, and extracts repeated UI regions into shared components. It also documents a converter CLI run through npx, its options, a security and privacy section, an output review checklist, and troubleshooting steps.
When to use it
Use it when a user supplies a directory of design screenshots or design export images and the target application is Vue 3. It fits first-pass conversion of page components, shared components, and router wiring, especially when a specific component library such as Vant, Element Plus, or Ant Design Vue is named.
Requirements
Requires a DASHSCOPE_API_KEY environment variable and network access to run the npx [email protected] command; the skill itself ships no scripts and is instructions only.

UI To Vue

UIデザインのスクリーンショットをVue 3 Composition APIコンポーネントコードに一括変換します。

使用するタイミング

  • ユーザーがデザインスクリーンショットまたはデザインエクスポート画像のディレクトリを提供するとき。
  • ターゲットアプリケーションがVue 3のとき。
  • ユーザーがページコンポーネント、共有コンポーネント、ルーター配線の最初の変換を希望するとき。
  • ユーザーがVant、Element Plus、またはAnt Design Vueをコンポーネントライブラリとして指定するとき。

使用しないタイミング

  • ユーザーがスクリーンショット1枚のみで、特定のコンポーネントを希望するとき。
  • ターゲットプロジェクトがVueでないとき。
  • デザインが詳細なインタラクションロジック、データフロー、またはアクセシビリティレビューを必要とするとき。
  • スクリーンショットに外部モデルAPIに送信できないプライベートな顧客データが含まれるとき。

入力

モジュールとページ状態でスクリーンショットをグループ化したディレクトリを入力として使用します。

サポートされている切り出し画像ディレクトリ名:assets、icons、sprites、cut、images、cut-images。

変換モデル

  • ページグループ化:リスト、詳細、フォーム、ローディング、または空の状態を表す関連スクリーンショットを1つのページコンポーネントにまとめる。
  • UIライブラリマッピング:可能な限りネイティブのビジュアル要素をVant、Element Plus、またはAnt Design Vueコンポーネントにマッピングする。
  • 切り出し画像の優先順位:ページレベルのアセットを優先し、次にモジュールレベル、最後にグローバル共有アセット。
  • コンポーネント抽出:繰り返し使われるUIリージョンが2回以上現れる場合は共有コンポーネントに抽出する。

CLI使用方法

グローバルバイナリに依存せず、ドキュメントに記載されたコマンドが機能するように npx でコンバーターを実行します:

bash
export DASHSCOPE_API_KEY=your_keynpx [email protected] --input ./screenshots --ui vant --output ./src

オプション

オプション説明デフォルト
--inputデザイン画像ディレクトリ./screenshots
--uiUIライブラリ:vant、element-plus、または antd-vuevant
--output出力ディレクトリ./src
--config設定ファイルのパス./.ui-to-vue.config.json

セキュリティとプライバシー

  • デザインスクリーンショットを外部モデルAPIに送信される可能性があるソース素材として扱う。
  • 許可なくプライベートな顧客デザインでこのフローを実行しないこと。
  • 再現可能なワークフローでは @latest の代わりにコンバーターのバージョンを固定すること。
  • コミット前に生成されたVueコードをレビューすること。
  • .ui-to-vue.config.json、APIキー、生成されたシークレット、または顧客スクリーンショットをコミットしないこと。

出力レビューチェックリスト

  • ページコンポーネントが views/ または選択した出力ディレクトリの下に生成された。
  • 繰り返しのUIリージョンが再利用が明確な場合のみ components/ に抽出された。
  • ルーター出力がターゲットプロジェクトのルータースタイルと互換性がある。
  • 生成されたコンポーネントが要求したUIライブラリを一貫して使用している。
  • 生成されたCSSのユニットがデザインのベースラインと一致している。
  • コードがプロジェクトのフォーマッター、リンター、型チェッカー、ビルドをパスする。
  • プレースホルダーのコピー、モックデータ、生成されたアセットをコミット前にレビューした。

トラブルシューティング

問題確認事項
401 または認証エラーコマンドを実行するシェルで DASHSCOPE_API_KEY が設定されていることを確認する。
command not found: ui-to-vuenpx [email protected] の形式を使用するか、パッケージをグローバルインストールする。
切り出し画像が無視されるアセットディレクトリ名がサポートされており、対応するページまたはモジュールの下にネストされていることを確認する。
コンポーネントが要求されたUIライブラリを無視する明示的な --ui 値で再実行して、生成されたインポートを確認する。
生成されたレイアウトの寸法がおかしいスクリーンショットのエクスポート幅がターゲットライブラリのベースラインと一致していることを確認する。

リファレンス

  • npmパッケージ:ui-to-vue-converter

Source and attribution

Source:affaan-m/eccindocs/ja-JP/skills/ui-to-vueat commitef648e0

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal