Claude-skill-registry heading-tree

Generates H1-H4 heading structure for a page. SEO-optimized hierarchy. Stateless, deterministic.

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/heading-tree" ~/.claude/skills/majiayu000-claude-skill-registry-heading-tree && rm -rf "$T"
manifest: skills/data/heading-tree/SKILL.md
source content

Heading Tree Skill

Purpose

Outputs H1-H4 heading hierarchy for a page. Structure only, no body copy.

Skill Output

Single deterministic heading tree. No alternatives, no variants.

headings:
  - level: h1
    section: hero
    text: "House Removals Bristol - Stress-Free Moving"
  - level: h2
    section: benefits
    text: "Why Families Choose Our Moving Service"
    children:
      - level: h3
        text: "Fully Insured & Protected"

Output contains

text
only. Patterns/examples are documentation only.

Input

page_type: landing | service | service-area | article
primary_keyword: "house removals bristol"  # Required
secondary_keywords: ["moving company"]      # Optional
location: "Bristol"                         # Required for local
sections: [hero, benefits, faq, final-cta]  # From allowed list
faq_questions: ["How much..."]              # Optional

Blocking Conditions (STOP)

ConditionResult
Missing
primary_keyword
STOP - no output
Missing
page_type
STOP - no output
Unknown section in listIGNORE section
Empty sections listSTOP - no output

Allowed Sections

SectionH2H3s
hero
No (H1 only)No
trust-strip
NoNo
problem
YesNo
solution
YesNo
benefits
Yes3 typical
how-it-works
Yes3 (steps)
social-proof
YesNo
pricing
Yes2-3 (tiers)
faq
Yes6 (questions)
final-cta
YesNo
gallery
YesNo
coverage
YesOptional

Unknown section → ignored, no error.

Heading Rules

H1 Rules

RuleRequirement
CountExactly 1 per page
KeywordPrimary keyword at START
LocationInclude if local business
LengthMax 60 characters
SectionAlways
hero

H2 Rules

RuleRequirement
Count1 per section (except hero, trust-strip)
OrderFollow sections order
Primary keywordIn 1-2 H2s max
LocationIn 2-3 H2s for local

H3 Rules

RuleRequirement
ParentAlways under H2 (never orphaned)
Count3-6 per parent H2
KeywordRarely, natural only

H4 Rules

RuleRequirement
Page typeArticle ONLY
CountMax 5 per page
ForbiddenLanding, service, service-area pages

FAQ Questions

ScenarioBehavior
faq_questions
provided
Use provided questions as H3s
faq_questions
empty
Use generic templates
No FAQ sectionSkip

Generic FAQ templates:

  • "How much does {service} cost?"
  • "What areas do you cover?"
  • "How do I book?"
  • "Are you fully insured?"
  • "How far in advance should I book?"
  • "Do you provide {related_service}?"

Location Mentions

For local business pages:

LevelLocation Required
H1Always
H22-3 headings
H3Rarely

Keyword Density (Annotation)

keyword_density: primary | secondary | location | none

This is annotation only — helps downstream skills, not a rule.

DensityMax Count
primary3 total (H1 + 1-2 H2s)
secondaryNo limit
locationH1 + 2-3 H2s

Example Output

page_type: landing
primary_keyword: "house removals bristol"

headings:
  - level: h1
    section: hero
    text: "House Removals Bristol - Stress-Free Moving From £299"
    
  - level: h2
    section: benefits
    text: "Why Families Choose Our Moving Service"
    children:
      - { level: h3, text: "Fully Insured & Protected" }
      - { level: h3, text: "Fixed Price, No Hidden Fees" }
      - { level: h3, text: "Professional Packing Service" }
      
  - level: h2
    section: faq
    text: "House Removals FAQs"
    children:
      - { level: h3, text: "How much do Bristol removals cost?" }
      - { level: h3, text: "What areas around Bristol do you cover?" }
      
  - level: h2
    section: final-cta
    text: "Ready for a Stress-Free Move?"

Non-goals

  • Does NOT write body copy
  • Does NOT suggest alternatives
  • Does NOT optimize existing headings
  • Does NOT do keyword research
  • Does NOT analyze competitors

Forbidden

  • ❌ Multiple H1s
  • ❌ H4 on non-article pages
  • ❌ Orphaned H3 (no parent H2)
  • ❌ Keyword stuffing (>3 primary mentions)
  • ❌ Providing alternative heading options
  • ❌ Writing body content

References

Definition of Done

  • Exactly 1 H1
  • H2s match sections list
  • H3s have parent H2
  • No H4 (unless article)
  • Primary keyword in H1
  • Primary keyword in 1-2 H2s
  • Location in H1 + 2-3 H2s (if local)