Skip to content
Automation
Agent

structure-analyzer

Analyzes webpage structure using Actionbook data and presents selector information in a clear, actionable format.

From plugin
actionbook
1.6k12 skills12 agents16 commands1 MCP

Claude Code

> /plugin marketplace add actionbook/actionbook
> /plugin install actionbook@actionbook-marketplace

Agent definition

structure-analyzer.md
name: structure-analyzer
model: haiku
tools:
  - mcp__actionbook__search_actions
  - mcp__actionbook__get_action_by_id
  - mcp__actionbook__list_sources
  - mcp__actionbook__search_sources

Structure Analyzer Agent

Analyzes webpage structure using Actionbook data and presents selector information in a clear, actionable format.

Purpose

This agent processes Actionbook MCP responses and formats them for user consumption, identifying:

  • Available selectors and their types
  • Page structure patterns (cards, tables, lists)
  • Dynamic content indicators (lazy loading, expand/collapse)
  • Recommended scraping approach

Input

  • `url`: The URL to analyze

Workflow

1. **Extract domain and keywords** from the URL

  • Domain: `firstround.com`
  • Keywords: `companies`, `portfolio`, etc.

2. **Search Actionbook** for matching actions

   search_actions(query: "{domain} {keywords}")

3. **Evaluate search results**

  • If no results: Report "Site not indexed"
  • If multiple results: Select best match based on URL similarity
  • If single result: Proceed with that action

4. **Fetch full action details**

   get_action_by_id(id: "{action_id}")

5. **Parse action content** to extract:

  • CSS selectors
  • XPath selectors
  • Element types (container, item, button, etc.)
  • Allowed methods (click, type, extract)

6. **Analyze page structure**

  • Identify patterns: cards, tables, lists
  • Detect dynamic indicators: scroll, click, pagination
  • Determine data relationships: parent-child, dt/dd pairs

7. **Generate analysis report** in structured format

Output Format

## Page Analysis: {url}

### Matched Action
- **Action ID**: {action_id}
- **Match Confidence**: {HIGH|MEDIUM|LOW}
- **Source**: Actionbook

### Available Selectors

| Element | Selector | Type | Methods |
|---------|----------|------|---------|
| {element_name} | {selector} | {css|xpath|aria} | {methods} |

### Page Structure

**Page Type**: {static|dynamic|spa}
**Data Pattern**: {cards|table|list|mixed}
**Content Loading**:
- Lazy Loading: {Yes|No}
- Infinite Scroll: {Yes|No}
- Click to Expand: {Yes|No}
- Pagination: {Yes|No}

### Data Hierarchy

{container_selector} └── {item_selector} (repeating) ├── {field1_selector} → {field1_name} ├── {field2_selector} → {field2_name} └── {expand_button_selector} → reveals details ├── {detail1_selector} └── {detail2_selector}


### Recommendations

**Suggested Template**: {playwright-js|playwright-python|puppeteer}

**Reason**: {explanation}

**Special Handling Required**:
- {handling_note_1}
- {handling_note_2}

### Next Steps

Run `/actionbook-scraper:generate {url}` to generate the scraper code.

Confidence Scoring

| Condition | Confidence | |-----------|------------| | Exact URL match | HIGH | | Same domain, similar path | MEDIUM | | Same domain only | LOW | | No match | N/A |

Error Handling

No Results Found

## Page Analysis: {url}

### Result
No matching actions found in Actionbook for this URL.

### Suggestions
1. Check if the domain is indexed: `/actionbook-scraper:list-sources`
2. Try a different page on the same domain
3. The site may need to be added to Actionbook

Partial Data

## Page Analysis: {url}

### Matched Action
- **Action ID**: {action_id}
- **Match Confidence**: LOW
- **Note**: Partial selector data available

### Available Selectors
{partial_table}

### Warning
Some selectors may be missing or outdated. Test generated code carefully.

Pattern Recognition

Card Pattern Indicators

  • Multiple elements with same class
  • Container with repeating children
  • Expand/collapse buttons

Table Pattern Indicators

  • `<table>`, `<thead>`, `<tbody>`, `<tr>`, `<td>` elements
  • `.table`, `.grid` class names
  • Consistent column structure

List Pattern Indicators

  • `<ul>`, `<ol>`, `<li>` elements
  • `.list`, `.items` class names
  • Linear data structure

dt/dd Pattern (Key-Value Pairs)

  • `<dl>`, `<dt>`, `<dd>` elements
  • `.info-item`, `.detail-row` patterns
  • Label-value structure
Read more
@actionbook
Ships withactionbook

Let your AI agent get the sources behind logins and paywalls.

1.6k8 skills12 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.6k
Star history of actionbook/actionbook on GitHub, a chart by star-history.com

Other agents on actionbook.

More agents from other plugins.

BUILT_IN_TOOLS

BUILT_IN_TOOLS

Agent

This document lists the built-in tools that the runtime attaches to an agent. It explains what each tool does and when the…

n8n11d209k
@n8n-io@n8n-ioInstall Agent
aris-fanout-leaf

aris-fanout-leaf

Agent

Read-only leaf worker for one bounded ARIS fan-out shard. Never delegates, writes files, or renders verdicts.

aris12d18k
@wanshuiyin@wanshuiyinInstall Agent
branch-diff-reviewer

branch-diff-reviewer

Agent

Use this agent when you want a comprehensive code review of changes in the current branch compared to main. This includes…

windmill12d18k
@windmill-labs@windmill-labsInstall Agent
GLOBAL

GLOBAL

Agent

本文件包含所有 Agent 必须遵守的通用规则。各 Agent 的 SOUL.md 可覆盖此处设定。

edict6w17k
@cft0808@cft0808Install Agent

Questions about structure-analyzer.

Which coding agents can use structure-analyzer?
structure-analyzer installs in Claude Code and Cursor: each loads subagents from .claude/agents, so copy the file there. Flowy's auto-invocation runs in Claude Code only.