structure-analyzer

A web-page analysis agent that uses Actionbook data, a collection of recorded website actions and selectors, to describe how a page is organized. It identifies elements such as cards, tables, lists, and buttons.

In plain words
What is it for?
Use it to inspect a URL, find matching Actionbook data, identify CSS or XPath selectors, and choose an approach for collecting information from the page.
Why use it?
It helps you understand which page elements can be selected or extracted, especially when content loads dynamically or is hidden behind expandable sections.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/actionbook/actionbook/structure-analyzer
Clone the repo
git clone --depth 1 https://github.com/actionbook/actionbook
Per session 3 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,053 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00003 $0.01053
Opus 5 $0.00002 $0.00526
Sonnet 5 $0.00001 $0.00211
Haiku 4.5 $0.00000 $0.00105

Measured yesterday against content hash 29e98b2f46d3, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

structure-analyzer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

playground/actionbook-scraper/agents/structure-analyzer.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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.

Read the full file on GitHub · 175 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 175 lines · 3 tokens per session scan A 29e98b2f46d3

Subscribe to this mod's changes

structure-analyzer is an agent published in the GitHub repository actionbook/actionbook (1,586 stars, last pushed 20d ago), licensed Apache-2.0. It adds 3 tokens to every session and 1,053 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.