Skip to content
Back to skills

Collection

ASecurity

Reusable HTML page patterns and component blocks. Use when building common page types like FAQs, product listings, press releases, or other structured content.

  • 24 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
developmentgo

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add mattnigh/skills_collection --skill collection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Collection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Collection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mattnigh-collection-168a4bfb/badge)](https://www.skillsdirectory.com/skills/mattnigh-collection-168a4bfb)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: patterns
description: Reusable HTML page patterns and component blocks. Use when building common page types like FAQs, product listings, press releases, or other structured content.
allowed-tools: Read, Write, Edit
---

# HTML Patterns Skill

This skill provides reusable patterns for common page types and content blocks. Patterns combine semantic HTML with custom elements to create consistent, accessible structures.

## Philosophy

Pages are composed of **blocks** - reusable content patterns that appear across many pages. By defining custom elements for these blocks, we:

1. **Communicate intent** - `<faq-question>` is clearer than `<dt class="faq-q">`
2. **Enable styling** - Custom elements can be styled with CSS
3. **Support tooling** - Validators can enforce correct usage
4. **Document structure** - The markup is self-documenting

## Available Patterns

| Pattern | Elements | Use Case |
|---------|----------|----------|
| [FAQ](#faq-pattern) | `faq-list`, `faq-question`, `faq-answer` | Q&A pages, help sections |
| [Product Card](#product-card-pattern) | `product-card` | Product listings, catalogs |

---

## FAQ Pattern

### Elements

```
faq-list
├── faq-question
├── faq-answer
├── faq-question
├── faq-answer
└── ...
```

### Element Definitions

| Element | Content | Attributes |
|---------|---------|------------|
| `faq-list` | `faq-question`, `faq-answer` | `category` (optional) |
| `faq-question` | Phrasing content (text, links) | `id` (for anchor links) |
| `faq-answer` | Flow content (paragraphs, lists) | - |

### Usage

```html
<section id="products" aria-labelledby="products-heading">
  <h2 id="products-heading">Products</h2>
  <faq-list category="products">
    <faq-question id="faq-returns">What is your return policy?</faq-question>
    <faq-answer>We offer a 30-day hassle-free return policy.</faq-answer>

    <faq-question id="faq-shipping">How long does shipping take?</faq-question>
    <faq-answer>Standard shipping takes 5-7 business days.</faq-answer>
  </faq-list>
</section>
```

### Complete FAQ Page Structure

```html
<main id="main">
  <article>
    <h1>Frequently Asked Questions</h1>

    <!-- Table of contents -->
    <nav aria-label="FAQ sections">
      <ul>
        <li><a href="#products">Products</a></li>
        <li><a href="#shipping">Shipping</a></li>
      </ul>
    </nav>

    <!-- FAQ sections -->
    <section id="products" aria-labelledby="products-heading">
      <h2 id="products-heading">Products</h2>
      <faq-list category="products">
        <faq-question id="faq-q1">Question text?</faq-question>
        <faq-answer>Answer text.</faq-answer>
      </faq-list>
    </section>

    <!-- More sections... -->

    <!-- Call to action -->
    <aside>
      <p><strong>Still have questions?</strong></p>
      <p><a href="/contact">Contact us</a></p>
    </aside>
  </article>
</main>
```

### Accessibility Notes

- Each section has `aria-labelledby` pointing to its heading
- Questions have `id` attributes for direct linking
- Table of contents uses `<nav>` with descriptive `aria-label`
- Links within answers use proper `mailto:` and `tel:` protocols

---

## Product Card Pattern

### Element Definition

| Element | Content | Attributes |
|---------|---------|------------|
| `product-card` | Flow content | `sku`, `price` (optional) |

### Usage

```html
<product-card sku="WDG-PRO-001" price="79.99">
  <img src="widget-pro.jpg" alt="Widget Pro"/>
  <h3>Widget Pro</h3>
  <p>Our best-selling widget with enhanced durability.</p>
  <a href="/products/widget-pro">View details</a>
</product-card>
```

### Product Listing Structure

```html
<section aria-labelledby="products-heading">
  <h2 id="products-heading">Our Products</h2>
  <ul>
    <li>
      <product-card sku="WDG-001">
        <img src="widget.jpg" alt="Basic Widget"/>
        <h3>Basic Widget</h3>
        <p>Entry-level widget for beginners.</p>
      </product-card>
    </li>
    <!-- More products... -->
  </ul>
</section>
```

---

## Creating New Patterns

When you identify a repeating content structure:

1. **Define the elements** in `elements.json`
2. **Document the pattern** in this skill
3. **Create an example** in the examples directory
4. **Add to project dictionary** if needed

### Element Naming Conventions

- Use lowercase with hyphens: `pattern-element`
- Be descriptive: `faq-question` not `fq`
- Group related elements: `faq-list`, `faq-question`, `faq-answer`

---

## Page Type Patterns

Beyond component blocks, entire page types follow patterns:

| Page Type | Key Sections |
|-----------|--------------|
| Homepage | Hero, featured products, news, CTA |
| About | History, mission, values, leadership, milestones |
| Product List | Category nav, product grid, filters |
| Product Detail | Hero, specs, reviews, related |
| Contact | Info, form, map, hours |
| FAQ | TOC nav, categorized Q&A sections |
| Press Release | Headline, dateline, body, boilerplate, contacts |
| Legal | Numbered sections, definitions, effective date |

See individual examples in the `.claude/patterns/pages/` directory.

## Related Skills

- **xhtml-author** - Write valid XHTML-strict HTML5 markup
- **css-author** - Modern CSS organization with native @import, @layer casca...
- **progressive-enhancement** - HTML-first development with CSS-only interactivity patterns
- **forms** - HTML-first form patterns with CSS-only validation

Files in this skill

  • 0Chan-smc__claude-code-workflow-lab__claude__skills__frontend-dev-guidelines__SKILL.md15.1 KB
  • 17hz__nextjs-template__claude__skills__example-skill__SKILL.md316 B
  • 1ambda__dataops-platform__claude__skills__context-synthesis__SKILL.md3.5 KB
  • 1natsu172__dotfiles__claude__skills__git-analysis__SKILL.md5.4 KB
  • 1natsu172__dotfiles__claude__skills__github-pr-best-practices__SKILL.md7.7 KB
  • 23Maestro__prospect-pipeline__claude__skills__npid-fastapi-skill.md26.1 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-javascript__SKILL.md15.7 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-code-python__SKILL.md17.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-expression-syntax__SKILL.md9.4 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-mcp-tools-expert__SKILL.md12.5 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-node-configuration__SKILL.md16.6 KB
  • 360AYA25__ClaudeN8N__claude__skills__n8n-workflow-patterns__SKILL.md11.2 KB
  • 3x-Projetos__claude-memory-framework__claude__skills__scientist__SKILL.md14.8 KB
  • 5MinFutures__futures-arena__claude__skills__migration-tracker__SKILL.md16.2 KB
  • 5MinFutures__futures-arena__claude__skills__planning-guidelines__SKILL.md11.8 KB
  • 92Bilal26__TaskPilotAI__claude__skills__assessment-builder__SKILL.md17.5 KB
  • 92Bilal26__TaskPilotAI__claude__skills__book-scaffolding__SKILL.md19.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__code-validation-sandbox__SKILL.md6.2 KB
  • 92Bilal26__TaskPilotAI__claude__skills__exercise-designer__SKILL.md18.1 KB
  • 92Bilal26__TaskPilotAI__claude__skills__learning-objectives__SKILL.md24.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…