extract-page-structure

Extract PageStructure JSON from raw HTML with NYT Birdkit rules.

Updated Aug 23, 2025
One-click install
npx skills add https://github.com/therealityreport/trr-app --skill extract-page-structure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: extract-page-structure
Source: https://github.com/therealityreport/trr-app/tree/main/.agents/skills/design-docs-agent/extract-page-structure
Command: npx skills add https://github.com/therealityreport/trr-app --skill extract-page-structure

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the extraction of structured PageStructure data from raw HTML sources, enabling consistent downstream design-doc and layout-analysis workflows.

Core Features & Use Cases

  • Metadata extraction from the head and first body elements with prioritized Open Graph and structured-data values
  • Page block classification aligned to NYT Birdkit patterns and ai2html/iframe embeds
  • Asset and embed discovery to assemble a complete PageStructure payload for tooling

Quick Start

Provide an HTML payload as input and receive a structured PageStructure JSON output.

Frequently Asked Questions about extract-page-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract page structure metadata from raw HTML?

To extract page structure metadata from raw HTML, provide the HTML payload as input to receive a structured JSON output containing metadata, blocks, assets, and embeds. The extraction preserves document order and avoids fabrication.

What is the best way to parse NYT Birdkit interactive patterns from web-scraping output?

Parsing NYT Birdkit interactive patterns from web-scraping output is handled by applying strict extraction rules aligned to Birdkit and ai2html iframe embeds. This classifies page blocks accurately while preserving the original document order.

How does metadata extraction handle Open Graph and structured-data values?

Metadata extraction prioritizes Open Graph and structured-data values found in the head and first body elements. This ensures the most accurate metadata is captured for the final PageStructure JSON interface.

Can I use this to discover assets and embeds for design-doc workflows?

Yes, you can use this to discover assets and embeds for design-doc workflows. It assembles a complete PageStructure payload by identifying assets and embeds, enabling consistent downstream layout-analysis tooling.

Does this HTML metadata extraction require any external dependencies?

No external dependencies are required for this HTML metadata extraction. It operates independently to process raw HTML sources and output the structured PageStructure JSON without needing additional libraries.

Are there limitations when extracting page blocks from unstructured HTML?

A key limitation when extracting page blocks from unstructured HTML is the avoidance of fabrication. The extraction applies strict rules for recognized patterns like Birdkit, meaning unrecognized interactive blocks may not be classified.