AgentSkillsCN

section-skeleton

生成带插槽的Astro组件骨架。无状态、确定性。无内容。

SKILL.md
--- frontmatter
name: section-skeleton
description: Generates Astro component skeleton with slots. Stateless, deterministic. No content.

Section Skeleton Skill

Purpose

Outputs Astro component skeleton with named slots. Structure only.

Input

yaml
section_type: hero | trust-strip | problem | solution | benefits | how-it-works | social-proof | faq | final-cta | footer | pricing | gallery
variant: default | compact | expanded
page_type: landing | service | service-area | article | calculator | thank-you

Output

yaml
skeleton: "<section>...</section>"
slots: [headline, body, cta-primary]
slot_semantics: { headline: h2_primary }
skeleton_verdict: PASS | WARN | FAIL

Page-Type Compatibility

SectionAllowedForbidden
herolanding, service, service-area-
problemlandingservice-area, article
solutionlandingarticle, thank-you
pricingservice, landingarticle, thank-you
galleryservice, landingcalculator
calculator-widgetcalculator, landingarticle
local-reviewsservice-arealanding
upsellthank-youlanding, service

Forbidden combination → STOP.

Section Order Constraints

SectionRule
heromust_be_first
footermust_be_last
final-ctabefore footer only
trust-stripafter hero only

Order violation → FAIL.

Slot Cardinality

SlotMinMax
headline11
subheadline01
body01
cta-primary01
cta-secondary01
image01
items0
cards0

Max exceeded → FAIL. Required missing → FAIL.

Slot Semantic Roles

SlotSEO Role
headlineh2_primary_keyword
subheadlinesemantic_support
bodytopical_depth
itemslong_tail (FAQ)

Cross-reference: heading-tree skill uses this.

Variant Behaviour

default

All slots available.

compact

yaml
forbidden_slots: [subheadline, cta-secondary, image]

expanded

yaml
required_slots: [image, subheadline]

Variant violation → WARN.

Accessibility Requirements

SlotA11y Rule
imagealt required
faq itemsaria-expanded
cta-*aria-label if icon-only

A11y missing → WARN.

Slot Naming Convention

SlotContent Type
headlineH2 element
subheadlineParagraph
bodyMultiple paragraphs
cta-primaryPrimary Button
cta-secondarySecondary Button
cta-phonePhone link
imagePicture component
itemsRepeated list items
cardsRepeated card components

Skeleton Verdict

yaml
skeleton_verdict: PASS | WARN | FAIL
issues: []
ConditionVerdict
Forbidden page-typeFAIL
Order violationFAIL
Required slot missingFAIL
Max cardinality exceededFAIL
Variant slot violationWARN
A11y missingWARN
All rules passPASS

FAIL States

Condition
Section on forbidden page-type
hero not first
footer not last
Required slot missing (headline)
Slot count > max

WARN States

Condition
Compact variant with forbidden slot
Image without alt
Icon button without aria-label

Non-goals

  • Does NOT write content
  • Does NOT style beyond structure
  • Does NOT include interactivity
  • Does NOT generate child components

References

Definition of Done

  • section_type valid for page_type
  • Order constraints satisfied
  • Required slots present
  • Cardinality rules pass
  • Variant rules pass
  • A11y requirements met
  • skeleton_verdict = PASS