Agent skill

Responsive Layout

by makifbaysal in makifbaysal/tasktrooper

A skill your agent uses when you build or change a layout, page, section, navigation, table, form or image - mobile-first rules, breakpoints and the overflow traps.

Apache-2.0Auto-check passedFrontend & Design

Install Responsive Layout

skills CLI
$ npx skills add makifbaysal/tasktrooper --skill responsive-layout -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install makifbaysal/tasktrooper responsive-layout --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/makifbaysal/tasktrooper.git skills-src && mkdir -p .claude/skills && cp -r skills-src/catalog/agents/frontend-developer/skills/responsive-layout .claude/skills/responsive-layout && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
responsive-layout
GitHub stars
109
Token cost
~2.8k tokens
SKILL.md length
1,380 words
Files
1
Skills in repo
99
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when you build or change a layout, page, section, navigation, table, form or image - mobile-first rules, breakpoints and the overflow traps.

  • Change a layout
  • SKILL.md covers Overview, Rules, Layout primitives and Overflow trap catalogue, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Image - mobile-first rules

What it does

Responsive Layout is an agent skill from makifbaysal/tasktrooper. Use when you build or change a layout, page, section, navigation, table, form or image - mobile-first rules, breakpoints and the overflow traps.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Responsive design. The repository describes itself as: Local-first agent platform: board + role agents + agent CLI runs (Claude Code, Cursor, Antigravity, OpenCode) or local and API models (Ollama, LM Studio), all on your own Mac. The licence is Apache-2.0.

When your agent uses it

  • Change a layout
  • Image - mobile-first rules
  • Breakpoints and the overflow traps

Example prompts

  • “/responsive-layout”

What it can do on your machine

Read from SKILL.md and the folder at commit 09f6258. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Responsive Layout loads about 2.8k tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 1,380 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from makifbaysal/tasktrooper at commit 09f6258, republished under its Apache-2.0 licence (© makifbaysal). 1,380 words, ~2,806 tokens.

Download SKILL.mdSave it as .claude/skills/responsive-layout/SKILL.md (or your agent's skills folder).
name
responsive-layout
description
Use when you build or change a layout, page, section, navigation, table, form or image - mobile-first rules, breakpoints and the overflow traps.
category
frontend
source
pbakaus/impeccable (Apache-2.0), vercel-labs/web-interface-guidelines (MIT), ibelick/ui-skills (MIT), nextlevelbuilder/ui-ux-pro-max-skill (MIT), adapted

Responsive Layout

Overview

Every layout is designed at 360px first, then widened. Desktop-first layouts that get "patched down" with max-*: overrides are where almost every overflow bug comes from, because the narrow case was never actually built — it was reverse-engineered from the wide one under time pressure.

Core principle: Build the 360px layout first, make it correct, then add md:/lg: to use the extra space. Never write desktop styles first and patch down.

Rules

  • Unprefixed Tailwind utilities are the phone layout. sm: (640) md: (768) lg: (1024) xl: (1280) 2xl: (1536) add capability upward — they never subtract it.
  • Breakpoints follow Tailwind's default scale; pick one by where your content breaks (a nav that collapses, a table that gets cramped), not by matching a specific device.
  • Never max-*: as the primary layout strategy — it means the base case is the wrong one.

Layout primitives

  • Container: mx-auto w-full max-w-7xl px-4 sm:px-6 lg:px-8 for page content; narrower for prose (max-w-prose / max-w-3xl) in marketing sections.
  • Section rhythm: py-12 md:py-16 lg:py-24 — more space grows with viewport, it doesn't appear from nothing at md.
  • Grid recipes: grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3 for card/list grids; grid-cols-[repeat(auto-fit,minmax(min(100%,16rem),1fr))] when the item count is unknown and a fixed column count would leave gaps or force scroll (ui-guard's allow-listed arbitrary value).
  • Flex rows that wrap: flex flex-wrap gap-2 for chip/tag/button rows — never a fixed-height row that clips.
  • Sidebars: stack below lg (flex flex-col lg:flex-row), sidebar full-width on phone, fixed-width only at lg: and up.
  • Container queries: an organism placed in genuinely different-width contexts (a dashboard grid cell vs. a full-width page) sizes off its own box — @container on the wrapper, @md:/@lg: on the organism — instead of the page's breakpoints; the viewport can be 1440px while the card is 300px wide.

Overflow trap catalogue

Each trap below was reproduced in a real browser at 360–1440px and its fix confirmed clean.

SymptomCauseFix
Flex/grid item refuses to shrink, pushes siblings off-screenFlex/grid items default to min-width: auto; a truncate/whitespace-nowrap descendant sets that item's min-content to its full unbroken widthmin-w-0 on the item that holds the text (not just the text itself); shrink-0 on siblings that must stay fixed
Page scrolls sideways with no single element flagged as overflowingA long word or URL with no space for the browser to wrap on — the block keeps its layout width while the text spills out of it, so browser_set_viewport reports that the page scrolls horizontally but names no overflowing element. Search the page for long unbroken stringsbreak-words (overflow-wrap: anywhere) on the text node; never break-all (it breaks mid-word even when wrapping wasn't needed)
A panel is too wide below some breakpointA literal pixel width (w-[600px])w-full + a max-w-* cap so it still has a ceiling on wide screens
Image forces horizontal scrollSomething overrides Tailwind v4's own preflight, which already sets img, video { max-width: 100%; height: auto } — a stray max-w-none, a reset library, or a hard inline maxWidthGive the image w-full h-auto max-w-full, explicit width/height attributes (prevents CLS), and object-cover + aspect-* when it fills a fixed box. A bare <img> with no extra classes does not overflow by default in Tailwind v4 — if one does, something upstream overrides preflight
A row of buttons/chips runs off the right edgewhitespace-nowrap on the row instead of letting items wrapflex flex-wrap gap-2 — wrap the row, don't force it onto one line
A decorative shape (blob, ring, gradient) pokes past the viewport edge even on desktopAn absolutely-positioned decoration with a negative offset (-right-10) and no clip on its own stacking contextoverflow-x-clip on the section that owns the decoration, never on body (that breaks every position: sticky on the page)
Full-bleed section overflows as soon as it's not a direct child of bodyw-screen (100vw) ignores every ancestor's padding/offset — it ties to the viewport, not the nearest positioned parent, so it overflows the moment it's nested inside anything with horizontal paddingw-full (ties to the parent instead); reach for w-screen only with a negative-margin bleed technique on a direct full-width wrapper, and test it
grid-cols-3 (or any fixed count) is unusable at 360pxShort, wrapping text in a 3-up grid just looks cramped — it does not overflow by itself. It becomes an actual overflow once any cell holds one long unbreakable token (a code snippet, a slug, a username): grid items default to min-width: auto too, so that one cell's min-content can force the whole track wider than the viewportgrid-cols-1 sm:grid-cols-2 lg:grid-cols-3 (mobile-first column count) and min-w-0 break-words on every cell, so neither the column count nor a stray long token can force the overflow
A data table forces the whole page to scroll sidewaysThe <table> laid out directly in the page flow, no scroll boundary around itWrap it in its own overflow-x-auto (table keeps min-w-* so columns stay legible; the wrapper — not the page — scrolls), or replace it with stacked cards below md for simpler tables. Comparison/pricing tables: cards below md, or a sticky first column. A scroll wrapper is keyboard-reachable: tabIndex={0}, role="region" and an aria-label naming the table (axe scrollable-region-focusable fails without it). The page-level horizontal-scroll check correctly stays clean here — the wrapper scrolls, the page does not
100vh content gets cut off under mobile browser chromeh-screen/100vh is measured before the address bar collapses, so content sits behind itmin-h-dvh (never h-screen)
Long compound words (German, Turkish) blow out a heading's lineNo wrap/hyphenation hint, and the heading's container is width-constrainedtext-balance on the heading, hyphens-auto with the correct lang on the element
Show full SKILL.md (463 more words)Show less

Typography responsiveness

  • Step heading sizes per breakpoint: text-3xl md:text-5xl rather than one fixed size. If the design calls for continuous scaling, do it through a token-defined clamp(), not an ad hoc one in a className.
  • <input>/<textarea> text stays ≥16px (text-base) on phone — smaller triggers iOS's auto-zoom on focus, which is its own kind of layout break.

Navigation

  • ≥5 top-level links collapse below md into a menu button (aria-expanded, aria-controls) opening a Radix Dialog/Sheet or disclosure panel; it closes on link click and Escape.
  • Sticky header: sticky top-0 z-20 (z-20 is the sticky-header band of the fixed z-scale: 10 raised · 20 sticky header · 30 dropdown · 40 overlay · 50 modal/toast). Anchored sections under it need scroll-mt-20 (or whatever matches the header's height) so #section links don't land underneath it.
  • Fixed/sticky bars respect env(safe-area-inset-*) so they don't sit under a notch or home indicator.
  • Mobile menu requirements: trigger button with aria-expanded/aria-controls, Radix Dialog/Sheet for the panel (focus trap and body scroll lock come free), closes on link click and Escape.

Touch

  • Targets ≥44×44px on phone (min-h-11 min-w-11 or padding to reach it), ≥24px on desktop.
  • ≥8px between adjacent targets so a miss-tap doesn't hit the neighbor.
  • No hover-only functionality — anything a mouse user reaches by hovering needs a tap-accessible equivalent; gate hover-only niceties behind @media (hover: hover) so touch devices don't get a stuck hover state.
  • touch-action: manipulation on interactive elements removes the ~300ms double-tap-to-zoom delay.

Images & media

  • Responsive sourcing: srcset/sizes, or <picture> with art-directed breakpoints, so phones don't download the desktop asset.
  • loading="lazy" below the fold; the hero/LCP image stays eager.
  • aspect-* (or explicit width/height) reserves the box before the image loads, preventing layout shift.

Worked Example

A pricing comparison section, written desktop-first, has three overflow bugs:

tsx
// ❌ desktop-first: three columns, a fixed-width badge, and a long plan name that doesn't wrap
<section className="grid grid-cols-3 gap-6 p-8">
  {plans.map(plan => (
    <div key={plan.id} className="border p-6">
      <div className="flex gap-2">
        <h3 className="font-semibold">{plan.name}</h3>
        <span className="whitespace-nowrap rounded bg-primary px-2 py-1 text-primary-foreground">
          Most popular
        </span>
      </div>
      <div className="w-[280px] mt-4">{plan.description}</div>
    </div>
  ))}
</section>

Bug 1: grid-cols-3 with no mobile step — three ~110px columns at 360px. Bug 2: the h3 + whitespace-nowrap badge are flex siblings with no min-w-0, so a long plan name pushes the badge (and the row) past the viewport edge. Bug 3: w-[280px] is wider than the phone viewport itself.

tsx
// ✅ mobile-first: one column on phone, badge wraps with the title, fluid width
<section className="grid grid-cols-1 gap-6 p-4 sm:grid-cols-2 lg:grid-cols-3 lg:p-8">
  {plans.map(plan => (
    <div key={plan.id} className="border p-6">
      <div className="flex min-w-0 flex-wrap items-center gap-2">
        <h3 className="min-w-0 break-words font-semibold">{plan.name}</h3>
        <span className="shrink-0 rounded bg-primary px-2 py-1 text-primary-foreground">
          Most popular
        </span>
      </div>
      <div className="mt-4 w-full max-w-sm">{plan.description}</div>
    </div>
  ))}
</section>

Common Mistakes

  • Starting a layout at 1440px and adding max-*:/media-query patches to make it survive at 360px.
  • w-screen on anything that isn't a direct, unpadded child of body.
  • Fighting Tailwind v4's image preflight with max-w-none instead of sizing the image on purpose.
  • grid-cols-N/flex rows with no mobile step, found only when real (long) content is dropped in.
  • overflow-x-clip/hidden on body to "fix" an overflow instead of finding and fixing the element causing it.

Red Flags

  • Any unprefixed grid-cols-2/grid-cols-3/grid-cols-4 on a page-level grid.
  • w-[, h-screen, or w-screen anywhere in the diff.
  • A flex/grid item holding truncate or whitespace-nowrap text with no min-w-0 on an ancestor in the same flex/grid context.
  • A <table> with no overflow-x-auto wrapper and no stacked-card fallback.
  • A component never rendered with a long/realistic string before hand-off.

© makifbaysal, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in catalog/agents/frontend-developer/skills/responsive-layout of makifbaysal/tasktrooper.

Open the folder on GitHubat commit 09f6258

Compare with similar skills

Responsive Layout next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Responsive Layout compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Responsive Layout this skillmakifbaysal/tasktrooper109—~2.8kAutomated safety check: PassApache-2.0
UI StylingOhh-889/skyroc79513 repos~2.5kAutomated safety check: PassMIT
Material 3hamen/material-3-skill1.5k2 repos~7.8kAutomated safety check: PassMIT
Antislop Layoutmobilemiqdadbadjuber/anti-slop4.8k1 repos~4.1kAutomated safety check: PassMIT
Trip Map Builderhiyeshu/trip-map-builder242—~1.7kAutomated safety check: PassNone
Frontend Design Routercode-yeongyu/oh-my-openagent70k—~5.3kAutomated safety check: PassCustom licence

Similar skills

  • UI Styling

    Ohh-889/skyroc

    Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.

    795 GitHub starsUsed in 13 repos~2.5k tokens
    Frontend & DesignAuto-check passed
  • Material 3

    hamen/material-3-skill

    Implement Google's Material Design 3 (Material You) UI system.

    1.5k GitHub starsUsed in 2 repos~7.8k tokens
    Frontend & DesignAuto-check passed
  • Antislop Layoutmobile

    miqdadbadjuber/anti-slop

    Mobile layout skill for antislop. An agent skill from miqdadbadjuber/anti-slop.

    4.8k GitHub starsUsed in 1 repo~4.1k tokens
    Frontend & DesignAuto-check passed
  • Trip Map Builder

    hiyeshu/trip-map-builder

    End-to-end trip planning: gather user constraints, build a reference itinerary, research locations and dining signals via 大众点评 + 小红书, then generate an interactive mobile-first map page (Leaflet +…

    242 GitHub stars~1.7k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Frontend Design Router

    code-yeongyu/oh-my-openagent

    Routes frontend and UI work through design reference rulesets, with a design-system gate plus layout and print guidance, before any UI code is written.

    70k GitHub stars~5.3k tokensUpdated today
    Frontend & DesignAuto-check passed
  • Local Testing

    lobehub/lobe-ui

    Local browser verification for the lobe-ui component library and documentation site.

    2.2k GitHub stars~2.1k tokensUpdated yesterday
    Frontend & DesignAuto-check passed

More from makifbaysal/tasktrooper

All 99 skills in this repo
  • API Contract Testing

    makifbaysal/tasktrooper

    A skill your agent uses when a task adds or changes an HTTP endpoint, its request/response shape, status codes, auth or error format - the request matrix, curl templates and what counts as a…

    109 GitHub starsUsed in 1 repo~771 tokens
    Auto-check passed
  • Acceptance Criteria Gwt

    makifbaysal/tasktrooper

    A skill your agent uses when writing acceptance criteria for a task - express each as an observable Given/When/Then that QA can execute, including negative cases

    109 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Accessibility Check

    makifbaysal/tasktrooper

    A skill your agent uses when a task changes any screen, form, dialog, menu or control - Lighthouse/axe scan of the changed screens, a keyboard walk, and the thresholds that fail a task

    109 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Analiz Gate

    makifbaysal/tasktrooper

    A skill your agent uses when deciding whether a request needs an analiz task before implementation - the conditions that require the architect's analysis versus going straight to implementation

    109 GitHub stars~641 tokensUpdated yesterday
    Auto-check passed
  • Analiz HTML Report

    makifbaysal/tasktrooper

    A skill your agent uses when you write or revise the analiz deliverable - the ONE self-contained HTML report (spec and plan as sections) a human reviews passage by passage

    109 GitHub stars~3.9k tokensUpdated yesterday
    Auto-check passed
  • Analiz Human Review Gate

    makifbaysal/tasktrooper

    A skill your agent uses when you finish an analiz report - the human must approve the analysis before any implementation task is created, via the analizreview column

    109 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed

Questions about Responsive Layout

What does Responsive Layout do?

A skill your agent uses when you build or change a layout, page, section, navigation, table, form or image - mobile-first rules, breakpoints and the overflow traps. Responsive Layout is an agent skill from makifbaysal/tasktrooper. Use when you build or change a layout, page, section, navigation, table, form or image - mobile-first rules, breakpoints and the overflow traps.

When should I use Responsive Layout?

Responsive Layout fits situations like: change a layout; image - mobile-first rules; breakpoints and the overflow traps.

How do I install Responsive Layout in Claude Code?

Run `npx skills add makifbaysal/tasktrooper --skill responsive-layout -a claude-code`. Or copy the skill folder (catalog/agents/frontend-developer/skills/responsive-layout in makifbaysal/tasktrooper) into .claude/skills/responsive-layout in your project. Claude Code loads it when a task matches its description.

How do I install Responsive Layout in Codex?

Run `npx skills add makifbaysal/tasktrooper --skill responsive-layout -a codex`. Or copy the skill folder (catalog/agents/frontend-developer/skills/responsive-layout in makifbaysal/tasktrooper) into .agents/skills/responsive-layout in your project. Codex loads it when a task matches its description.

Can I use Responsive Layout in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add makifbaysal/tasktrooper --skill responsive-layout -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/responsive-layout, .gemini/skills/responsive-layout, .github/skills/responsive-layout and .opencode/skills/responsive-layout in your project.

What does Responsive Layout need to run?

SKILL.md names no scripts, command-line tools or credentials: Responsive Layout is instructions for the agent only.

Does Responsive Layout access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Responsive Layout safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Responsive Layout use?

Responsive Layout is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Responsive Layout use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Responsive Layout?

Skills that share tags, products or a category with Responsive Layout: UI Styling (Ohh-889/skyroc, 795 stars), Material 3 (hamen/material-3-skill, 1.5k stars), Antislop Layoutmobile (miqdadbadjuber/anti-slop, 4.8k stars) and Trip Map Builder (hiyeshu/trip-map-builder, 242 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Responsive Layout?

makifbaysal (a GitHub user) maintains it in makifbaysal/tasktrooper, which has 109 GitHub stars. The repository holds 99 skills in this directory. The repository was last updated on October 7, 2026.

Source: makifbaysal/tasktrooper on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.