DocsbookDocsbook
← Back to catalog
analysisrequires Docsbook MCP

docs-structure-templates

Analyzes the structure and formatting of documentation pages — frontmatter completeness, heading hierarchy, prerequisites sections, code blocks, and page length. Reports issues in JSON format without editing files.

Local install
npx docs-skills install
Try in MCP
@docsbook find_skill "docs-structure-templates"

docs-structure-templates — Structure and Formatting Analysis

Before Starting#

  1. Get the repository. Ask for the GitHub repo URL or {user}/{repo}.
  2. Check Docsbook. Run mcp__docsbook__list_workspaces to find the workspace.
    • If found → use mcp__docsbook__get_doc_graph to get all pages and their metadata.
    • If not found → offer to create it first.
  3. Check the graph. If get_doc_graph returns an empty graph or no data → run mcp__docsbook__reindex_doc_graph to generate it, then retry. If it returns a stale warning, offer to reindex before proceeding.
  4. Read pages. Use mcp__docsbook__read_doc_sections to access frontmatter and content structure.
  5. Prioritize Tier 1. Analyze quick-start, pricing, and auth pages before others.

Core Principles#

1. Structure is discoverability#

A well-structured page is scannable, predictable, and findable. Readers don't read — they scan.

2. Frontmatter is the contract#

Title and description are used by search engines, AI crawlers, and the Docsbook UI. Missing or weak frontmatter is a silent SEO failure.

3. Heading hierarchy is navigation#

Screen readers and keyboard users navigate by headings. A broken hierarchy (H2 → H4) is both an a11y and a usability failure.

4. Code blocks must be self-contained#

Readers copy-paste code. A code block missing the language, context, or expected output will produce confused support tickets.


Checklist#

Frontmatter#

Heading Hierarchy#

Prerequisites and Setup Sections#

Code Blocks#

Page Length and Content Density#

Notes, Warnings, and Callouts#


What to Look For#

Severity Problem Detection
critical Missing title in frontmatter Check frontmatter of each page
critical Multiple H1 in page body Count # lines in content
high Missing description in frontmatter Check frontmatter
high Heading level skip (H2 → H4) Parse heading sequence
high Code block without language specifier ``` with no language
high Tutorial page has no prerequisites section No "Prerequisites" or "Before you begin" heading
medium Title over 60 characters String length check
medium Description over 160 characters String length check
medium Title is a noun label, not search intent Title has no verb
medium Warning appears after the action it warns about Callout position relative to code block
low No last_reviewed in frontmatter Missing optional field
low Placeholder values not obviously fake key123 instead of YOUR_API_KEY

Output Format#

{
  "type": "missing_frontmatter_title",
  "severity": "critical",
  "skill": "docs-structure-templates",
  "location": "docs/quick-start.md",
  "found": "No title in frontmatter. Page has no <title> tag and will not appear correctly in search results or browser tabs.",
  "suggestion": "Add to frontmatter: title: 'Get Started with Docsbook in 30 Seconds' (47 chars, includes primary keyword)",
  "action": "add_frontmatter_field",
  "constraints": {
    "field": "title",
    "max_length": 60
  }
}
{
  "type": "heading_level_skip",
  "severity": "high",
  "skill": "docs-structure-templates",
  "location": "docs/guides/custom-domain.md#line-34",
  "found": "H2 'Configuration' (line 12) jumps directly to H4 'Advanced settings' (line 34). H3 level is skipped. Screen readers and keyboard navigation break at this point.",
  "suggestion": "Change H4 'Advanced settings' to H3, or add an intermediate H3 'Configuration options' to group the H4 sections.",
  "action": "fix_heading_level",
  "constraints": {
    "from": "h4",
    "to": "h3"
  }
}
{
  "type": "code_block_no_language",
  "severity": "high",
  "skill": "docs-structure-templates",
  "location": "docs/api/endpoints.md#line-67",
  "found": "Fenced code block with no language specifier. Syntax highlighting is disabled; copy-paste errors are harder to spot.",
  "suggestion": "Add language specifier: change opening ``` to ```bash or ```json depending on content.",
  "action": "add_code_language",
  "constraints": {
    "options": ["bash", "json", "typescript", "python"]
  }
}

Task-Specific Questions#

When invoked directly, ask:

  1. Full audit or specific pages? All pages vs. Tier 1 only (quick-start, pricing, auth).
  2. What frontmatter fields are required for this project? (Some projects have custom fields.)
  3. Is there a style guide that defines heading conventions, callout usage, etc.?

Tool Integrations#

Tool Purpose
mcp__docsbook__list_workspaces Find workspace
mcp__docsbook__get_doc_graph Page list with titles and metadata
mcp__docsbook__read_doc_sections Read frontmatter and heading structure

View source on GitHub →Browse full catalog repo →
Keywords
structurefrontmattertemplatesheadingsformatting
MCP tools used
list_workspacesget_doc_graphread_doc_sections