jpskill.com
💬 コミュニケーション コミュニティ 🟢 非エンジニアでもOK 👤 管理職・人事・カスタマー対応

💬 ローカルテスト

local-testing

開発中のアプリやボットが、自分のパソコン上で正

⏱ Slack絵文字GIF制作 1時間 → 5分

📺 まず動画で見る(YouTube)

▶ 【最新版】Claude(クロード)完全解説!20以上の便利機能をこの動画1本で全て解説 ↗

※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。

📜 元の英語説明(参考)

Local app and bot testing. Uses agent-browser CLI for Electron/web app UI testing, and osascript (AppleScript) for controlling native macOS apps (WeChat, Discord, Telegram, Slack, Lark/飞书, QQ) to test bots. Triggers on 'local test', 'test in electron', 'test desktop', 'test bot', 'bot test', 'test in discord', 'test in telegram', 'test in slack', 'test in weixin', 'test in wechat', 'test in lark', 'test in feishu', 'test in qq', 'manual test', 'osascript', or UI/bot verification tasks.

🇯🇵 日本人クリエイター向け解説

一言でいうと

開発中のアプリやボットが、自分のパソコン上で正

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o local-testing.zip https://jpskill.com/download/1282.zip && unzip -o local-testing.zip && rm local-testing.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/1282.zip -OutFile "$d\local-testing.zip"; Expand-Archive "$d\local-testing.zip" -DestinationPath $d -Force; ri "$d\local-testing.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して local-testing.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → local-testing フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-17
取得日時
2026-05-17
同梱ファイル
20

💬 こう話しかけるだけ — サンプルプロンプト

  • Local Testing で、お客様への返信文を作って
  • Local Testing を使って、社内向けアナウンスを書いて
  • Local Testing で、メールテンプレートを整備して

これをClaude Code に貼るだけで、このSkillが自動発動します。

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[スキル名] local-testing

ローカルでのアプリとボットのテスト

macOS でローカルテストを行うための2つのアプローチです。

アプローチ ツール 最適な用途
agent-browser + CDP agent-browser CLI Electron アプリ、Web アプリ (DOM アクセス、JS 評価)
osascript (AppleScript) osascript -e ネイティブ macOS アプリ (WeChat, Discord, Telegram, Slack)

パート1: agent-browser (Electron / Web アプリ)

agent-browser を使用して、Chrome DevTools Protocol 経由で Chromium ベースのアプリを自動化します。

npm i -g agent-browserbrew install agent-browser、または cargo install agent-browser でインストールしてください。Chrome をダウンロードするには agent-browser install を実行します。更新するには agent-browser upgrade を実行します。

コアワークフロー

すべてのブラウザ自動化は、このパターンに従います。

  1. ナビゲート: agent-browser open <url>
  2. スナップショット: agent-browser snapshot -i ( @e1@e2 のような要素参照を取得します)
  3. インタラクト: 参照を使用してクリック、入力、選択を行います
  4. 再スナップショット: ナビゲーションまたは DOM の変更後、新しい参照を取得します
agent-browser open https://example.com/form
agent-browser snapshot -i
# 出力: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Submit"

agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i # 結果を確認します

コマンドの連結

# open + wait + snapshot を1回の呼び出しで連結します
agent-browser open https://example.com && agent-browser wait --load networkidle && agent-browser snapshot -i

中間出力を読み取る必要がない場合は && を使用します。まず出力を解析する必要がある場合 (例: 参照を見つけるためにスナップショットを撮り、その後インタラクトする場合) は、コマンドを個別に実行してください。

必須コマンド

# ナビゲーション
agent-browser open <url>              # ナビゲート (エイリアス: goto, navigate)
agent-browser close                   # ブラウザを閉じます
agent-browser close --all             # すべてのアクティブなセッションを閉じます

# スナップショット
agent-browser snapshot -i             # 参照付きのインタラクティブ要素 (推奨)
agent-browser snapshot -s "#selector" # CSS セレクターにスコープを設定します

# インタラクション (スナップショットからの @refs を使用します)
agent-browser click @e1               # 要素をクリックします
agent-browser click @e1 --new-tab     # クリックして新しいタブで開きます
agent-browser fill @e2 "text"         # クリアしてテキストを入力します
agent-browser type @e2 "text"         # クリアせずにテキストを入力します
agent-browser select @e1 "option"     # ドロップダウンオプションを選択します
agent-browser check @e1               # チェックボックスをチェックします
agent-browser press Enter             # キーを押します
agent-browser keyboard type "text"    # 現在のフォーカス位置にテキストを入力します (セレクターなし)
agent-browser keyboard inserttext "text"  # キーイベントなしで挿入します
agent-browser scroll down 500         # ページをスクロールします
agent-browser scroll down 500 --selector "div.content"  # コンテナ内をスクロールします

# 情報の取得
agent-browser get text @e1            # 要素のテキストを取得します
agent-browser get url                 # 現在の URL を取得します
agent-browser get title               # ページのタイトルを取得します
agent-browser get cdp-url             # CDP WebSocket URL を取得します

# 待機
agent-browser wait @e1                # 要素を待ちます
agent-browser wait --load networkidle # ネットワークアイドル状態を待ちます
agent-browser wait --url "**/page"    # URL パターンを待ちます
agent-browser wait 2000               # ミリ秒待ちます
agent-browser wait --text "Welcome"   # テキストが表示されるのを待ちます
agent-browser wait --fn "!document.body.innerText.includes('Loading...')"  # テキストが消えるのを待ちます
agent-browser wait "#spinner" --state hidden  # 要素が消えるのを待ちます

# ダウンロード
agent-browser download @e1 ./file.pdf          # 要素をクリックしてダウンロードをトリガーします
agent-browser wait --download ./output.zip     # ダウンロードが完了するのを待ちます

# ネットワーク
agent-browser network requests                 # 追跡されたリクエストを検査します
agent-browser network requests --type xhr,fetch  # リソースタイプでフィルタリングします
agent-browser network requests --method POST   # HTTP メソッドでフィルタリングします
agent-browser network route "**/api/*" --abort # 一致するリクエストをブロックします
agent-browser network har start                # HAR 記録を開始します
agent-browser network har stop ./capture.har   # 停止して HAR ファイルを保存します

# ビューポートとデバイスエミュレーション
agent-browser set viewport 1920 1080          # ビューポートサイズを設定します (デフォルト: 1280x720)
agent-browser set viewport 1920 1080 2        # 2倍の Retina
agent-browser set device "iPhone 14"          # デバイスをエミュレートします (ビューポート + ユーザーエージェント)

# キャプチャ
agent-browser screenshot              # 一時ディレクトリにスクリーンショットを撮ります
agent-browser screenshot --full       # ページ全体のスクリーンショット
agent-browser screenshot --annotate   # 番号付き要素ラベル付きの注釈付きスクリーンショット
agent-browser pdf output.pdf          # PDF として保存します

# クリップボード
agent-browser clipboard read          # クリップボードからテキストを読み取ります
agent-browser clipboard write "text"  # クリップボードにテキストを書き込みます
agent-browser clipboard copy          # 現在の選択範囲をコピーします
agent-browser clipboard paste         # クリップボードから貼り付けます

# ダイアログ (alert, confirm, prompt, beforeunload)
agent-browser dialog accept           # ダイアログを承認します
agent-browser dialog accept "input"   # テキスト付きのプロンプトダイアログを承認します
agent-browser dialog dismiss          # ダイアログを却下/キャンセルします
agent-browser dialog status           # ダイアログが開いているか確認します

# 差分 (ページの状態を比較します)
agent-browser diff snapshot                        # 現在のスナップショットと最後のスナップショットを比較します
agent-browser diff screenshot --baseline before.png  # 視覚的なピクセル差分
agent-browser diff url <url1> <url2>               # 2つのページを比較します

# ストリーミング
agent-browser stream enable           # WebSocket ストリーミングを開始します
agent-browser stream status           # ストリーミングの状態を検査します
agent-browser stream disable          # ストリーミングを停止します

バッチ実行


echo '[
  ["open", "https://example.com"],
  ["snapshot", 

(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Local App & Bot Testing

Two approaches for local testing on macOS:

Approach Tool Best For
agent-browser + CDP agent-browser CLI Electron apps, web apps (DOM access, JS eval)
osascript (AppleScript) osascript -e Native macOS apps (WeChat, Discord, Telegram, Slack)

Part 1: agent-browser (Electron / Web Apps)

Use agent-browser to automate Chromium-based apps via Chrome DevTools Protocol.

Install via npm i -g agent-browser, brew install agent-browser, or cargo install agent-browser. Run agent-browser install to download Chrome. Run agent-browser upgrade to update.

Core Workflow

Every browser automation follows this pattern:

  1. Navigate: agent-browser open <url>
  2. Snapshot: agent-browser snapshot -i (get element refs like @e1, @e2)
  3. Interact: Use refs to click, fill, select
  4. Re-snapshot: After navigation or DOM changes, get fresh refs
agent-browser open https://example.com/form
agent-browser snapshot -i
# Output: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Submit"

agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i # Check result

Command Chaining

# Chain open + wait + snapshot in one call
agent-browser open https://example.com && agent-browser wait --load networkidle && agent-browser snapshot -i

Use && when you don't need to read intermediate output. Run commands separately when you need to parse output first (e.g., snapshot to discover refs, then interact).

Essential Commands

# Navigation
agent-browser open <url>              # Navigate (aliases: goto, navigate)
agent-browser close                   # Close browser
agent-browser close --all             # Close all active sessions

# Snapshot
agent-browser snapshot -i             # Interactive elements with refs (recommended)
agent-browser snapshot -s "#selector" # Scope to CSS selector

# Interaction (use @refs from snapshot)
agent-browser click @e1               # Click element
agent-browser click @e1 --new-tab     # Click and open in new tab
agent-browser fill @e2 "text"         # Clear and type text
agent-browser type @e2 "text"         # Type without clearing
agent-browser select @e1 "option"     # Select dropdown option
agent-browser check @e1               # Check checkbox
agent-browser press Enter             # Press key
agent-browser keyboard type "text"    # Type at current focus (no selector)
agent-browser keyboard inserttext "text"  # Insert without key events
agent-browser scroll down 500         # Scroll page
agent-browser scroll down 500 --selector "div.content"  # Scroll within container

# Get information
agent-browser get text @e1            # Get element text
agent-browser get url                 # Get current URL
agent-browser get title               # Get page title
agent-browser get cdp-url             # Get CDP WebSocket URL

# Wait
agent-browser wait @e1                # Wait for element
agent-browser wait --load networkidle # Wait for network idle
agent-browser wait --url "**/page"    # Wait for URL pattern
agent-browser wait 2000               # Wait milliseconds
agent-browser wait --text "Welcome"   # Wait for text to appear
agent-browser wait --fn "!document.body.innerText.includes('Loading...')"  # Wait for text to disappear
agent-browser wait "#spinner" --state hidden  # Wait for element to disappear

# Downloads
agent-browser download @e1 ./file.pdf          # Click element to trigger download
agent-browser wait --download ./output.zip     # Wait for any download to complete

# Network
agent-browser network requests                 # Inspect tracked requests
agent-browser network requests --type xhr,fetch  # Filter by resource type
agent-browser network requests --method POST   # Filter by HTTP method
agent-browser network route "**/api/*" --abort # Block matching requests
agent-browser network har start                # Start HAR recording
agent-browser network har stop ./capture.har   # Stop and save HAR file

# Viewport & Device Emulation
agent-browser set viewport 1920 1080          # Set viewport size (default: 1280x720)
agent-browser set viewport 1920 1080 2        # 2x retina
agent-browser set device "iPhone 14"          # Emulate device (viewport + user agent)

# Capture
agent-browser screenshot              # Screenshot to temp dir
agent-browser screenshot --full       # Full page screenshot
agent-browser screenshot --annotate   # Annotated screenshot with numbered element labels
agent-browser pdf output.pdf          # Save as PDF

# Clipboard
agent-browser clipboard read          # Read text from clipboard
agent-browser clipboard write "text"  # Write text to clipboard
agent-browser clipboard copy          # Copy current selection
agent-browser clipboard paste         # Paste from clipboard

# Dialogs (alert, confirm, prompt, beforeunload)
agent-browser dialog accept           # Accept dialog
agent-browser dialog accept "input"   # Accept prompt dialog with text
agent-browser dialog dismiss          # Dismiss/cancel dialog
agent-browser dialog status           # Check if dialog is open

# Diff (compare page states)
agent-browser diff snapshot                        # Compare current vs last snapshot
agent-browser diff screenshot --baseline before.png  # Visual pixel diff
agent-browser diff url <url1> <url2>               # Compare two pages

# Streaming
agent-browser stream enable           # Start WebSocket streaming
agent-browser stream status           # Inspect streaming state
agent-browser stream disable          # Stop streaming

Batch Execution

echo '[
  ["open", "https://example.com"],
  ["snapshot", "-i"],
  ["click", "@e1"],
  ["screenshot", "result.png"]
]' | agent-browser batch --json

Authentication

# Option 1: Auth vault (credentials stored encrypted)
echo "$PASSWORD" | agent-browser auth save myapp --url https://app.example.com/login --username user --password-stdin
agent-browser auth login myapp

# Option 2: Session name (auto-save/restore cookies + localStorage)
agent-browser --session-name myapp open https://app.example.com/login
agent-browser close                                                       # State auto-saved
agent-browser --session-name myapp open https://app.example.com/dashboard # Auto-restored

# Option 3: Persistent profile
agent-browser --profile ~/.myapp open https://app.example.com/login

# Option 4: State file
agent-browser state save auth.json
agent-browser state load auth.json

LobeHub dev server — inject better-auth cookie

agent-browser --headed on macOS can create an off-screen Chromium window, blocking manual login. For a local LobeHub dev server (e.g. localhost:3011), copy the better-auth.session_token cookie out of a Network request in the user's own Chrome DevTools and load it via state load. See references/agent-browser-login.md for the full recipe.

Semantic Locators (Alternative to Refs)

agent-browser find text "Sign In" click
agent-browser find label "Email" fill "user@test.com"
agent-browser find role button click --name "Submit"
agent-browser find placeholder "Search" type "query"
agent-browser find testid "submit-btn" click

JavaScript Evaluation (eval)

# Simple expressions
agent-browser eval 'document.title'

# Complex JS: use --stdin with heredoc (RECOMMENDED)
agent-browser eval --stdin << 'EVALEOF'
JSON.stringify(
  Array.from(document.querySelectorAll("img"))
    .filter(i => !i.alt)
    .map(i => ({ src: i.src.split("/").pop(), width: i.width }))
)
EVALEOF

# Base64 encoding (avoids all shell escaping issues)
agent-browser eval -b "$(echo -n 'document.title' | base64)"

Ref Lifecycle

Refs (@e1, @e2, etc.) are invalidated when the page changes. Always re-snapshot after clicking links/buttons that navigate, form submissions, or dynamic content loading.

Annotated Screenshots (Vision Mode)

agent-browser screenshot --annotate
# Output includes the image path and a legend:
#   [1] @e1 button "Submit"
#   [2] @e2 link "Home"
agent-browser click @e2 # Click using ref from annotated screenshot

Parallel Sessions

agent-browser --session site1 open https://site-a.com
agent-browser --session site2 open https://site-b.com
agent-browser session list

Connect to Existing Chrome

agent-browser --auto-connect snapshot # Auto-discover running Chrome
agent-browser --cdp 9222 snapshot     # Explicit CDP port

iOS Simulator (Mobile Safari)

agent-browser device list
agent-browser -p ios --device "iPhone 16 Pro" open https://example.com
agent-browser -p ios snapshot -i
agent-browser -p ios tap @e1
agent-browser -p ios swipe up
agent-browser -p ios screenshot mobile.png
agent-browser -p ios close

Observability Dashboard

agent-browser dashboard install
agent-browser dashboard start # Background server on port 4848
agent-browser dashboard stop

Cloud Providers

Use -p <provider> to run against cloud browsers: agentcore, browserbase, browserless, browseruse, kernel.

Browser Engine Selection

agent-browser --engine lightpanda open example.com # 10x faster, 10x less memory

Electron (LobeHub Desktop)

Setup / Teardown

Use the electron-dev.sh script to manage the Electron dev environment. It handles process lifecycle, waits for SPA readiness, and reliably kills all child processes (main + helpers + vite).

SCRIPT=".agents/skills/local-testing/scripts/electron-dev.sh"

# Start Electron dev with CDP (idempotent — skips if already running)
$SCRIPT start

# Check if Electron is running and CDP is reachable
$SCRIPT status

# Kill all Electron-related processes (main + helper + vite)
$SCRIPT stop

# Force fresh restart
$SCRIPT restart

After start succeeds, connect with: agent-browser --cdp 9222 snapshot -i

Always run $SCRIPT stop when done testingpkill -f "Electron" alone won't catch all helper processes.

Environment Variables

Variable Default Description
CDP_PORT 9222 Chrome DevTools Protocol port
ELECTRON_LOG /tmp/electron-dev.log Electron process log
ELECTRON_WAIT_S 60 Max seconds to wait for Electron process
RENDERER_WAIT_S 60 Max seconds to wait for SPA to load

LobeHub-Specific Patterns

Access Zustand Store State

agent-browser --cdp 9222 eval --stdin << 'EVALEOF'
(function() {
  var chat = window.__LOBE_STORES.chat();
  var ops = Object.values(chat.operations);
  return JSON.stringify({
    ops: ops.map(function(o) { return { type: o.type, status: o.status }; }),
    activeAgent: chat.activeAgentId,
    activeTopic: chat.activeTopicId,
  });
})()
EVALEOF

Find and Use the Chat Input

# The chat input is contenteditable — must use -C flag
agent-browser --cdp 9222 snapshot -i -C 2>&1 | grep "editable"

agent-browser --cdp 9222 click @e48
agent-browser --cdp 9222 type @e48 "Hello world"
agent-browser --cdp 9222 press Enter

Wait for Agent to Complete

agent-browser --cdp 9222 eval --stdin << 'EVALEOF'
(function() {
  var chat = window.__LOBE_STORES.chat();
  var ops = Object.values(chat.operations);
  var running = ops.filter(function(o) { return o.status === 'running'; });
  return running.length === 0 ? 'done' : 'running: ' + running.length;
})()
EVALEOF

Install Error Interceptor

agent-browser --cdp 9222 eval --stdin << 'EVALEOF'
(function() {
  window.__CAPTURED_ERRORS = [];
  var orig = console.error;
  console.error = function() {
    var msg = Array.from(arguments).map(function(a) {
      if (a instanceof Error) return a.message;
      return typeof a === 'object' ? JSON.stringify(a) : String(a);
    }).join(' ');
    window.__CAPTURED_ERRORS.push(msg);
    orig.apply(console, arguments);
  };
  return 'installed';
})()
EVALEOF

# Later, check captured errors:
agent-browser --cdp 9222 eval "JSON.stringify(window.__CAPTURED_ERRORS)"

Chrome / Web Apps

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \
  --remote-debugging-port=9222 \
  --user-data-dir=/tmp/chrome-test-profile \
  "<URL>" &
sleep 5
agent-browser --cdp 9222 snapshot -i

# Or auto-discover running Chrome with remote debugging
agent-browser --auto-connect snapshot -i

Part 2: osascript (Native macOS App Bot Testing)

Use AppleScript via osascript to control native macOS desktop apps for bot testing. Works with any app that supports macOS Accessibility, no CDP or Chromium needed.

The pattern is the same for every platform:

  1. Activate the app (tell application "X" to activate)
  2. Navigate to a channel/chat (Quick Switcher Cmd+K or Search Cmd+F)
  3. Send a message (clipboard paste Cmd+V + Enter)
  4. Wait for the bot response
  5. Screenshot for verification (screencapture + Read tool)

Per-Platform References

Pick the file for your target platform — each contains activation, navigation, send-message, and verification snippets specific to that app:

Platform Reference Quick switcher
Discord references/discord.md Cmd+K
Slack references/slack.md Cmd+K
Telegram references/telegram.md Cmd+F
WeChat / 微信 references/wechat.md Cmd+F
Lark / 飞书 references/lark.md Cmd+K
QQ references/qq.md Cmd+F

For shared osascript patterns (activate, type, paste, screenshot, read accessibility, common workflow template, gotchas), see references/osascript-common.md. Read this first if you're new to osascript automation.


Scripts

Ready-to-use scripts in .agents/skills/local-testing/scripts/:

Script Usage
electron-dev.sh Manage Electron dev env (start/stop/status/restart)
capture-app-window.sh Capture screenshot of a specific app window
record-electron-demo.sh Record Electron app demo with ffmpeg
record-app-screen.sh Record app screen (video + screenshots, start/stop)
test-discord-bot.sh Send message to Discord bot via osascript
test-slack-bot.sh Send message to Slack bot via osascript
test-telegram-bot.sh Send message to Telegram bot via osascript
test-wechat-bot.sh Send message to WeChat bot via osascript
test-lark-bot.sh Send message to Lark / 飞书 bot via osascript
test-qq-bot.sh Send message to QQ bot via osascript

Window Screenshot Utility

capture-app-window.sh captures a screenshot of a specific app window using screencapture -l <windowID>. It uses Swift + CGWindowList to find the window by process name, so screenshots work correctly even when the window is on an external monitor or behind other windows.

# Standalone usage
./.agents/skills/local-testing/scripts/capture-app-window.sh "Discord" /tmp/discord.png
./.agents/skills/local-testing/scripts/capture-app-window.sh "Slack" /tmp/slack.png
./.agents/skills/local-testing/scripts/capture-app-window.sh "WeChat" /tmp/wechat.png

All bot test scripts use this utility automatically for their screenshots.

Bot Test Scripts

All bot test scripts share the same interface:

./scripts/test-<platform>-bot.sh <channel_or_contact> <message> [wait_seconds] [screenshot_path]

Examples:

# Discord — test a bot in #bot-testing channel
./.agents/skills/local-testing/scripts/test-discord-bot.sh "bot-testing" "!ping"
./.agents/skills/local-testing/scripts/test-discord-bot.sh "bot-testing" "/ask Tell me a joke" 30

# Slack — test a bot in #bot-testing channel
./.agents/skills/local-testing/scripts/test-slack-bot.sh "bot-testing" "@mybot hello"
./.agents/skills/local-testing/scripts/test-slack-bot.sh "bot-testing" "/ask What is 2+2?" 20

# Telegram — test a bot by username
./.agents/skills/local-testing/scripts/test-telegram-bot.sh "MyTestBot" "/start"
./.agents/skills/local-testing/scripts/test-telegram-bot.sh "GPTBot" "Hello" 60

# WeChat — test a bot or send to a contact
./.agents/skills/local-testing/scripts/test-wechat-bot.sh "文件传输助手" "test message" 5
./.agents/skills/local-testing/scripts/test-wechat-bot.sh "MyBot" "Tell me a joke" 30

# Lark/飞书 — test a bot in a group chat
./.agents/skills/local-testing/scripts/test-lark-bot.sh "bot-testing" "@MyBot hello"
./.agents/skills/local-testing/scripts/test-lark-bot.sh "bot-testing" "Help me with this" 30

# QQ — test a bot in a group or direct chat
./.agents/skills/local-testing/scripts/test-qq-bot.sh "bot-testing" "Hello bot" 15
./.agents/skills/local-testing/scripts/test-qq-bot.sh "MyBot" "/help" 10

Each script: activates the app, navigates to the channel/contact, pastes the message via clipboard, sends, waits, and takes a screenshot. Use the Read tool on the screenshot for visual verification.


Screen Recording

Record automated demos using record-app-screen.sh (start/stop lifecycle, CDP screenshots + ffmpeg assembly). See references/record-app-screen.md for full documentation.

./.agents/skills/local-testing/scripts/electron-dev.sh start
./.agents/skills/local-testing/scripts/record-app-screen.sh start my-demo
# ... run automation ...
./.agents/skills/local-testing/scripts/record-app-screen.sh stop

Outputs to .records/ directory (gitignored): <name>.mp4 (video) + <name>/ (screenshots every 3s).


Gotchas

agent-browser

  • Daemon can get stuck — if commands hang, agent-browser close --all or pkill -f agent-browser to reset
  • HMR invalidates everything — after code changes, refs break. Re-snapshot or restart
  • snapshot -i doesn't find contenteditable — use snapshot -i -C for rich text editors
  • fill doesn't work on contenteditable — use type for chat inputs
  • Screenshots go to ~/.agent-browser/tmp/screenshots/ — read them with the Read tool
  • Dialogs block all commands — if commands time out, check agent-browser dialog status
  • Default timeout is 25s — override with AGENT_BROWSER_DEFAULT_TIMEOUT (ms) or use explicit waits
  • Shell quoting corrupts eval — use eval --stdin <<'EVALEOF' for complex JS

Electron-specific

  • Always use electron-dev.sh stop to clean uppkill -f "Electron" only kills the main process; helper processes (GPU, renderer, network) survive. The script finds and kills all of them via PID matching against the project's electron binary path.
  • npx electron-vite dev must run from apps/desktop/ — running from project root fails silently. The electron-dev.sh script handles this automatically.
  • Don't resize the Electron window after load — resizing triggers full SPA reload
  • Store is at window.__LOBE_STORES not window.__ZUSTAND_STORES__

osascript

See references/osascript-common.md for the full osascript gotchas list (accessibility permissions, keystroke non-ASCII issues, locale-specific app names, rate limiting, etc.).

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。