extract-table-pagination
Skill8 starsChanged 7 months agoMITView on GitHub
Extract structured data from an HTML table, optionally walking through paginated views. Returns a list of row dicts keyed by header cells. The demo skill (used to monitor conference paper lists).
In this repository14 other files it gives its agents.
- date-picker-widgetSkill
- detect-captchaSkill
- dismiss-cookie-bannerSkill
- dismiss-newsletter-popupSkill
- exit-tracking-popupSkill
- fill-multi-step-formSkill
- handle-infinite-scrollSkill
- handle-modal-dialogSkill
- login-flowSkill
- pagination-next-pageSkill
- searchable-dropdownSkill
- search-and-filterSkill
- upload-download-fileSkill
- verify-page-loadedSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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 73
Virtualized tables (~5% of modern web apps): only the visible rows are in the DOM at any time.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Extract Table Pagination
When to invoke
When the user task involves reading structured data from an HTML table — the page either shows a <table> element, or a role="table" ARIA structure. If the table is paginated, the skill walks pages via a "next" link/button until either the next link is absent, the row count stops growing, or a configurable max_pages is reached.
The matcher gives this a high score when the DOM summary contains <table and the visible-text sample has table-like indicators (numeric columns, repeated short text).
Recipe
- wait_for_dom_ready timeout=5s
- wait_for_selector selector="table, [role='table']" state=visible timeout=5s
- extract_table selector="table" into="$rows_page_1"
- wait extra=200ms
Success criteria
- assert $rows_page_1 is_non_empty_list
Pagination companion
For paginated tables, chain with the pagination-next-page skill in a loop. The runner's vars map preserves bindings across skill invocations so the agent can accumulate rows.
Pseudo-recipe the agent assembles:
while page <= max_pages:
invoke_skill("extract-table-pagination") → $rows_page_N
accumulated += $rows_page_N
if no "next" link visible: break
invoke_skill("pagination-next-page")We deliberately keep extraction and pagination as separate skills so the agent can interleave with other steps (rate-limit pauses, filter applications, deduplication).
When NOT to use
- The data lives in a
<div>-grid layout (card grid, masonry, etc.) — use the futureextract-card-gridskill, or vision fallback. - The table is virtualized (only renders visible rows on scroll, e.g., AG Grid, MUI DataGrid). Use
handle-infinite-scrollwith row-extraction inside the scroll loop instead. - The "table" is actually a layout
<table>from 2003-era HTML (no<th>, no semantic structure). The extractor will produce noisy results; better to extract by text-selector and structure manually.
Known failures
- Virtualized tables (~5% of modern web apps): only the visible rows are in the DOM at any time. The extractor returns just those. Workaround: combine with
handle-infinite-scrollor scroll-and-extract. - Tables with rowspan/colspan (~3%): the naive header-zip extractor mis-aligns columns. Vision fallback handles for now; v0.2.0 will support
extract_table mode="rowspan-aware". - No
<thead>, no<th>(~5% of legacy sites): the extractor uses the first row as headers; if that row is data, the first record is lost. Workaround: passheaders=[...]arg (planned v0.2.0). - Server-side-rendered "infinite scroll" disguised as pagination: the next-page link returns the SAME rows on click. Detection logic in
pagination-next-pageaborts when row hashes match.
Example usage
Agent task: "Get the latest cs.AI papers from arxiv."
→ invoke_skill("verify-page-loaded") → success
→ invoke_skill("extract-table-pagination") → success, $rows_page_1 = [{title, authors, abstract}, ...]
→ agent inspects $rows_page_1 and reportsRelated skills
verify-page-loaded— run first; tables on slow-rendering pages need readiness checkpagination-next-page— chain to walk multiple pageshandle-infinite-scroll— alternative when content lazy-loads instead of paginatingdismiss-cookie-banner— usually run before any extraction
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.

