一键导入
local-test
Build, run, and test IronClaw locally using Docker containers and Chrome MCP browser automation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Build, run, and test IronClaw locally using Docker containers and Chrome MCP browser automation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when adding or reviewing tests for Reborn behavior — choosing a test tier, covering a bug fix, testing model/tool-choice behavior, touching tests/integration or tests/fixtures/llm_traces, or when a test needs Postgres, Docker, or a live LLM.
Navigate building a user-facing feature in the Reborn stack (a capability that crosses product_workflow → composition → webui_v2 → runtime/serve → frontend). Use when planning or implementing any new Reborn settings page, endpoint, facade method, or runtime-backed capability — especially before writing code, to avoid rebuilding what already exists and to wire it in one pass instead of layer-by-layer.
Use when asked to "review the open PRs", review a batch or stack of pull requests, or run a recurring PR-review pass on a repo — especially with many PRs, stacked branches, conflicts, or security-sensitive changes. Covers grouping, fan-out to review subagents, verdict synthesis, and posting.
Generate or update the IronClaw architecture overview video using Remotion. Use when asked to update, regenerate, or modify the architecture video, add/remove scenes, or reflect codebase changes in the video.
Use when writing or reviewing a change in crates/ that adds a trait, a crate, a dependency edge, a re-export, or code in ironclaw_reborn_composition — or when deciding whether an abstraction, layer, or crate boundary is justified in the IronClaw Reborn stack.
Use when starting work in the IronClaw repo, deciding where a feature/fix/prompt/doc belongs, tracing how a request flows, looking up which crate owns a subsystem, or when repo docs, the knowledge graph, or component names seem stale, missing, or contradictory.
| name | local-test |
| version | 0.1.0 |
| description | Build, run, and test IronClaw locally using Docker containers and Chrome MCP browser automation. |
| activation | {"keywords":["test locally","local test","docker test","test my changes","test in docker","test web gateway","spin up test","test container"],"patterns":["test.*local","docker.*test","spin.*up.*test","test.*changes.*docker"],"max_context_tokens":3000} |
Use this skill to build, run, and test IronClaw web gateway changes locally using Dockerfile.test and Chrome MCP browser automation tools.
# Build the test image (libsql-only, no PostgreSQL needed)
docker build --platform linux/amd64 -f Dockerfile.test -t ironclaw-test .
# Run on port 3003 (default)
docker run --rm -p 3003:3003 \
-e ONBOARD_COMPLETED=true \
-e CLI_ENABLED=false \
-e NEARAI_API_KEY=<key> \
ironclaw-test
# Open in browser
# http://localhost:3003/?token=test
The test Dockerfile uses a two-stage build: Rust compilation with --features libsql (no PostgreSQL dependency), then a minimal Debian runtime image.
docker build --platform linux/amd64 -f Dockerfile.test -t ironclaw-test .
Build takes ~5-10 minutes on first run (cached subsequent builds are faster). The --platform linux/amd64 flag avoids QEMU warnings on Apple Silicon but can be omitted if targeting native architecture.
| Variable | Purpose | Default in Dockerfile |
|---|---|---|
ONBOARD_COMPLETED=true | Skip onboarding wizard (exits immediately otherwise) | not set |
CLI_ENABLED=false | Disable TUI/REPL (causes EOF shutdown otherwise) | not set |
Pick ONE of these configurations:
NEAR AI (API key mode):
docker run --rm -p 3003:3003 \
-e ONBOARD_COMPLETED=true \
-e CLI_ENABLED=false \
-e NEARAI_API_KEY=<your-key> \
ironclaw-test
NEAR AI (session token mode):
docker run --rm -p 3003:3003 \
-e ONBOARD_COMPLETED=true \
-e CLI_ENABLED=false \
-e NEARAI_SESSION_TOKEN=<sess_xxx> \
-e NEARAI_BASE_URL=https://private.near.ai \
ironclaw-test
OpenAI:
docker run --rm -p 3003:3003 \
-e ONBOARD_COMPLETED=true \
-e CLI_ENABLED=false \
-e LLM_BACKEND=openai \
-e OPENAI_API_KEY=<your-key> \
ironclaw-test
Anthropic:
docker run --rm -p 3003:3003 \
-e ONBOARD_COMPLETED=true \
-e CLI_ENABLED=false \
-e LLM_BACKEND=anthropic \
-e ANTHROPIC_API_KEY=<your-key> \
ironclaw-test
Dummy run (no LLM, just test the UI loads):
docker run --rm -p 3003:3003 \
-e ONBOARD_COMPLETED=true \
-e CLI_ENABLED=false \
-e NEARAI_API_KEY=dummy \
ironclaw-test
| Variable | Purpose | Example |
|---|---|---|
GATEWAY_PORT | Change the listen port | 3003 (default) |
GATEWAY_AUTH_TOKEN | Auth token for API | test (default) |
NEARAI_MODEL | Override LLM model | claude-3-5-sonnet-20241022 |
RUST_LOG | Logging verbosity | ironclaw=debug |
ROUTINES_ENABLED | Enable routines | true/false |
SKILLS_ENABLED | Enable skills system | true (default) |
Run multiple containers on different host ports:
docker run --rm -d --name ic-test-a -p 3003:3003 -e ONBOARD_COMPLETED=true -e CLI_ENABLED=false -e NEARAI_API_KEY=dummy ironclaw-test
docker run --rm -d --name ic-test-b -p 3004:3003 -e ONBOARD_COMPLETED=true -e CLI_ENABLED=false -e NEARAI_API_KEY=dummy ironclaw-test
Use the Claude for Chrome browser automation tools to test the web UI.
mcp__claude-in-chrome__tabs_context_mcp
Always start here to see current tabs and get fresh tab IDs.
mcp__claude-in-chrome__tabs_create_mcp url=http://localhost:3003/?token=test
mcp__claude-in-chrome__read_page
Check for:
mcp__claude-in-chrome__computer action=screenshot
mcp__claude-in-chrome__resize_window width=375 height=812
mcp__claude-in-chrome__computer action=screenshot
Reset to desktop:
mcp__claude-in-chrome__resize_window width=1280 height=800
mcp__claude-in-chrome__javascript_tool script="document.querySelector('.connection-status')?.textContent"
Click tabs, send messages, search skills — use computer tool with action=click and coordinate-based clicks, or use find + form_input for text entry.
# Stop a specific container
docker stop ic-test-a
# Stop all test containers
docker ps --filter ancestor=ironclaw-test -q | xargs -r docker stop
# Remove the test image
docker rmi ironclaw-test
ONBOARD_COMPLETED=true: The onboarding wizard tries to read stdin, gets EOF, and exits.CLI_ENABLED=false: The REPL channel reads stdin, gets EOF, and shuts down the agent.NEARAI_BASE_URL=https://private.near.ai.--platform linux/amd64 flag causes QEMU emulation warnings — these are harmless.-p 3005:3003.GATEWAY_HOST=0.0.0.0 (set by default in Dockerfile).docker logs <container-id>.?token=test.