Skip to main content
subagent

document-structure-analyzer — Claude Code subagent for document analysis

This subagent maps document regions, content hierarchy, and reading order. Use it before OCR when the relationships between headings, tables, and other elements matter.

Install into Claude Code · claude-code-templates All methods and platforms ↓
npx claude-code-templates@latest --agent ocr-extraction-team/document-structure-analyzer
Open on GitHub

What document-structure-analyzer does

The subagent examines page layout and content hierarchy. It identifies headings and body text, recognizes tables, lists, and forms, and works out reading order in multi-column pages. It can also assign semantic roles to visual elements and spot recurring document patterns.

Its output can include labeled region maps, hierarchy schemas, reading sequences, and suggestions for OCR preparation. The available tools are Read and Write, and structural decisions include confidence scores. This is a pre-OCR analysis step, not text recognition itself; OCR requires a separate process.

What it helps with

  • label regions by document content type
  • set reading order for multi-column pages
  • map headings and body text into a hierarchy
  • identify table, list, and form structure
  • prepare layout recommendations before OCR

Example prompts for the agent

  • Map the regions in this document and label their roles.
  • Work out the reading sequence for this multi-column file.
  • Identify headings, tables, and forms before OCR.

How to install document-structure-analyzer

1claude-code-templates

npx claude-code-templates@latest --agent ocr-extraction-team/document-structure-analyzer

2Manually: put the files in place

.claude/agents/document-structure-analyzer.md

For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean

Questions about document-structure-analyzer

How do I install document-structure-analyzer in Claude Code?

Run npx claude-code-templates@latest --agent ocr-extraction-team/document-structure-analyzer, then use .claude/agents/document-structure-analyzer.md.

What does document-structure-analyzer do?

It maps document layout and content hierarchy, labels visual elements by their semantic role, and determines reading order. Its analysis can guide preparation for OCR.

Does the subagent perform OCR?

It analyzes structure and can recommend preprocessing before OCR. Text recognition itself is not among its listed tasks.

Similar subagents

Subagents catalog →

From the same set361

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor