analyze

A command that examines a webpage and lists its available elements, such as buttons, cards, and text fields, with selectors for finding them.

In plain words
What is it for?
Inspecting a webpage at a given URL and finding selectors for extracting content or clicking elements.
Why use it?
It helps you understand which parts of a page can be collected before writing a scraper.

Command

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 commands/actionbook/actionbook/analyze
Clone the repo
git clone --depth 1 https://github.com/actionbook/actionbook
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 524 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.00000 $0.00524
Opus 5 $0.00000 $0.00262
Sonnet 5 $0.00000 $0.00105
Haiku 4.5 $0.00000 $0.00052

Measured 2d ago against content hash dcf3460c7c48, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analyze 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 2d ago.

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/commands/analyze.md · 76 lines

How it starts

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

/actionbook-scraper:analyze

Analyze a webpage's structure using Actionbook's verified selectors and show available elements for scraping.

Usage

/actionbook-scraper:analyze <url>

Parameters

  • url (required): The full URL of the page to analyze

Examples

/actionbook-scraper:analyze https://firstround.com/companies
/actionbook-scraper:analyze https://example.com/products

Workflow

  1. Extract domain from the provided URL
  2. Search Actionbook using search_actions with domain and page keywords
  3. Fetch full details using get_action_by_id for the best matching action
  4. Launch structure-analyzer agent to process and format the results
  5. Present findings with selector table and recommendations

Agent

This command uses the structure-analyzer agent (haiku model) for processing.

Output Format

## Page Analysis: {url}

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

### Available Selectors

| Element | Selector | Type | Methods |
|---------|----------|------|---------|
| Company Card | .card-container | css | click, extract |
| Card Title | .card__title | css | extract |
| Expand Button | button.expand | css | click |

### Page Structure
- **Type**: Dynamic (requires scroll)
- **Data Pattern**: Card-based with expand/collapse
- **Lazy Loading**: Yes
- **Expand/Collapse**: Yes

### Recommendations
- **Suggested Template**: playwright-js
- **Special Handling**: Scroll to load all cards, click to expand each
- **Estimated Items**: ~200 cards

Error Handling

Error Cause Solution
"No matching actions found" Site not indexed Try /actionbook-scraper:list-sources to see available sites
"Multiple matches found" Ambiguous search Results will show top matches, pick most relevant
"Partial data available" Incomplete indexing Some selectors may be missing

Notes

  • Run this command before /actionbook-scraper:generate to understand the page structure
  • Check the confidence level to gauge selector reliability
  • Review the page type to understand what template will be suggested

Read the full file on GitHub · 76 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. 2d ago First seen · 76 lines · 0 tokens per session scan A dcf3460c7c48

Subscribe to this mod's changes

analyze is a command published in the GitHub repository actionbook/actionbook (1,586 stars, last pushed 21d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 524 tokens. 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.