Sim Preview logo

Sim Preview

CommunityPopular
K9i-0
sim-preview

iOSシミュレーターで動くFlutterアプリをExpo Device HubとTailscale HTTPSでスマホのブラウザへ配信・操作するときに使う。

Overview

PublisherK9i-0
Repositoryccpocket
Skill namesim-preview
Stars
1.1K
Forks
115
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by K9i-0 on GitHub. Read the source before you install it.

Installation

Install the Sim Preview AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/K9i-0/ccpocket/tree/main/.claude/skills/sim-preview
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/K9i-0/ccpocket.git /tmp/ccpocket
mkdir -p .claude/skills
cp -r /tmp/ccpocket/.claude/skills/sim-preview .claude/skills/sim-preview
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Sim Preview in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Sim Preview on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Sim Preview is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Simulator Preview (Expo Device Hub)

MacのiOSシミュレーターを Expo Device Hub → Tailscale Serve (HTTPS) → スマホのブラウザ で配信する。Expoプロジェクトは不要。Flutterアプリをそのまま確認・操作できる。

既定はH.264・30fps・最大1000px・2.5Mbps。Device Hub 0.10.1でccpocketの配信を確認し、ユーザーから旧VNC方式より快適との評価を得た設定。TrollVNC / noVNCを既定に戻さない。

1. シミュレーターとアプリ

bash
xcrun simctl list devices booted

対象アプリが既に動いていれば再利用する。起動が必要な場合やhot reloadには mobile-automation を使う。テスト用Bridgeが必要なら8766を使い、本番8765を停止・再起動しない。

前提はMac + Xcode、Node.js/npm、MacとスマホのTailscale接続。CoreSimulatorへのアクセスがサンドボックスで拒否された場合は、シミュレーターの故障と判断せず適切な実行権限で再確認する。

2. Device Hubを起動

既存のDevice HubとTailscale Serveの状態を確認し、目的の配信が動いていれば再利用する。

bash
lsof -nP -iTCP:3400 -sTCP:LISTEN
tailscale serve status

新規起動には以下を使う。スクリプトはDevice Hubのみを起動し、アプリ起動やTailscale設定は別に行う。

bash
bash .claude/skills/sim-preview/scripts/sim-preview.sh
  • ローカル待受は 127.0.0.1:3400。npm経由で検証済みバージョンを取得し、リポジトリの依存関係は変更しない。
  • 長時間実行できるツールセッションで起動し、停止用のセッションID / PIDとログを控える。
  • 3400が使用中ならプロセスを勝手に停止せず、既存配信を確認するか SIM_PREVIEW_PORT=3401 などの空きポートを選ぶ。起動ログの実際のポートを確認する。
  • 更新時は対象バージョンの --help を確認する。配信設定の変更はブラウザの「Stream options」からも試せる。

3. Tailscale内限定のHTTPSを設定

リモートのH.264 / WebRTCにはHTTPSが必要。 http://<Tailscale IP>:3400 ではMJPEGへフォールバックする。localhostでH.264が動くだけではスマホ向け検証の完了にならない。

tailscale serve status に今回のHubを指す設定があれば再利用する。未設定なら、起動ログのポートに合わせて設定する。

bash
tailscale serve --bg --https=443 http://127.0.0.1:3400
  • 443に別サービスの設定がある場合は上書きせず、未使用のHTTPSポート(例: --https=8443)を選ぶ。
  • Serveが未有効なら、CLIが出力した有効化URLを案内する。ログインが必要ならユーザーに操作を依頼し、完了後に上記コマンドを再実行する。有効化だけでは転送設定が作成されないことがある。
  • 出力された https://<MacのDNS名>.ts.net[:port]/ を使う。ホスト名を固定値で書かない。
  • tailscale がPATHにない環境では /Applications/Tailscale.app/Contents/MacOS/Tailscale を確認する。
  • インターネット公開の tailscale funnel は使用しない。

4. 配信確認とユーザーへの案内

実際のHTTPS URLをブラウザで開き、以下を確認する。

  • 対象シミュレーターが Live になり、ccpocketの映像が表示される。
  • 「Stream options」でHTTP codecが H.264、Video FPSが 30 FPS、Max sizeが 1000 px、Video bitrateが 2.5 Mbps になっている(意図して調整した場合はその値)。

スマホのTailscaleをONにして開くHTTPSリンクを案内する。ユーザーにタップ・スクロール・文字入力の体感を試してもらい、Mac側の表示確認とスマホ側の確認結果を区別して報告する。遅延が残る場合は同画面で解像度やビットレートを調整して比較する。

初回のページ遷移がタイムアウトしても、再度画面状態を確認すると Live になっている場合がある。MJPEGになる場合はHTTPS URLとコーデック設定を確認する。

5. 継続・終了

プレビュー依頼中はDevice HubとHTTPS転送を残す。コード変更後のhot reloadはFlutter側で行い、配信画面で結果を確認する。

停止を依頼されたら、自分が起動したHubのセッションまたはPIDだけを停止する。今回追加したServe設定も不要になった場合のみ、対象HTTPSポートの転送を解除する。

bash
# 今回443に追加した転送を終了する場合。別ポートなら置き換える。
tailscale serve --https=443 off

既存の共有設定を巻き込む tailscale serve reset やプロセス名による一括killは使わない。

参照

  • Expo Device Hub: standalone起動と配信方式。
  • 起動オプション: npm exec --yes --package=expo-device-hub@0.10.1 -- expo-device-hub --help

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Sim Preview AI skill do?

iOSシミュレーターで動くFlutterアプリをExpo Device HubとTailscale HTTPSでスマホのブラウザへ配信・操作するときに使う。

Why use Sim Preview on TypingMind?

Because you install it once and use it with any model. Sim Preview is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Sim Preview in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/K9i-0/ccpocket/tree/main/.claude/skills/sim-preview. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Sim Preview?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Sim Preview?

As many as you like. As long as a model supports skills, you can use Sim Preview with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Sim Preview AI skill free?

Yes. It is published on GitHub by K9i-0 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇