Skill library

Agent skill UI design

Responsive Patterns

Organize content through layout, alignment and responsive composition.

  • Responsive layout

Install the skill

Installation method

Run the command from your project root with Node.js and npm.

npx skills@latest add https://github.com/yonatangross/orchestkit/tree/main/src/skills/responsive-patterns --skill responsive-patterns --agent claude-code --yes

Check this file in your project.claude/skills/responsive-patterns/SKILL.md

Other ways to install
  • Choose an assistant interactively

    npx skills@latest add https://github.com/yonatangross/orchestkit/tree/main/src/skills/responsive-patterns --skill responsive-patterns

    Select your assistant and choose the project installation scope.

    Official instructions

The tested Skills CLI 1.10.0 requires Node.js 22.20 or later. Use a local React or HTML preview and a browser supporting CSS container queries. The publisher marks the Skill as internal guidance with `user-invocable: false`. Refer to it from a normal coding request.

View operation manual

What this skill helps with

  • Organize content through layout, alignment and responsive composition.

Good for

  • Composition and spacing
Skill name
responsive-patterns
Scenario
Adapt a reusable card to sidebar and main widths
Deliverable
A single reusable card rendering compact and expanded layouts in the same viewport.
Skill name
responsive-patterns

Define a component task with an observable result

A request with an unclear outcome

Use the global viewport breakpoint to layout every card.

A narrow sidebar can remain compact on a wide screen and has its own available width.

A workflow with observable results

  1. Measure both parent widths
  2. Add a named size query
  3. Check both instances and text scaling

Responsive Patterns operation manual

Use a named size container so the card layout responds to the width that it actually receives.

Replace the bracketed details with your own project and target.

  1. Measure both parent widths

    Use the same viewport for a fair comparison.

    Prompt · Step 1
    Use the guidance in `responsive-patterns` for [results card] shown in [sidebar and main panel]. Measure both parent inline sizes at the same desktop viewport. Determine where the title and action can fit side by side and choose a threshold based on the content. Read the bundled CSS and container query references.
  2. Add a named size query

    Use a compact fallback and widen the descendant layout.

    Prompt · Step 2
    Use `responsive-patterns` to update [card]. Declare a named inline-size container on its wrapper and target the inner card in `@container`. Start with a compact stack, then put title and action side by side at the measured threshold. Use a rem-bounded clamp with cqi for the title if it needs fluid scaling. Keep one markup order and show the resulting CSS.
  3. Check both instances and text scaling

    Keep the browser width fixed while comparing the cards.

    • A narrow sidebar stacks and a wider main card shows a row inside the same viewport.
    • Text scales within its bounds and actions stay reachable.
    Prompt · Step 3
    Use `responsive-patterns` to verify [local preview]. Place the same component in a narrow container and in a wider one. Confirm the layout changes at the declared container threshold while the viewport stays fixed. Increase text size, long-title length and keyboard-tab through each action. Record sizes, resulting layout, and any overflow.

Find the relevant rule

Point the assistant to the installed Skill and a specific issue.

Query conditions never matchReference
Command or reference
rules/css-patterns.md
Examples
Set the size container on an ancestor and target a descendant.

Responsive Patterns troubleshooting

When should I use a page media query?

Use a viewport media query for a page-level layout decision. Use a size container for portable component layout.