Responsive Layout
State files
.claude/skills/responsive-layout/files.json — frontend file inventory
.claude/skills/responsive-layout/issues.md — open issue list
Outside of fix mode, these two files are the ONLY files this skill may write.
Fix mode may additionally edit files listed in files.json.
Constraints (all modes)
- No functional changes — className / CSS edits only
- No new npm dependencies
- Match the project's existing styling system — do not introduce a new one
- Do not run git commands or dev servers — suggest commands in a code block for the user to run
Mode selection
Argument scan, audit, or fix selects the mode.
No argument: ask which mode to run — do not read any files first.
Mode: scan — build or update the file inventory
- Detect the frontend root (first scan only): find a
package.json with a UI framework
dependency; the frontend root is that package's source folder (usually src/).
If none or several match, ask the user. Store the result in files.json under
"config" and reuse it on later runs.
- Glob markup and style files under the root:
**/*.{tsx,jsx,vue,svelte,html} and
**/*.{css,scss}. Keep files that render styled markup (pages, components, layouts,
global stylesheets). Exclude folders holding only types, API clients, hooks, state
stores, tests, or generated code — read a sample file when unclear from the folder name.
- Read
files.json (missing → {}). Add new files with "audited": null, keep existing entries unchanged, delete entries whose file no longer exists.
- Write
files.json. Report what changed.
Schema — file paths relative to the detected root:
{
"config": { "root": "frontend/src" },
"files": { "components/Board.tsx": { "audited": "2026-07-03" } }
}
Mode: audit — find issues, record only, fix nothing
- Read
files.json. If missing or empty, run scan mode first.
- Process files with
"audited": null one at a time: read the file, apply the checklist, append findings to issues.md, set the file's audited date. (Re-audit all files only if the user explicitly asks.)
- Checklist — names below are Tailwind; look for the equivalent pattern in whatever
styling system the project uses. Flag any of:
- Fixed widths/heights on containers:
w-[Npx], min-w-[Npx], w-96+, inline style widths
- Multi-column layout without responsive prefixes:
grid-cols-N (N ≥ 2) or side-by-side flex rows with no sm:/md: variant
- Flex rows of multiple fixed-size children without
flex-wrap
- Tables or wide content without an
overflow-x-auto wrapper
absolute/fixed positioning with hard pixel offsets
- Dialogs/popovers with fixed width and no
max-w-* viewport fallback
- Large fixed horizontal padding (
px-10+) on page-level containers
- Hardcoded
px widths in CSS files with no media query
- Report what was found and what remains unaudited.
Issue entry format in issues.md — one ## block per issue, located by
component + element description + a short class snippet (NOT line numbers):
## frontend/src/components/Board.tsx — board column container
- Snippet: `className="grid grid-cols-5 gap-4"`
- Risk: 5 fixed columns overflow below ~1024px
- Suggestion: `grid-cols-1 sm:grid-cols-2 lg:grid-cols-5`
Mode: fix — resolve one issue per pass
- Read
issues.md with limit: 30 — only enough to get the FIRST issue block.
- Read the target file, locate the element via the snippet. If the snippet no longer matches, report it and remove the stale entry instead of guessing.
- Apply the smallest change that resolves the risk — do not restyle surrounding code.
- Remove the fixed issue's block from
issues.md.
- Show what changed and why, state how many issues remain, then STOP and wait for approval before the next fix. Suggest the user verify at a narrow window width with the project's frontend dev command.
1---2name: responsive-layout3description: Scans frontend files, audits them for responsive layout issues, and applies minimal CSS/className fixes to prevent overflow at small window or mobile sizes.4---56# Responsive Layout78## State files910- `.claude/skills/responsive-layout/files.json` — frontend file inventory11- `.claude/skills/responsive-layout/issues.md` — open issue list1213Outside of fix mode, these two files are the ONLY files this skill may write.14Fix mode may additionally edit files listed in `files.json`.1516## Constraints (all modes)1718- No functional changes — className / CSS edits only19- No new npm dependencies20- Match the project's existing styling system — do not introduce a new one21- Do not run git commands or dev servers — suggest commands in a code block for the user to run2223## Mode selection2425Argument `scan`, `audit`, or `fix` selects the mode.26No argument: ask which mode to run — do not read any files first.2728## Mode: scan — build or update the file inventory29301. Detect the frontend root (first scan only): find a `package.json` with a UI framework31 dependency; the frontend root is that package's source folder (usually `src/`).32 If none or several match, ask the user. Store the result in `files.json` under33 `"config"` and reuse it on later runs.342. Glob markup and style files under the root: `**/*.{tsx,jsx,vue,svelte,html}` and35 `**/*.{css,scss}`. Keep files that render styled markup (pages, components, layouts,36 global stylesheets). Exclude folders holding only types, API clients, hooks, state37 stores, tests, or generated code — read a sample file when unclear from the folder name.383. Read `files.json` (missing → `{}`). Add new files with `"audited": null`, keep existing entries unchanged, delete entries whose file no longer exists.394. Write `files.json`. Report what changed.4041Schema — file paths relative to the detected root:42```json43{44 "config": { "root": "frontend/src" },45 "files": { "components/Board.tsx": { "audited": "2026-07-03" } }46}47```4849## Mode: audit — find issues, record only, fix nothing50511. Read `files.json`. If missing or empty, run scan mode first.522. Process files with `"audited": null` one at a time: read the file, apply the checklist, append findings to `issues.md`, set the file's `audited` date. (Re-audit all files only if the user explicitly asks.)533. Checklist — names below are Tailwind; look for the equivalent pattern in whatever54 styling system the project uses. Flag any of:55 - Fixed widths/heights on containers: `w-[Npx]`, `min-w-[Npx]`, `w-96`+, inline `style` widths56 - Multi-column layout without responsive prefixes: `grid-cols-N` (N ≥ 2) or side-by-side flex rows with no `sm:`/`md:` variant57 - Flex rows of multiple fixed-size children without `flex-wrap`58 - Tables or wide content without an `overflow-x-auto` wrapper59 - `absolute`/`fixed` positioning with hard pixel offsets60 - Dialogs/popovers with fixed width and no `max-w-*` viewport fallback61 - Large fixed horizontal padding (`px-10`+) on page-level containers62 - Hardcoded `px` widths in CSS files with no media query634. Report what was found and what remains unaudited.6465Issue entry format in `issues.md` — one `##` block per issue, located by66component + element description + a short class snippet (NOT line numbers):6768```markdown69## frontend/src/components/Board.tsx — board column container70- Snippet: `className="grid grid-cols-5 gap-4"`71- Risk: 5 fixed columns overflow below ~1024px72- Suggestion: `grid-cols-1 sm:grid-cols-2 lg:grid-cols-5`73```7475## Mode: fix — resolve one issue per pass76771. Read `issues.md` with `limit: 30` — only enough to get the FIRST issue block.782. Read the target file, locate the element via the snippet. If the snippet no longer matches, report it and remove the stale entry instead of guessing.793. Apply the smallest change that resolves the risk — do not restyle surrounding code.804. Remove the fixed issue's block from `issues.md`.815. Show what changed and why, state how many issues remain, then STOP and wait for approval before the next fix. Suggest the user verify at a narrow window width with the project's frontend dev command.