git clone --depth 1 https://github.com/lobehub/lobehub /tmp/agent-testing-bot && cp -r /tmp/agent-testing-bot/.agents/skills/agent-testing-bot ~/.claude/skills/agent-testing-botSKILL.md
# Agent Testing — Bot Channels (LobeHub project skill) This skill **extends** the generic `acceptance` skill (installed alongside at `../acceptance/`) to the bot-channel surfaces. It does NOT replace the core process: the same three phases apply — ```text PLAN (Steps 0–2) → EXECUTE (Steps 3–6) → FINISH (Step 7) ``` — and the same report + publish pipeline (`result.json` → `report-init.sh` → `lh acceptance run ingest … --source agent-testing`). Read the acceptance skill's `SKILL.md` for target grounding, the living logs, the Phase-1 approval gate, the report format, and teardown. This file only adds the bot-channel surface. For LobeHub environment/auth/probe specifics (dev server, seeded account, ports), the adapter is `.agents/acceptance/PROJECT.md`. ## When this surface applies | Change scope | Surface | Why | | ---------------------------------------------- | --------------------------------- | ------------------------------------------------ | | **Bot channels** (Discord / WeChat / Lark / …) | Native app via osascript / bridge | Only way to exercise the real channel end-to-end | Route here only when the behavior under test is a bot channel. For CLI / Web / Electron changes, use the generic skill's surfaces. ## Platforms Each platform folder has an `index.md` (activation, navigation, send-message, verification snippets) and a `test-<platform>-bot.sh` driver. | Platform | Guide | Quick switcher | | ------------- | ---------------------------------------- | --------------------- | | Discord | [discord/index.md](./discord/index.md) | `Cmd+K` | | Slack | [slack/index.md](./slack/index.md) | `Cmd+K` | | Telegram | [telegram/index.md](./telegram/index.md) | `Cmd+F` | | WeChat / 微信 | [wechat/index.md](./wechat/index.md) | `Cmd+F` | | Lark / 飞书 | [lark/index.md](./lark/index.md) | `Cmd+K` | | QQ | [qq/index.md](./qq/index.md) | `Cmd+F` | | iMessage | [imessage/index.md](./imessage/index.md) | bridge (no osascript) | ## Shared driver contract Every osascript platform script shares one interface: ```bash ./$PLATFORM/test-$PLATFORM-bot.sh $CHANNEL_OR_CONTACT $MESSAGE [$WAIT_SECONDS] [$SCREENSHOT_PATH] ``` The script activates the app, navigates to the channel/contact, sends the message, waits, and screenshots the result window (via the generic skill's `../../acceptance/scripts/capture-app-window.sh`). iMessage is the exception: it uses a BlueBubbles bridge, not osascript — see [imessage/index.md](./imessage/index.md). ## osascript prerequisites The osascript platforms drive real macOS apps (activate, keystroke, click, read accessibility, screenshot). Read the generic skill's general macOS-automation reference before a first bot run: [../../acceptance/references/osascript.md](../../acceptance/references/osascript.md). The target native app must already be running and logged in. ## Screen-recording gate (macOS-only) Bot evidence is captured with OS-level `screencapture` (through `capture-app-window.sh`), NOT CDP — so it comes out **entirely black** when macOS Screen Recording (TCC) permission is missing OR the display is asleep / locked / on a screensaver. Gate BEFORE any bot capture: ```bash ./.agents/acceptance/scripts/check-screen-recording.sh # exit 0 = OS capture will work ``` Keep the display awake for the whole capture session (`caffeinate -dimsu &`, kill when done). Because this surface depends on OS capture and native macOS apps, **bot channels are macOS-only — they do not run headless / in cloud.**
Add documentation for a new AI provider — usage docs, env vars, Docker config, image resources.
Add server-side environment variables that control default values for user settings.
Agent runtime lifecycle hooks. Use for before/after tool or step hooks, tool mocks, human intervention, sub-agent calls, context compression, evals, callAgent, or lifecycle events.
Build or extend LobeHub Agent Signal pipelines. Use for signal sources, signal/action types, policies, middleware, workflow handoff, dedupe, scope behavior, or observability.
Agent tracing CLI for execution snapshots. Use for agent-tracing, traces, snapshots, LLM call inspection, context engine data, agent step analysis, execution debugging, or pulling remote/production traces ("拉线上 tracing") by operation id. Also the first stop for debugging agent tool calls — wrong or missing tool_calls, unexpected tool arguments or results, which tools were available at a step, or why a tool ran where it did.
Build LobeHub builtin tool packages. Use when adding agent-callable tools, manifests, executors, runtimes, inspectors, renders, placeholders, streaming, interventions, portals, or tool registries.
Build multi-platform chat bots with the chat SDK. Use for Slack, Teams, Google Chat, Discord, GitHub, Linear bots, webhooks, mentions, slash commands, cards, modals, or streaming responses.
>