Communitygithub.com

Multi-Agent Chrome Orchestrator

並行啟動 1-5 個具備獨立 Chrome 瀏覽器的 Claude Code 代理,同時執行重複性瀏覽任務。

Multi-Agent Chrome Orchestrator 是什麼?

此技能可讓使用者建立一個協調多個 Claude Code 代理的系統,每個代理擁有獨立的 Chrome DevTools MCP 實例,用於並行執行瀏覽自動化任務。適用於需要同時操作多個目標網站的場景,例如大量提交聯絡表單、填寫多平台申請、或渲染需要 JavaScript 的網頁進行爬取。技能透過一個共享的 chat.md 檔案進行溝通與任務分配,並支援透過 osascript 或手動終端機視窗啟動。其主要優勢在於大幅縮短因順序執行而耗費的時間,並提供完善的狀態監控(如 [WORKING]、[DONE]、[ERROR])與異常處理(如 CAPTCHA、速率限制)。使用後需透過 kill_chrome.sh 清除所有 Chrome 實例以釋放資源。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/BIGboss248/nextjs-wordpress/tree/HEAD/.agents/skills/multi-agent-chrome

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

多代理 Chrome 協調器

啟動 1-5 個並行的 Claude Code 代理,每個代理擁有自己的 Chrome 瀏覽器,以同時執行瀏覽器任務。

使用時機

  • 針對一系列網站提交聯絡表單
  • 在多個平台上填寫申請表
  • 爬取需要真實瀏覽器互動的 JS 渲染頁面
  • 任何順序執行過慢的重複性瀏覽器任務

架構

Business workspace (orchestrator)
├── active/multi-chrome-agent/
│   ├── chat.md                    # 共享協調檔案
│   ├── launch_chrome.sh           # 在埠 9223-9227 上產出 Chrome 實例
│   ├── kill_chrome.sh             # 關閉所有 Chrome 實例
│   ├── chrome-agent-1/            # 代理 1 的工作空間
│   │   ├── .mcp.json              # 埠 9223 上的 Chrome DevTools
│   │   └── CLAUDE.md              # 代理行為指示
│   ├── chrome-agent-2/            # 埠 9224
│   ├── chrome-agent-3/            # 埠 9225
│   ├── chrome-agent-4/            # 埠 9226
│   └── chrome-agent-5/            # 埠 9227

逐步協調流程

1. 決定需要的代理數量

檢視任務。如果有 10 個聯絡表單要填,3-5 個代理是好的。如果有 3 個,使用 2-3 個。不要過度配置。

2. 啟動 Chrome 實例

bash /Users/nicksaraev/Business/active/multi-chrome-agent/launch_chrome.sh [COUNT]

這會在埠 9223 以上產出 COUNT 個 Chrome 實例。等待每個實例的「READY」確認。

3. 重置聊天檔案

清除聊天檔案並寫入任務指派:

# Multi-Chrome Agent Chat

## Orchestrator
[2026-03-05 14:30] 啟動 3 個代理進行聯絡表單提交。

### Agent 1 Tasks
1. 前往 https://example1.com/contact -> 填入姓名:「Nick Saraev」、電子郵件:「[email protected]」、訊息:「您好,我對...感興趣」
2. 前往 https://example2.com/contact -> 相同表單填寫

### Agent 2 Tasks
1. 前往 https://example3.com/contact -> 填寫表單
2. 前往 https://example4.com/contact -> 填寫表單

### Agent 3 Tasks
1. 前往 https://example5.com/contact -> 填寫表單
2. 前往 https://example6.com/contact -> 填寫表單

## Agent 1

## Agent 2

## Agent 3

4. 產出 Claude Code 代理

對每個代理,開啟一個新的終端機並執行:

cd /Users/nicksaraev/Business/active/multi-chrome-agent/chrome-agent-N && claude

其中 N 為 1-5。每個代理將會:

  • 讀取其 CLAUDE.md(瀏覽器工作者指示)
  • 透過其本地 .mcp.json 連線到其 Chrome 實例
  • 讀取 chat.md 中的任務指派
  • 執行任務並將狀態回報至 chat.md

透過 osascript 以程式方式啟動: Claude Code 會透過 CLAUDECODE 環境變數阻止巢狀 session。若要從現有 session 中以程式方式啟動代理,請使用 osascript 配合 env -u 來移除阻塞的環境變數:

for i in 1 2 3 4 5; do
    osascript -e "tell application \"Terminal\" to do script \"cd /Users/nicksaraev/Business/active/multi-chrome-agent/chrome-agent-$i && env -u CLAUDECODE -u CLAUDE_CODE_ENTRYPOINT -u CLAUDE_AGENT_SDK_VERSION -u CLAUDE_CODE_ENABLE_SDK_FILE_CHECKPOINTING -u CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS claude --dangerously-skip-permissions -p '你是代理 $i。請讀取 /Users/nicksaraev/Business/active/multi-chrome-agent/chat.md,找到你在 Agent $i 下的任務,並執行它們。使用 Chrome DevTools MCP 瀏覽網站、搜尋列表並收集資料。將你的發現以 Markdown 表格形式寫回 chat.md 中的 Agent $i 章節。工作期間將自己標記為 [WORKING],完成後標記為 [DONE]。'\""
    sleep 2
done

這會開啟多個獨立的 Terminal.app 視窗,每個視窗執行一個獨立的 Claude Code session,並配有各自的 Chrome DevTools MCP。

手動備援: 如果 osascript 無法運作,請告知使用者開啟 N 個終端機分頁:

分頁 1:cd ~/Business/active/multi-chrome-agent/chrome-agent-1 && claude
分頁 2:cd ~/Business/active/multi-chrome-agent/chrome-agent-2 && claude
...

5. 監控進度

定期讀取聊天檔案以檢查代理狀態:

cat /Users/nicksaraev/Business/active/multi-chrome-agent/chat.md

尋找每個代理的 [DONE]、[ERROR] 或 [WORKING] 標籤。

6. 清除

當所有代理回報 [DONE] 時:

bash /Users/nicksaraev/Business/active/multi-chrome-agent/kill_chrome.sh

聊天協定

代理透過共享的 chat.md 檔案進行溝通:

標籤意義
[WORKING]代理正在積極處理任務
[DONE]代理已完成所有指派的任務
[ERROR]代理遇到障礙(CAPTCHA、超時等)
[WAITING]代理閒置,等待新任務

埠對應表

代理Chrome 埠工作空間
19223chrome-agent-1/
29224chrome-agent-2/
39225chrome-agent-3/
49226chrome-agent-4/
59227chrome-agent-5/

埠 9222 保留給主(非並行)Chrome DevTools MCP。

邊緣情況

  • CAPTCHA: 代理在聊天中回報 [ERROR] CAPTCHA on https://...。協調器可以重新指派或跳過。
  • 速率限制: 如果某個網站在 N 次請求後封鎖,將 URL 分散到更多代理,使每個代理對該網站的請求次數減少。
  • 需要登入: 在指派任務前,先在每個 Chrome 實例中預先驗證,或將登入步驟包含在任務列表中。
  • 長時間運行的任務: 代理每 30 秒檢查一次 chat.md。如果協調器需要中止,請在協調器區段寫入 [ABORT]。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

BIGboss248/nextjs-wordpress

Create, configure, manage, and validate Google Antigravity customizations including skills, rules, MCP servers, lifecycle hooks, plugins, and custom JSON configs. Use when adding new capabilities to Antigravity, configuring MCP servers, writing rules, creating skills, setting up hooks, or modernizing legacy workflows.

BIGboss248/nextjs-wordpress

Spawn multiple agents into a shared conversation where they debate, disagree, and converge on a solution via a shared chat.json file. Use for architecture decisions, code review debates, design trade-offs, or any problem that benefits from adversarial reasoning. Triggers on "chatroom", "agent debate", "have agents discuss", "agent chatroom", "debate this", or /agent-chatrooms. Also triggers on phrases like "have 3 agents argue about", "multi-agent discussion", or "let them debate".

BIGboss248/nextjs-wordpress

Always-active code intelligence, search, and navigation skill utilizing the codebase-memory MCP server. Enforces an index-first protocol (verifying and refreshing the knowledge graph via index_repository or index_status before searching, required because background auto_watch is disabled to eliminate editor stutter and system lag), followed by graph-first exploration (search_graph, trace_path, get_code_snippet, query_graph, get_architecture, detect_changes) instead of naive text grep or full-file reads. Always activate before searching the codebase, inspecting unknown architecture, finding symbols, or tracing callers/callees.

BIGboss248/nextjs-wordpress

>- Discover, interview, and craft comprehensive UX/UI design specifications (design-spec.md) and design tokens for web components. Triggers on "/component-design", "design component", "design section", "design UI", "wireframe component", or "create design spec".

BIGboss248/nextjs-wordpress

>- Configure and query WooCommerce APIs including WPGraphQL, WooGraphQL, and JWT auth for headless frontends. Use when connecting Next.js to WooCommerce or fetching store catalog data.

BIGboss248/nextjs-wordpress

Workflow for spawning an independent subagent to conduct unbiased code reviews and inject adversarial edge-case tests ([ComponentName].edge.test.tsx).

BIGboss248/nextjs-wordpress

>- Build Next.js App Router React components with Suspense skeletons, semantic OKLCH tokens, Jest + RTL unit tests, Playwright visual/hydration checks, and Tailwind logical styling. Triggers on "/nextjs-component-dev", "create component", "new component", "build component", or "develop component".

BIGboss248/nextjs-wordpress

>- Bootstrap, configure, and verify the complete Next.js App Router development environment, developer tooling, testing suites, MCP servers, Docker containerization, and CI/CD. Triggers on "/nextjs-dev-setup", "setup nextjs dev environment", "start a nextjs project", or "containerize nextjs app".

BIGboss248/nextjs-wordpress

>- Configure production health monitoring endpoints (/api/health), Docker Compose probes, and runtime metrics in Next.js App Router applications. Use when asked to "setup health check", "add health endpoint", "docker compose healthcheck nextjs", "configure health monitor", or "/nextjs-healthcheck".

BIGboss248/nextjs-wordpress

Bootstrap, configure, and verify next-intl App Router internationalization (proxy.ts/middleware.ts, next/root-params, [locale] layout, routing). Triggers on "/nextjs-i18n-setup", "setup i18n", "install next-intl", "configure next-intl", "add internationalization", "setup locale routing", "migrate to [locale]".

BIGboss248/nextjs-wordpress

Read/write translation dictionaries (messages/[locale].json), next-intl hooks (getTranslations/useTranslations), providers (Storybook/tests/subtrees), and BiDi styling. Triggers on "/nextjs-i18n-usage", "i18n dictionary", "use translations", "read dictionary", "i18n provider", "next-intl hooks", "storybook i18n", "test i18n", "add translation keys", "localize component", "create a component", "update a component".

BIGboss248/nextjs-wordpress

>- Configure, test, and verify OpenTelemetry (OTel) observability in Next.js App Router applications. Triggers on "/nextjs-otel", "setup otel", "configure opentelemetry", "test otel", or "verify opentelemetry".

BIGboss248/nextjs-wordpress

Step-by-step workflow for designing and building Next.js App Router pages (RSC page.tsx, loading skeleton, metadata, JSON-LD schema, and dynamic static params). Triggers on "/nextjs-page-dev", "create page", "new page", "develop page", "build route", or "implement page".

BIGboss248/nextjs-wordpress

>- Orchestrate end-to-end planning for Next.js App Router projects, generating canonical specifications, design systems, and a 7-phase modular implementation roadmap in docs/plan/. Triggers on "/nextjs-plan", "plan a nextjs project", "plan nextjs app", "create nextjs project plan", "outline nextjs architecture", or "generate plan".

BIGboss248/nextjs-wordpress

Workflow and engineering standards for crafting co-located Storybook CSF3 stories ([ComponentName].stories.tsx) with interactive controls, action spies, and 4 canonical theme variants.

BIGboss248/nextjs-wordpress

>- Build Next.js e-commerce frontends backed by WooCommerce APIs, handling ISR catalogs, cart sessions, and JWT authentication. Use when building or querying Next.js stores with WooCommerce.

BIGboss248/nextjs-wordpress

Self-correcting rules engine and feedback loop that learns from user corrections, mistakes, and project-specific constraints by maintaining a persistent autofix ruleset. Scans learned rules before starting any task, resolves conflicts, and automatically appends new rules upon corrections. Triggers on user corrections ("no, do it this way", "never do X", "always use Y"), /learn, "self repair", "add rule", "update rules", or when diagnosing assumptions and bugs. CRITICAL ALWAYS-ACTIVE LIFECYCLE SKILL. Must always be kept in context, loaded at session start, and consulted before starting ANY task to read and apply active constraints from autofix.json. MUST ALWAYS be triggered immediately whenever the user provides ANY correction, preference, criticism, rejection of an approach, or adjustment ("no", "don't do X", "use Y", "remember", "prefer"), or when any mistake/bug is identified. Automatically and immediately formulates and appends the new imperative rule to the project's autofix.json ruleset file.

BIGboss248/nextjs-wordpress

Setup, automate, and execute SEO audits, CI/CD pre-push/pre-deploy checks, and ranking optimizations using the seo CLI and MCP server.

BIGboss248/nextjs-wordpress

End-to-end repository onboarding and development environment setup skill. Scans repository structure, configures project metadata (docs/project.json), sets up the codebase-memory-mcp code intelligence knowledge graph server (in workspace mcp.json and globally for AGY only), configures git hooks with Husky and Commitlint, establishes multi-stage production Docker containerization, and automates credit-optimized Release Please CI/CD with multi-arch (AMD64 & ARM64) GHCR package deployment. Triggers on "/setup-repository", "setup repository", "setup repo", "initialize repository", "new repo setup", or when preparing any repository for development and AI agent workflows.

BIGboss248/nextjs-wordpress

AI screen scaffolding, layout generation, and variant exploration workflow powered by Google Stitch (StitchMCP). Consumes a component design specification (docs/design/components/[page name]/[component name]/design-spec.md), verifies and reuses the central Stitch project in docs/project.json (or creates/persists one if absent), seeds the project's design system into Stitch, synthesizes layout prompts to generate a screen and create one variant of the given design spec file, downloads and saves Stitch JPG screenshots and HTML code files directly into docs/design/components/[page name]/[component name]/stitch/ using binary-safe PowerShell Invoke-WebRequest, outputs image prompts to the user if visual assets are needed (without calling generate_image to conserve tokens), updates design-spec.md with Stitch layout benchmarks, and audits asset download integrity with an independent subagent. Triggers on "/stitch-design", "generate stitch screen", "create stitch variant", "scaffold screen with stitch", or "stitch...

相關技能