🛠️ Medoアプリビルダー
百度(Baidu)のMedoプラットフォーム上で
📜 元の英語説明(参考)
Create, modify, generate, and deploy websites, web apps, dashboards, SaaS products, internal tools, interactive web pages, Weixin mini program , games on the Baidu Medo platform using natural-language instructions.
🇯🇵 日本人クリエイター向け解説
百度(Baidu)のMedoプラットフォーム上で
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o medo-app-builder.zip https://jpskill.com/download/5039.zip && unzip -o medo-app-builder.zip && rm medo-app-builder.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/5039.zip -OutFile "$d\medo-app-builder.zip"; Expand-Archive "$d\medo-app-builder.zip" -DestinationPath $d -Force; ri "$d\medo-app-builder.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
medo-app-builder.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
medo-app-builderフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-18
- 同梱ファイル
- 2
💬 こう話しかけるだけ — サンプルプロンプト
- › Medo App Builder を使って、最小構成のサンプルコードを示して
- › Medo App Builder の主な使い方と注意点を教えて
- › Medo App Builder を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] medo-app-builder
Medo App Builder
Medoは、チャット駆動型のフルスタックアプリケーションビルダーです。 公式サイト: https://www.medo.dev
ユーザーが自然言語で希望を記述すると、Medoは以下を含む本番環境対応のウェブ製品を生成します。
- フロントエンドUI
- バックエンドサービス
- データベーススキーマ
- 統合
- デプロイ可能なホスティング
典型的な出力は以下の通りです。
- ウェブサイト
- ウェブアプリケーション
- ダッシュボード
- SaaS製品
- 管理パネル
- 社内ツール
- ランディングページ
- インタラクティブなウェブページ
- ブラウザゲームおよびミニゲーム
このスキルにより、AIエージェントはMedoプラットフォームと連携して、アプリケーションの作成、反復、生成、デプロイを行うことができます。
すべてのプラットフォーム操作は、パッケージ化されたCLIスクリプトを介して実行する必要があります。
python scripts/medo_api.py <command> [options]
プラットフォームAPIを直接呼び出してはいけません。常にこのスキルが提供するCLIコマンドを使用してください。
このスキルを使用するタイミング
ユーザーが以下を希望する場合に、このスキルを使用してください。
- ウェブサイトを作成する
- ウェブページを作成する
- ウェブアプリケーションを構築する
- ダッシュボードを構築する
- SaaS製品を作成する
- 管理パネルを構築する
- 社内ツールを構築する
- ランディングページを作成する
- インタラクティブなウェブページを構築する
- ブラウザゲームを作成する
- ミニゲームを作成する
- MVPウェブ製品を生成する
- 既存のMedoプロジェクトを修正する
- Medoアプリケーションを公開またはデプロイする
関連性のないプログラミングタスクには、このスキルを使用しないでください。
ルーティングキーワード
リクエストに以下の概念が含まれる場合に、このスキルをトリガーしてください。
- ウェブサイトを構築する
- ウェブページを作成する
- ウェブアプリを構築する
- SaaSを作成する
- ダッシュボードを構築する
- 管理パネルを作成する
- 社内ツールを構築する
- ランディングページを作成する
- ブラウザゲームを構築する
- ミニゲームを作成する
- ウェブ製品を生成する
- スネークゲームのウェブページを作成する
- Todoウェブアプリを構築する
- ブログサイトを作成する
リクエスト例
このスキルにルーティングされるべき例です。
- 「Todoリストのウェブアプリを作成して」
- 「個人のブログウェブサイトを構築して」
- 「営業分析用のダッシュボードを作成して」
- 「SaaSのランディングページを作成して」
- 「管理パネルを構築して」
- 「スネークゲームのウェブページを作成して」
- 「ブラウザゲームを作成して」
- 「ミニウェブゲームを構築して」
- 「私のMedoプロジェクトを修正して」
- 「このMedoアプリを公開して」
ステートレス実行モデル
CLIスクリプトはステートレスです。
呼び出し間でワークフローステートを保存しません。
アプリケーションのワークフローステートはMedoプラットフォームによって維持され、以下から推測する必要があります。
appIdconversationId- アプリケーションの詳細
- 会話の軌跡イベント
エージェントは、会話を継続したりアプリケーションを修正したりする際に、適切な識別子を渡す必要があります。
アプリケーションライフサイクルルール
Medoアプリケーションは厳格なライフサイクルに従います。
エージェントはこれらのルールに従う必要があります。
初期作成
新しいアプリケーションの場合:
- 製品を記述する
chatリクエストから開始します。 - アプリケーションはPRD洗練ステージに入ります。
- 仕様を洗練するためにチャットを続けます。
- 軌跡にGenerate Appボタン(
result.artifact.parts[].data.actions[]にtype":"button"とevent":{"name":"generateApp"})が含まれている場合、generate-appを使用してアプリケーションの生成をトリガーします。
生成は初期作成時に一度だけ必要です。
複数ラウンドの修正
アプリケーションがすでに生成されている場合:
generate-appを再度呼び出してはいけません。- 同じ
appIdとconversationIdでchatを使い続けてください。
通常のチャットメッセージは既存のアプリケーションを修正します。
公開
公開は、アプリケーションが少なくとも一度生成された後に許可されます。
ルール:
- 公開には別の生成ステップは必要ありません
- 公開は最初の生成後いつでも可能です
- 公開後にはステータスポーリングが必要です(または
--waitフラグを使用)
典型的なデプロイフロー:
publish → publish-status polling
または、--waitフラグを使用して自動ポーリングします。
publish --wait
ステータスが以下になったらポーリングを停止します。
SUCCESSFAILED
アプリケーションURL
Medoはライフサイクル中に2種類のURLを提供します。
プロジェクトプレビュー(エディター / 開発)
アプリケーションが作成された後、プロジェクトは以下でアクセスできます。
https://www.medo.dev/projects/<app_id>
このURLは、以下の目的でユーザーと共有できます。
- プロジェクトの表示
- アプリケーションの編集
- 生成結果のプレビュー
プレビューURLはappIdが作成されると利用可能になります。
本番デプロイURL
公開が成功した後、アプリケーションは以下でアクセスできます。
https://<app_id>.appmedo.com
これは、デプロイされたアプリケーションの公開本番URLです。
公開が正常に完了した後にのみ、このURLを返してください。
標準ワークフロー
新しいアプリケーションの作成
chat → PRD refinement → generate-app → publish
既存の生成済みアプリケーションの修正
chat → chat → chat
(追加の生成ステップは不要です)
アプリケーションのデプロイ
publish → publish-status polling
または:
publish --wait
利用可能なコマンド
すべてのコマンドはCLIスクリプトを介して実行されます。
重要: コマンドを実行する前に、常にMEDO_API_KEY環境変数を設定してください。
export MEDO_API_KEY="your_api_key_here"
list-apps
認証されたユーザーに属するすべてのアプリケーションを一覧表示します。
使用法:
python scripts/medo_api.py list-apps [--brief]
オプションパラメータ:
--brief: 主要なフィールドのみを出力します:appId,name,type,appFocus,host,updatedAt。トークン使用量を減らすためにエージェントに推奨されます。--name NAME: アプリ名(部分文字列)でフィルタリングします。--page PAGE: ページ番号(デフォルト: 1)--size SIZE: ページサイズ(デフォルト: 12)
例:
export MEDO_API_KEY="sk_xxxxx"
# 簡易モード(エージェントに推奨)
python scripts/medo_api.py list-apps --brief
# 完全モード
python scripts/medo_api.py list-apps
戻り値: appId、name、typeなどを含むアプリケーションのJSON配列。
app-detail
特定のアプリケーションに関する詳細情報を取得します。conversationIdを自動的に注入します。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Medo App Builder
Medo is a chat-driven full-stack application builder. Official website: https://www.medo.dev
Users describe what they want in natural language and Medo generates a production-ready web product, including:
- frontend UI
- backend services
- database schema
- integrations
- deployable hosting
Typical outputs include:
- websites
- web applications
- dashboards
- SaaS products
- admin panels
- internal tools
- landing pages
- interactive web pages
- browser games and mini games
This skill enables AI agents to interact with the Medo platform to create, iterate, generate, and deploy applications.
All platform operations must be executed through the packaged CLI script:
python scripts/medo_api.py <command> [options]
Do not call platform APIs directly. Always use the CLI commands provided by this skill.
When to Use This Skill
Use this skill whenever the user wants to:
- create a website
- create a webpage
- build a web application
- build a dashboard
- create a SaaS product
- build an admin panel
- build an internal tool
- create a landing page
- build an interactive web page
- create a browser game
- create a mini game
- generate an MVP web product
- modify an existing Medo project
- publish or deploy a Medo application
Do not use this skill for unrelated programming tasks.
Routing Keywords
Trigger this skill if the request includes concepts such as:
- build a website
- create a webpage
- build a web app
- create a SaaS
- build a dashboard
- create an admin panel
- build an internal tool
- create a landing page
- build a browser game
- create a mini game
- generate a web product
- make a snake game webpage
- build a todo web app
- create a blog site
Example Requests
Examples that should route to this skill:
- "Create a todo list web app"
- "Build a personal blog website"
- "Make a dashboard for sales analytics"
- "Create a SaaS landing page"
- "Build an admin panel"
- "Write a snake game webpage"
- "Create a browser game"
- "Build a mini web game"
- "Modify my Medo project"
- "Publish this Medo app"
Stateless Execution Model
The CLI script is stateless.
It does not store workflow state between calls.
Application workflow state is maintained by the Medo platform and must be inferred from:
appIdconversationId- application detail
- conversation trajectory events
Agents must pass the appropriate identifiers when continuing conversations or modifying applications.
Application Lifecycle Rules
Medo applications follow a strict lifecycle.
Agents must follow these rules.
Initial Creation
For a new application:
- Start with a
chatrequest describing the product. - The application enters the PRD refinement stage.
- Continue chatting to refine the specification.
- When the trajectory contains a Generate App button (
type":"button"andevent":{"name":"generateApp"}inresult.artifact.parts[].data.actions[]), trigger application generation usinggenerate-app.
Generation is required only once during the initial creation.
Multi-Round Modification
After an application has already been generated:
- Do not call
generate-appagain. - Continue using
chatwith the sameappIdandconversationId.
Normal chat messages modify the existing application.
Publishing
Publishing is allowed after the application has been generated at least once.
Rules:
- Publishing does not require another generation step
- Publishing may happen anytime after the first generation
- Publishing must be followed by status polling (or use
--waitflag)
Typical deployment flow:
publish → publish-status polling
Or use the --wait flag to auto-poll:
publish --wait
Stop polling when the status becomes:
SUCCESSFAILED
Application URLs
Medo provides two types of URLs during the lifecycle.
Project Preview (Editor / Development)
After the application is created, the project can be accessed at:
https://www.medo.dev/projects/<app_id>
This URL can be shared with the user for:
- viewing the project
- editing the application
- previewing the generated result
The preview URL becomes available once an appId is created.
Production Deployment URL
After publishing succeeds, the application is accessible at:
https://<app_id>.appmedo.com
This is the public production URL of the deployed application.
Only return this URL after publishing completes successfully.
Standard Workflow
Create New Application
chat → PRD refinement → generate-app → publish
Modify Existing Generated Application
chat → chat → chat
(no additional generation step required)
Deploy Application
publish → publish-status polling
Or:
publish --wait
Available Commands
All commands are executed via the CLI script.
Important: Always set the MEDO_API_KEY environment variable before running commands.
export MEDO_API_KEY="your_api_key_here"
list-apps
List all applications belonging to the authenticated user.
Usage:
python scripts/medo_api.py list-apps [--brief]
Optional Parameters:
--brief: Output only key fields:appId,name,type,appFocus,host,updatedAt. Recommended for agents to reduce token usage.--name NAME: Filter by app name (substring)--page PAGE: Page number (default: 1)--size SIZE: Page size (default: 12)
Example:
export MEDO_API_KEY="sk_xxxxx"
# Brief mode (recommended for agents)
python scripts/medo_api.py list-apps --brief
# Full mode
python scripts/medo_api.py list-apps
Returns: JSON array of applications with appId, name, type, etc.
app-detail
Get detailed information about a specific application. Automatically injects conversationId into the response by default — no need to call get-context-id separately.
Usage:
python scripts/medo_api.py app-detail --app-id <app_id> [--no-context]
Required Parameters:
--app-id APP_ID: Application ID
Optional Parameters:
--no-context: Skip auto-fetchingconversationIdfrom trajectory (faster, but response will not containconversationId)
Example:
export MEDO_API_KEY="sk_xxxxx"
python scripts/medo_api.py app-detail --app-id app-abc123xyz
Returns: JSON object with application details, configuration, and status. data.conversationId is automatically populated.
get-context-id
Recover the conversationId for an existing app by reading its trajectory. Useful when the conversationId has been lost after a session reset.
Usage:
python scripts/medo_api.py get-context-id --app-id <app_id>
Required Parameters:
--app-id APP_ID: Application ID
Optional Parameters:
--fetch-timeout SECONDS: Request timeout in seconds (default: 10)
Example:
export MEDO_API_KEY="sk_xxxxx"
python scripts/medo_api.py get-context-id --app-id app-abc123xyz
Returns: {"appId": "app-abc123xyz", "conversationId": "conv-def456uvw"}
Use Cases:
- Need to modify a previously created app in a new session but
conversationIdis lost - Use the returned
conversationIdwithchat --app-id --context-idto resume modification
conversation-history
Show a human/agent-readable summary of past interactions for an app. More convenient than trajectory or fetch-trajectory for quickly understanding what happened in previous sessions.
Usage:
python scripts/medo_api.py conversation-history --app-id <app_id> [options]
Required Parameters:
--app-id APP_ID: Application ID
Optional Parameters:
--full: Show full content instead of truncated summaries (default: truncate at 200 chars)--limit N: Only show the last N conversation turns--fetch-timeout SECONDS: Request timeout in seconds (default: 10)
Example:
export MEDO_API_KEY="sk_xxxxx"
# View conversation history summary
python scripts/medo_api.py conversation-history --app-id app-abc123xyz
# Only show the last 3 turns
python scripts/medo_api.py conversation-history --app-id app-abc123xyz --limit 3
# Show full content without truncation
python scripts/medo_api.py conversation-history --app-id app-abc123xyz --full
Returns: JSON Lines, one entry per meaningful turn:
{"eventId": 5, "role": "user", "type": "message", "content": "创建一个待办事项应用..."}
{"eventId": 865, "role": "agent", "type": "file", "content": "[file: 需求文档.md]"}
{"eventId": 880, "role": "user", "type": "message", "content": "生成应用"}
Use Cases:
- Quickly understand what happened in previous sessions before resuming work
- Determine which phase the app is in (PRD refinement / generated / modified)
- Check for unfinished modifications or cancelled tasks
chat
Start or continue a conversation to create or modify an application.
Usage:
python scripts/medo_api.py chat --text "description" [options]
Required Parameters:
--text TEXT: The message/instruction to send
Optional Parameters:
--context-id CONTEXT_ID: Conversation ID of an existing app.--app-id APP_ID: Application ID of an existing app.--query-mode QUERY_MODE: Query mode (default: deep_mode)--input-field-type INPUT_FIELD_TYPE: Input field type (default: web)--poll-interval SECONDS: Seconds between trajectory polls (default: 2.0)--fetch-timeout SECONDS: Per-request timeout for each trajectory fetch (default: 10)--no-stream: Return raw chat POST response without trajectory polling--prompt-generate: After polling, interactively ask whether to submit app generation if text was returned
⚠️ IMPORTANT —
--app-idand--context-idmust always be used together.
Intent --app-id--context-idCreate a brand-new app omit omit Continue / modify an existing app required required (conversationId) Passing
--app-idwithout--context-idwill NOT modify the existing app. The platform will silently create a new app every time. The CLI will now raise an error in this case to prevent accidental app proliferation.
Examples:
1. Create a new application:
export MEDO_API_KEY="sk_xxxxx"
python scripts/medo_api.py chat --text "创建一个待办事项管理应用"
Response includes appId and contextId for subsequent calls.
2. Continue conversation (refine PRD):
python scripts/medo_api.py chat \
--text "添加优先级标记功能" \
--app-id app-abc123xyz \
--context-id conv-def456uvw
3. Modify existing generated app:
python scripts/medo_api.py chat \
--text "把按钮颜色改成蓝色" \
--app-id app-abc123xyz \
--context-id conv-def456uvw
Important Notes:
- Extract
appIdandcontextIdfrom the response and save them - Use these IDs for all subsequent operations on the same app
- The first
chatcreates the app and starts PRD refinement - After generation,
chatdirectly modifies the app (nogenerate-appneeded)
trajectory
Poll trajectory events until the task reaches a terminal state.
Usage:
python scripts/medo_api.py trajectory --app-id <app_id> [options]
Required Parameters:
--app-id APP_ID: Application ID
Optional Parameters:
--last-event-id EVENT_ID: Start eventId; -1 = all events from beginning (default: -1)--poll-interval SECONDS: Seconds between polls (default: 2.0)--fetch-timeout SECONDS: Per-request timeout in seconds (default: 10)--sse: Use legacy SSE streaming instead of polling
Example:
export MEDO_API_KEY="sk_xxxxx"
python scripts/medo_api.py trajectory --app-id app-abc123xyz
Use Cases:
- Monitor conversation / generation progress
- Detect when PRD refinement is complete (look for Generate App button in
result.artifact.parts[].data.actions[]) - Verify generation has completed
fetch-trajectory
Fetch one batch of trajectory events (single request, no polling loop).
Usage:
python scripts/medo_api.py fetch-trajectory --app-id <app_id> [options]
Required Parameters:
--app-id APP_ID: Application ID
Optional Parameters:
--last-event-id EVENT_ID: Fetch events after this eventId; -1 = all (default: -1)--fetch-timeout SECONDS: Request timeout in seconds (default: 10)
Example:
# First call — get all events (note maxEventId from stderr)
python scripts/medo_api.py fetch-trajectory --app-id app-abc123xyz
# Subsequent calls — incremental fetch
python scripts/medo_api.py fetch-trajectory --app-id app-abc123xyz --last-event-id 345
Events are printed to stdout as JSON lines; {"maxEventId": N, "isTerminal": bool} is printed to stderr.
Generate App readiness: Inspect result.artifact.parts[].data.actions[] for an action with "type":"button" and "event":{"name":"generateApp"}. Example:
{"type":"button","label":"Generate App","value":"Generate App","event":{"name":"generateApp"}}
When this button appears, PRD is ready and generate-app may be called.
generate-app
Submit app-generation confirmation and return immediately with appId/conversationId.
Usage:
python scripts/medo_api.py generate-app --app-id <app_id> --context-id <context_id> [options]
Required Parameters:
--app-id APP_ID: Application ID
Optional Parameters:
--context-id CONTEXT_ID: Conversation ID (default: "")--query-mode QUERY_MODE: Query mode (default: deep_mode)--watch: Block and poll trajectory until generation completes (default: return immediately)--poll-interval SECONDS: Seconds between polls when--watchis set (default: 2.0)--fetch-timeout SECONDS: Per-request timeout in seconds when--watchis set (default: 10)
Example:
export MEDO_API_KEY="sk_xxxxx"
# Submit and return immediately — check status later with fetch-trajectory
python scripts/medo_api.py generate-app \
--app-id app-abc123xyz \
--context-id conv-def456uvw
# Submit and block until generation finishes
python scripts/medo_api.py generate-app \
--app-id app-abc123xyz \
--context-id conv-def456uvw \
--watch
Important:
- Only call this once during initial creation
- Call only when trajectory contains a Generate App button in
result.artifact.parts[].data.actions[]: an action with"type":"button"and"event":{"name":"generateApp"}(label may vary by locale; use event name for the check). This indicates PRD is ready. - Do not call again for modifications after the first generation
- After this command, use
chatto modify the generated app
publish
Trigger deployment to production.
Usage:
python scripts/medo_api.py publish --app-id <app_id> [options]
Required Parameters:
--app-id APP_ID: Application ID to publish
Optional Parameters:
--env ENV: Target environment (default: PRODUCE)--wait: Auto-poll publish status until SUCCESS or FAILED
Examples:
1. Publish and manually check status:
export MEDO_API_KEY="sk_xxxxx"
python scripts/medo_api.py publish --app-id app-abc123xyz
Returns releaseId immediately. Then poll with publish-status.
2. Publish and auto-wait for completion (recommended):
export MEDO_API_KEY="sk_xxxxx"
python scripts/medo_api.py publish --app-id app-abc123xyz --wait
This polls automatically and exits when deployment succeeds or fails.
Important:
- Application must be generated at least once before publishing
- After successful publish, the app is live at:
https://<app_id>.appmedo.com
publish-status
Check the status of a deployment.
Usage:
python scripts/medo_api.py publish-status --release-id <release_id>
Required Parameters:
--release-id RELEASE_ID: Release ID frompublishcommand
Example:
export MEDO_API_KEY="sk_xxxxx"
python scripts/medo_api.py publish-status --release-id app_release_record-xyz789abc
Returns: JSON with status: PROCESSING, RUNNING, SUCCESS, or FAILED
Usage Pattern:
# Get release ID from publish
RELEASE_ID=$(python scripts/medo_api.py publish --app-id app-abc123xyz | jq -r '.releaseId')
# Poll status
while true; do
STATUS=$(python scripts/medo_api.py publish-status --release-id $RELEASE_ID | jq -r '.status')
echo "Status: $STATUS"
if [[ "$STATUS" == "SUCCESS" || "$STATUS" == "FAILED" ]]; then
break
fi
sleep 5
done
Tip: Use publish --wait to avoid manual polling.
Complete Workflow Examples
Example 1: Create and Deploy a New App
export MEDO_API_KEY="sk_xxxxx"
cd ~/.openclaw/skills/medo-app-builder
# Step 1: Create app via chat (returns appId + conversationId on first line)
FIRST=$(python scripts/medo_api.py chat --text "创建一个简单的计数器应用" | head -1)
APP_ID=$(echo $FIRST | jq -r '.appId')
CONTEXT_ID=$(echo $FIRST | jq -r '.conversationId')
# Step 2: Generate the app (returns immediately; use fetch-trajectory to check progress)
python scripts/medo_api.py generate-app \
--app-id $APP_ID \
--context-id $CONTEXT_ID
# Step 3: Poll until generation finishes
python scripts/medo_api.py trajectory --app-id $APP_ID
# Step 4: Publish (with auto-wait)
python scripts/medo_api.py publish --app-id $APP_ID --wait
# Done! App is live at:
echo "https://$APP_ID.appmedo.com"
Example 2: Modify an Existing App
IMPORTANT — Always update
CONTEXT_IDfrom eachchatresponse.Each
chatcall prints a JSON header line{"appId": "...", "conversationId": "..."}. The platform may return an updatedconversationIdin this response. Always capture it and use it for the nextchatcall, or the next round will create a brand-new app.
export MEDO_API_KEY="sk_xxxxx"
cd ~/.openclaw/skills/medo-app-builder
APP_ID="app-abc123xyz"
# Step 1: Get app detail — conversationId is auto-injected
DETAIL=$(python scripts/medo_api.py app-detail --app-id $APP_ID)
CONTEXT_ID=$(echo $DETAIL | jq -r '.data.conversationId')
# Abort early if conversationId is missing (app may have no history yet)
if [ -z "$CONTEXT_ID" ] || [ "$CONTEXT_ID" = "null" ]; then
echo "Error: could not retrieve conversationId. Try: get-context-id --app-id $APP_ID"
exit 1
fi
# Step 2 (optional): Review conversation history to understand previous work
python scripts/medo_api.py conversation-history --app-id $APP_ID
# Step 3a: First modification — capture the UPDATED conversationId from the response header
CHAT_RESULT=$(python scripts/medo_api.py chat \
--text "把背景颜色改成深色模式" \
--app-id $APP_ID \
--context-id $CONTEXT_ID | head -1)
CONTEXT_ID=$(echo $CHAT_RESULT | jq -r '.conversationId') # ← UPDATE for next round
# Step 3b: Second modification — uses the updated CONTEXT_ID
CHAT_RESULT=$(python scripts/medo_api.py chat \
--text "添加暗黑模式切换按钮" \
--app-id $APP_ID \
--context-id $CONTEXT_ID | head -1)
CONTEXT_ID=$(echo $CHAT_RESULT | jq -r '.conversationId') # ← UPDATE again
# Step 4: Re-publish
python scripts/medo_api.py publish --app-id $APP_ID --wait
Command Semantics
chat
Used to:
- create a new application
- refine PRD specifications
- modify an existing generated application
For a new application, chat creates the project and begins the PRD stage.
For an existing application, chat performs iterative modifications.
trajectory
Streams conversation progress and system events.
Use this to determine:
- whether PRD generation is ongoing
- whether the app is ready for generation (see generate-app condition below)
- whether generation has completed
generate-app
Triggers application generation.
Call only when trajectory contains a Generate App button in result.artifact.parts[].data.actions[]: an action with "type":"button" and "event":{"name":"generateApp"}. This indicates PRD is ready. Do not rely on text alone—the button structure is the authoritative signal.
Call once during initial creation. Do not call again for modifications.
publish
Triggers application deployment.
Use --wait flag to auto-poll status (recommended).
publish-status
Polls deployment progress until the release completes.
Not needed if using publish --wait.
Error Handling
IAM AccessKey Validation Failed
Symptom:
IAM access key validation failed.
Cause:
The configured MEDO_API_KEY is invalid or missing.
Resolution:
-
Go to the Medo official website:
-
In the left navigation panel, apply for an available access key.
-
Set the key as the environment variable:
export MEDO_API_KEY="sk_xxxxx" -
Or create a
.envfile in the skill directory:echo "MEDO_API_KEY=sk_xxxxx" > ~/.openclaw/skills/medo-app-builder/.env
NotOpenSSLWarning
Symptom:
NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+,
currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'
Cause:
macOS uses LibreSSL by default, but urllib3 v2 recommends OpenSSL.
Impact:
This is a warning only. API calls still work correctly.
Resolution (optional):
If you want to suppress the warning:
pip3 install 'urllib3<2'
Or ignore it - it doesn't affect functionality.
Error Handling Guidance
Agents should handle the following situations:
- generation requested before the platform indicates readiness
- publish requested before generation has completed
- missing
appIdorconversationId(useget-context-idto recover a lostconversationId) - interrupted trajectory stream
- failed deployment status
- incorrect or missing parameter values
If workflow state is unclear, inspect the trajectory or application detail before taking the next action.
Pro Tips:
- Always check command
--helpwhen unsure about parameters - Use
--waitflag withpublishto simplify deployment - Save
appIdandcontextIdfrom firstchatresponse - Only call
generate-apponce during initial creation - After generation, use
chatdirectly for modifications
Application Sharing Rule (IMPORTANT)
- You must share your application only using the production deployment URL (after it has been published). Do not share the editor (development) URL.
Production deployment URL format:
https://<app_id>.appmedo.com
- If the application has not been published, you must publish it before sharing with others.
Example publish command:
python scripts/medo_api.py publish --app-id <app_id> --wait
- The project editor URL (
https://www.medo.cn/projects/<app_id>) is visible only to yourself. Other users cannot access your editor environment. Never use the editor URL for sharing with others.
Editor URL is for:
- your own development
- preview
- internal editing only
Editor URL must NOT be used for:
- external/public sharing
- distribution to others or end users
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (23,766 bytes)
- 📎 scripts/medo_api.py (39,935 bytes)