qiankun
できること
このスキルは、実行時に読み込まれる、より小さなサブアプリを組み込むホストアプリをqiankunで作る方法を説明します。大きなフロントエンドを分割したいWeb開発者向けです。
使う場面
- ✓複数の独立したフロントエンドアプリを読み込むメインアプリを作りたいとき。
- ✓既存のViteアプリを、メインアプリから読み込めるマイクロなサブアプリにしたいとき。
- ✓ReactまたはVueでマイクロフロントエンドの読み込みを設定しているとき。
スキルのリンク
https://github.com/umijs/qiankun/blob/next/skills/qiankun/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“既存のVite Reactアプリを、メインのシェルから読み込めるqiankunのサブアプリに変換する手伝いをしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、作業に合った手引きを読み、ホストまたはサブアプリの手順に従います。部品同士が見つけ合えるように、ポートとアプリ名を固定して揃えます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
qiankun
qiankun is a micro-frontend framework: a main (host) app loads sub (micro) apps from their HTML entries at runtime, each inside a JS sandbox, with opt-in CSS isolation. This skill is the agent-facing manual for qiankun 3.x.
Task routing
Read only the reference file(s) the task at hand needs:
| Task | Read |
|---|---|
| Create a micro (sub) app, or convert an existing Vite app | references/create-micro-app.md |
| Create a main (host) app | references/create-main-app.md |
| Anything else — migration, style isolation, sandbox, debugging | https://qiankun.umijs.org and examples/ in https://github.com/umijs/qiankun |
Before you start
Determine these, asking the user only when not inferable from context:
- App type — main (host/shell) or sub (micro app).
- App name — lowercase letters, numbers, hyphens. The name the host registers must exactly match the name the sub app uses in its classic-mode fallback.
- Framework — React or Vue; TypeScript or JavaScript. Templates in the references are TS; strip types for JS.
- Dev port — must be fixed and unique per app, because the host hard-references it in
entry. Convention: main app7099, sub apps7101,7102, …
Package versions — until qiankun 3.0 stable ships, rc is the dist-tag for the core packages:
| Package | Dist-tag | Goes in |
|---|---|---|
qiankun |
rc |
main app dependencies |
@qiankunjs/react / @qiankunjs/vue |
rc |
main app dependencies (optional UI binding) |
@qiankunjs/bundler-plugin |
rc |
sub app devDependencies |
Key facts
These invariants shape every task below:
- Vite sub apps need no dedicated build mode. qiankun 3 loads
<script type="module">natively through its ESM sandbox — regularvite dev/vite buildoutput is qiankun-ready as-is. - The JS sandbox is on by default. CSS isolation is opt-in per app via
styleIsolation: true(runtime CSS@scope). - A sub app must stay runnable standalone: when not loaded by qiankun (
window.__POWERED_BY_QIANKUN__is undefined) it renders itself directly. - Always unmount what you mount.
loadMicroAppreturns a handle whose.unmount()must be called when the app leaves; theMicroAppcomponent bindings do this automatically on component unmount. Unmounted instances stay cached for reuse by app name; only.unload()/unloadMicroApp(name)releases them, and the bindings never call those. - Webpack sub apps use
@qiankunjs/bundler-plugin/webpackinstead of the Vite plugin; see the docs.
After any creation task
Verify the result following the checklist at the end of the reference you used. If a browser tool is available, perform the checks yourself instead of asking the user to.
よくある質問
どのバージョンを扱いますか?
qiankun 3.xの手引きです。コアパッケージの一部は、3.0の安定版が出るまではrcタグを使うと注意しています。
Vueもサポートされていますか?
はい。このスキルはReactとVueの両方を扱い、テンプレートはTypeScriptで書かれています。
移行やデバッグはどうですか?
メインアプリとサブアプリの作成を超える話題については、公式のqiankunのウェブサイトと例を案内します。
詳細
作者による元の説明
Usage manual for building micro-frontend projects with qiankun 3.x. Use when the user wants to create a qiankun main (host) app or sub (micro) app, convert an existing Vite app into a qiankun micro app, or wire up micro-frontend loading with React/Vue.
repo: umijs/qiankun
人気
- GitHubのスター
- 17k
- ランキング
- #10799
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。