Docsbook
← Back to catalog
analysis

docs-structure-templates

Catch malformed pages before reviewers do. Checks each page for frontmatter completeness, heading hierarchy, prerequisites section, code block language tags and length — and reports issues as machine-readable JSON without editing files. Cheap, deterministic, runs on every page.

Install & use this skill

Pick your AI client — install this single skill and call it.

1. Install
npx skills add Docsbook-io/docs-skills --skill docs-structure-templates -a claude-code
2. Use
/docs-structure-templates

Invoke as a slash command in chat.

Or: runtime discovery via Docsbook MCP

Already connected to the Docsbook MCP server? Skip install — ask your agent to load this skill on demand.

@docsbook find_skill "docs-structure-templates"

docs-structure-templates — Structure and Formatting Analysis

Workflow#

  1. Gather the docs — get the list of pages in scope (with metadata) and read their frontmatter and content structure. If a semantic/graph search tool over the markdown is available (self-hosted markdown-lsp, or a connected Docsbook workspace), prefer it — it's faster and cheaper than scanning files; otherwise read the files directly with grep/find. Prioritize Tier 1 pages (quick-start, pricing, auth, install) first.
  2. Apply checklist — check frontmatter fields, heading hierarchy, prerequisites and setup sections, code blocks, page length/density, and callout usage.
  3. Produce report — return one JSON issue object per finding, sorted by severity.

Guardrails#

Inputs#

This skill needs two things, by whatever means are available:

Acceleration (optional). Graph/semantic search over the docs makes navigation faster and cheaper than scanning files. You can self-host it with markdown-lsp, or get the same capability in the cloud by connecting a Docsbook workspace. With nothing connected, plain file reads and grep/find work fine.

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"]
  }
}

Acceptance Criteria#

View source on GitHub →Browse full catalog repo →
Keywords
structurefrontmattertemplatesheadingsformatting