multi-agent-browser-text-extraction
Skill11 starsChanged 5 months agoMITView on GitHub
Use delegate_task with multiple browser-equipped sub-agents to extract verbatim text from Chinese academic/religious websites with JavaScript-heavy tree navigation. Covers coordination patterns, site-specific navigation, error recovery, and QA verification.
In this repository26 other files it gives its agents.
- agent-capability-comparison-methodologySkill
- autonomous-work-signalingSkill
- batch-skill-description-standardizationSkill
- checkpoints-and-rewindSkill
- context-aware-task-decompositionSkill
- context-compaction-verification-and-recoverySkill
- cross-session-execution-frameworkSkill
- hermes-agentSkill
- hermes-improvement-multiphase-planSkill
- hermes-tweetSkill
- multi-role-synthesis-frameworkSkill
- openclaw-hermes-archSkill
- open-source-adaptation-patternSkill
- planSkill
- requesting-code-reviewSkill
- router-learning-systemSkill
- security-hardening-checklistSkill
- self-regulation-brake-systemSkill
- skill-slimming-strategySkill
- spec-driven-developmentSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- think-toolSkill
- token-efficiencySkill
- writing-plansSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 47
Test browser_console to extract content:
- Distinctive: line 85
After all sub-agents complete:
- Distinctive: line 87
Write a verification script to check all target IDs have content
- Distinctive: line 88
Verify text is non-empty and reasonably sized (200+ chars per entry)
- Distinctive: line 101
After compiling, run a quick check:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Multi-Agent Browser Text Extraction
Extract large volumes of original text from JavaScript-heavy Chinese websites (e.g. ddc.shengyen.org 法鼓全集) using parallel delegate_task sub-agents, each with browser toolset.
When to Use
- Target site has JS-heavy tree menu navigation (not static HTML)
- Need to extract 10+ pages of verbatim text from different chapters/books
- Site has bot detection that varies by URL path
- Each extraction requires clicking through tree menus to reach specific chapters
- Content must be 100% verbatim (no paraphrasing)
Prerequisites
delegate_tasktool withbrowsertoolset enabled- Target site URL (usually a single base URL with query-param navigation)
- Mapping of questions/topics to specific book chapters
Workflow
Phase 1: Discovery (single browser session)
- Navigate to the base URL (e.g.
https://ddc.shengyen.org/) - Explore the tree menu structure. Note:
- Which expandable levels exist (e.g. 輯 > 冊 > 章)
- Whether chapters are loaded via
javascript:void(null)links (they usually are) - Whether the URL changes when clicking chapters (it usually doesn't — content loads via AJAX)
- Test
browser_consoleto extract content:document.querySelector('[class*="content"]')?.innerText || document.body.innerText.substring(0, 5000) - Identify any bot detection early. If the site blocks, try different URL paths.
Phase 2: Batch Spawn (parallel extraction)
Divide the chapters into batches of 5-9 questions each. Each batch spawns a delegate_task with toolsets: ["browser"].
Critical passing of context:
- Provide the EXACT chapter names and book numbers (e.g.
05-02 正信的佛教) - Provide output format template
- Set
max_iterations=40-55for 6-9 chapters - Include site navigation instructions in the context
Context template:
HOW TO USE THE SITE:
1. Go to https://ddc.shengyen.org/
2. Click "第五輯 佛教入門類" in left sidebar to expand
3. Click the book (e.g. "05-03 學佛群疑") to expand its chapters
4. Click a chapter name from the expanded sub-menu
5. Use browser_console: document.querySelector('[class*="content"]')?.innerText || ...
6. Copy the EXACT text, verbatim
QUESTIONS TO EXTRACT:
{list of questions with book and chapter mapping}
Output format for EACH question:
## Question: {question}
**Source**: 《書名》聖嚴法師 — Chapter Name
**Original Text**:
> {exact, verbatim, can be long}Phase 3: Compile & Verify
After all sub-agents complete:
- Compile results into a structured JS/JSON file
- Write a verification script to check all target IDs have content
- Verify text is non-empty and reasonably sized (200+ chars per entry)
Pitfalls
- Site uses
javascript:void(null)links — browser snapshot won't show chapter content directly. You MUST usebrowser_consolewith innerText extraction after clicking. - Tree menu gets truncated — the snapshot may only show ~50 tree items. You may need to scroll or use
browser_visionto find which element index to click. - Browser sessions are isolated — sub-agents each get their own browser state; they don't conflict.
- Bot detection at root URL —
ddm.org.twblocks automated browsers. The mirrorddc.shengyen.orgworks without blocking. - Sub-agents hit iteration limits — set
max_iterationsgenerously (40-55) for 6-9 chapters. If still failing, split into smaller batches. - Sub-agents can't access parent memory — every context they need must be in the
contextparameter. Don't assume they know project structure.
Verification
After compiling, run a quick check:
const texts = require('./data/quiz-original-texts.js');
const targetIds = [...]; // all expected IDs
targetIds.forEach(id => {
if (!texts[id] || texts[id].length === 0) console.error(`MISSING: ${id}`);
});Real-World Example
Extracting 21 chapters from Master Shengyan's 法鼓全集 at ddc.shengyen.org:
- 3 sub-agents in parallel, each handling 7-9 chapters
- Total time: ~8 minutes (vs ~45 minutes sequential)
- Success rate: 21/21 chapters extracted
- Key insight: search function on the site is unreliable; tree navigation is the only reliable path
- Cost: ~150 browser tool calls total across all agents
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

