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: >4 Find and fix frontend layout issues that break at small window or mobile sizes.5 Use when the user runs /responsive-layout <scan|audit|fix> or asks to make the UI responsive.6metadata:7 source: https://skillmd.com/skills/nagarenegishi/responsive-layout8---910# Responsive Layout1112## State files1314- `.claude/skills/responsive-layout/files.json` — frontend file inventory15- `.claude/skills/responsive-layout/issues.md` — open issue list1617Outside of fix mode, these two files are the ONLY files this skill may write.18Fix mode may additionally edit files listed in `files.json`.1920## Constraints (all modes)2122- No functional changes — className / CSS edits only23- No new npm dependencies24- Match the project's existing styling system — do not introduce a new one25- Do not run git commands or dev servers — suggest commands in a code block for the user to run2627## Mode selection2829Argument `scan`, `audit`, or `fix` selects the mode.30No argument: ask which mode to run — do not read any files first.3132## Mode: scan — build or update the file inventory33341. Detect the frontend root (first scan only): find a `package.json` with a UI framework35 dependency; the frontend root is that package's source folder (usually `src/`).36 If none or several match, ask the user. Store the result in `files.json` under37 `"config"` and reuse it on later runs.382. Glob markup and style files under the root: `**/*.{tsx,jsx,vue,svelte,html}` and39 `**/*.{css,scss}`. Keep files that render styled markup (pages, components, layouts,40 global stylesheets). Exclude folders holding only types, API clients, hooks, state41 stores, tests, or generated code — read a sample file when unclear from the folder name.423. Read `files.json` (missing → `{}`). Add new files with `"audited": null`, keep existing entries unchanged, delete entries whose file no longer exists.434. Write `files.json`. Report what changed.4445Schema — file paths relative to the detected root:46```json47{48 "config": { "root": "frontend/src" },49 "files": { "components/Board.tsx": { "audited": "2026-07-03" } }50}51```5253## Mode: audit — find issues, record only, fix nothing54551. Read `files.json`. If missing or empty, run scan mode first.562. 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.)573. Checklist — names below are Tailwind; look for the equivalent pattern in whatever58 styling system the project uses. Flag any of:59 - Fixed widths/heights on containers: `w-[Npx]`, `min-w-[Npx]`, `w-96`+, inline `style` widths60 - Multi-column layout without responsive prefixes: `grid-cols-N` (N ≥ 2) or side-by-side flex rows with no `sm:`/`md:` variant61 - Flex rows of multiple fixed-size children without `flex-wrap`62 - Tables or wide content without an `overflow-x-auto` wrapper63 - `absolute`/`fixed` positioning with hard pixel offsets64 - Dialogs/popovers with fixed width and no `max-w-*` viewport fallback65 - Large fixed horizontal padding (`px-10`+) on page-level containers66 - Hardcoded `px` widths in CSS files with no media query674. Report what was found and what remains unaudited.6869Issue entry format in `issues.md` — one `##` block per issue, located by70component + element description + a short class snippet (NOT line numbers):7172```markdown73## frontend/src/components/Board.tsx — board column container74- Snippet: `className="grid grid-cols-5 gap-4"`75- Risk: 5 fixed columns overflow below ~1024px76- Suggestion: `grid-cols-1 sm:grid-cols-2 lg:grid-cols-5`77```7879## Mode: fix — resolve one issue per pass80811. Read `issues.md` with `limit: 30` — only enough to get the FIRST issue block.822. 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.833. Apply the smallest change that resolves the risk — do not restyle surrounding code.844. Remove the fixed issue's block from `issues.md`.855. 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.