CSS Flexbox Layout Debugger skill for Claude and Codex
Walks through an alignment problem in a Flexbox layout with the markup in hand, checking the usual suspects in order until the cause is found, and gives the…
Install it once and Claude or Codex runs it for you. When your request matches, your AI loads the skill, asks for anything it is missing, and works through the template itself. Prefer to fill it in by hand? See the full prompt template.
Download the skill (.zip) · View SKILL.md
When it is used
Use when a Flexbox layout is misaligned, overflows, or wraps unexpectedly and the user has the HTML and CSS ready to paste. Do not use for generating a new Flexbox layout, analysing CSS without the markup, or converting a layout to Grid. Related topics: coding, css.
What it will ask you for
- HTML snippet (longer free text)
- CSS snippet (longer free text)
- Flex container selector (free text, e.g. ".card-row")
- Problem description (free text, e.g. "the last item drops to a new line on tablet")
- Desired outcome (choose one: Space between, Centered, Equal width, Wrapped, Single line, Pinned to the end)
- Target browsers (choose any: Chrome, Firefox, Safari, Edge, Opera)
How it works
- Inspect the HTML for structural causes first: wrong container, wrapper elements, non-direct children, and stray whitespace nodes.
- Run the property checklist in order (display, direction, axis, wrap, item sizing, margins, parent sizing, browser quirks) and stop at the first check that explains the symptom.
- Write one bullet per relevant check with what the snippet shows and the exact selector and declaration to change when it is the cause.
- Give the final minimal CSS to apply and one sentence on verifying it in DevTools.
What you get
A Markdown section titled Debugging Checklist: ordered bullets, each with the check, the finding, and the CSS fix when it applies, followed by a fenced block of the final declarations and a one-line verification note.
What it watches out for
- Jumping to CSS when the real cause is markup, such as the items not being direct children of the flex container.
- Prescribing justify-content: center for a vertical problem in a row container; the axis decides which property applies.
- Setting a fixed width on items to force equal columns, which breaks the moment content or viewport changes; flex: 1 1 0 is the fix.
How to install
Claude.ai and the Claude desktop app
- Download the skill .zip.
- Open Settings, then Capabilities, and find Skills.
- Choose Upload skill and select the .zip.
- Ask Claude for help with the task. It loads the skill when your request matches.
Claude Code
- Download the skill .zip.
- Unzip it into ~/.claude/skills/ (or .claude/skills/ inside a project).
- Start a new session. Claude Code loads the skill when your request matches.
Codex
- Download the skill .zip.
- Unzip it into ~/.agents/skills/ (or .agents/skills/ inside a project).
- Codex picks it up on its own. Type $ and the skill name to use it, or just ask for the task.
Cursor
- Download the Cursor rule (.mdc).
- Save it in .cursor/rules/ inside your project.
- Cursor's agent applies the rule when your request matches its description.
AGENTS.md (Codex, Cursor, and other coding agents)
- Copy the AGENTS.md section.
- Paste it into AGENTS.md at the root of your repository, creating the file if needed.
- Coding agents that read AGENTS.md follow it when your request fits.