Skip to main content
ClaudeWave
Skill374 repo starsupdated 6mo ago

designing-layouts

This Claude Code skill provides comprehensive guidance for designing responsive layout systems using modern CSS techniques, including grid systems, flexbox patterns, container queries, and mobile-first strategies. Use it when building responsive dashboards, structuring application shells, creating grid-based content layouts, implementing masonry designs, establishing responsive breakpoint systems, or developing flexible spacing and container systems across devices.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/ancoleman/ai-design-components /tmp/designing-layouts && cp -r /tmp/designing-layouts/skills/designing-layouts ~/.claude/skills/designing-layouts
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# Layout Systems & Responsive Design

## Purpose

This skill provides comprehensive guidance for creating responsive layout systems using modern CSS techniques. It covers grid systems, flexbox patterns, container queries, spacing systems, and mobile-first design strategies to build flexible, accessible interfaces that adapt seamlessly across devices.

## When to Use

Invoke this skill when:
- Building responsive admin dashboards with sidebars and headers
- Creating grid-based layouts for content cards or galleries
- Implementing masonry or Pinterest-style layouts
- Designing split-pane interfaces with resizable panels
- Establishing responsive breakpoint systems
- Structuring application shells with navigation and content areas
- Building mobile-first responsive designs
- Creating flexible spacing and container systems

## Layout Patterns

### Grid Systems

For structured, two-dimensional layouts, use CSS Grid with design tokens.

**12-Column Grid:**
```css
.grid-container {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding-x);
}

.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }
.col-span-3 { grid-column: span 3; }
```

**Auto-Fit Responsive Grid:**
```css
.auto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: var(--grid-gap);
}
```

For complex grid layouts and advanced patterns, see `references/layout-patterns.md`.

### Flexbox Patterns

For one-dimensional layouts and alignment control.

**Holy Grail Layout:**
```css
.holy-grail {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.holy-grail__body {
  flex: 1;
  display: flex;
}

.holy-grail__nav {
  width: var(--sidebar-width);
  flex-shrink: 0;
}

.holy-grail__main {
  flex: 1;
  min-width: 0; /* Prevent overflow */
}

.holy-grail__aside {
  width: var(--sidebar-width);
  flex-shrink: 0;
}
```

For additional flexbox patterns including sticky footer and centering, see `references/css-techniques.md`.

### Container Queries

For component-responsive design that adapts based on container size, not viewport.

```css
.card-container {
  container-type: inline-size;
  container-name: card;
}

@container card (min-width: 400px) {
  .card {
    grid-template-columns: auto 1fr;
    gap: var(--spacing-lg);
  }
}

@container card (min-width: 600px) {
  .card {
    grid-template-columns: 200px 1fr auto;
  }
}
```

Container queries are production-ready in all modern browsers (2025). For detailed usage and fallback strategies, see `references/responsive-strategies.md`.

## Responsive Breakpoints

Use mobile-first approach with semantic breakpoints.

```css
/* Mobile-first breakpoints using design tokens */
@media (min-width: 640px) {  /* sm: Tablet portrait */
  .container { max-width: 640px; }
}

@media (min-width: 768px) {  /* md: Tablet landscape */
  .container { max-width: 768px; }
}

@media (min-width: 1024px) { /* lg: Desktop */
  .container { max-width: 1024px; }
}

@media (min-width: 1280px) { /* xl: Wide desktop */
  .container { max-width: 1280px; }
}

@media (min-width: 1536px) { /* 2xl: Ultra-wide */
  .container { max-width: 1536px; }
}
```

For fluid typography and advanced responsive techniques, see `references/responsive-strategies.md`.

## Spacing Systems

Implement consistent spacing using design tokens.

```css
/* Base unit: 4px or 8px */
:root {
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
}

/* Apply systematically */
.section { padding: var(--section-spacing) 0; }
.container { padding: 0 var(--container-padding-x); }
.card { padding: var(--spacing-lg); }
.stack > * + * { margin-top: var(--spacing-md); }
```

## CSS Framework Integration

### Tailwind CSS

For utility-first approach with custom configuration:

```javascript
// tailwind.config.js
module.exports = {
  theme: {
    extend: {
      spacing: {
        'xs': 'var(--spacing-xs)',
        'sm': 'var(--spacing-sm)',
        'md': 'var(--spacing-md)',
        'lg': 'var(--spacing-lg)',
        'xl': 'var(--spacing-xl)',
      },
      screens: {
        'sm': '640px',
        'md': '768px',
        'lg': '1024px',
        'xl': '1280px',
        '2xl': '1536px',
      }
    }
  }
}
```

For Tailwind patterns and optimization, see `references/library-guide.md`.

## How to Use

### 1. Define Layout Requirements

Determine layout type and responsive behavior needed.

### 2. Choose Layout Method

- **CSS Grid**: Two-dimensional layouts, complex grids
- **Flexbox**: One-dimensional layouts, alignment
- **Container Queries**: Component-responsive designs

### 3. Implement with Design Tokens

Use design tokens from `skills/design-tokens/` for consistent spacing, breakpoints, and sizing.

### 4. Generate Configurations

For responsive breakpoints:
```bash
node scripts/generate_breakpoints.js --approach mobile-first
```

For fluid typography scale:
```bash
node scripts/calculate_fluid_typography.js --min-vw 320 --max-vw 1920
```

### 5. Validate Accessibility

Check semantic HTML and landmark regions:
```bash
node scripts/validate_layout_accessibility.js path/to/component.tsx
```

### 6. Test Responsiveness

Test across device sizes using responsive preview tools and actual devices.

## Scripts

- `scripts/generate_breakpoints.js` - Generate responsive breakpoint system
- `scripts/calculate_fluid_typography.js` - Calculate fluid typography scales
- `scripts/validate_layout_accessibility.js` - Validate semantic HTML and ARIA landmarks

## References

- `references/layout-patterns.md` - Common layout patterns (sidebar, masonry, split-pane)
- `references/responsive-strategies.md` - Mobile-first design and responsive techniques
- `references/css-techniques.md` - Modern CSS features (Grid, Flexbox, Container Queries)
- `references/accessibility-layou
administering-linuxSkill

Manage Linux systems covering systemd services, process management, filesystems, networking, performance tuning, and troubleshooting. Use when deploying applications, optimizing server performance, diagnosing production issues, or managing users and security on Linux servers.

ai-data-engineeringSkill

Data pipelines, feature stores, and embedding generation for AI/ML systems. Use when building RAG pipelines, ML feature serving, or data transformations. Covers feature stores (Feast, Tecton), embedding pipelines, chunking strategies, orchestration (Dagster, Prefect, Airflow), dbt transformations, data versioning (LakeFS), and experiment tracking (MLflow, W&B).

architecting-dataSkill

Strategic guidance for designing modern data platforms, covering storage paradigms (data lake, warehouse, lakehouse), modeling approaches (dimensional, normalized, data vault, wide tables), data mesh principles, and medallion architecture patterns. Use when architecting data platforms, choosing between centralized vs decentralized patterns, selecting table formats (Iceberg, Delta Lake), or designing data governance frameworks.

architecting-networksSkill

Design cloud network architectures with VPC patterns, subnet strategies, zero trust principles, and hybrid connectivity. Use when planning VPC topology, implementing multi-cloud networking, or establishing secure network segmentation for cloud workloads.

architecting-securitySkill

Design comprehensive security architectures using defense-in-depth, zero trust principles, threat modeling (STRIDE, PASTA), and control frameworks (NIST CSF, CIS Controls, ISO 27001). Use when designing security for new systems, auditing existing architectures, or establishing security governance programs.

assembling-componentsSkill

Assembles component outputs from AI Design Components skills into unified, production-ready component systems with validated token integration, proper import chains, and framework-specific scaffolding. Use as the capstone skill after running theming, layout, dashboard, data-viz, or feedback skills to wire components into working React/Next.js, Python, or Rust projects.

building-ai-chatSkill

Builds AI chat interfaces and conversational UI with streaming responses, context management, and multi-modal support. Use when creating ChatGPT-style interfaces, AI assistants, code copilots, or conversational agents. Handles streaming text, token limits, regeneration, feedback loops, tool usage visualization, and AI-specific error patterns. Provides battle-tested components from leading AI products with accessibility and performance built in.

building-ci-pipelinesSkill

Constructs secure, efficient CI/CD pipelines with supply chain security (SLSA), monorepo optimization, caching strategies, and parallelization patterns for GitHub Actions, GitLab CI, and Argo Workflows. Use when setting up automated testing, building, or deployment workflows.