responsive-layout-system
Skill1 starsChanged 5 months agoApache-2.0View on GitHub
Creates a responsive layout using CSS Grid and Flexbox with mobile-first breakpoints. Use when building page layouts that must work across all screen sizes.
In this repository58 other files it gives its agents.
- agent-chain-designerSkill
- api-wrapper-builderSkill
- embeddings-builderSkill
- evaluation-harnessSkill
- fine-tuning-preparerSkill
- llm-router-builderSkill
- ml-model-trainerSkill
- model-benchmarkerSkill
- prompt-engineerSkill
- rag-pipeline-builderSkill
- synthetic-data-generatorSkill
- vector-db-integratorSkill
- csv-processorSkill
- database-schema-designerSkill
- data-pipeline-builderSkill
- etl-workflow-designerSkill
- json-transformerSkill
- pandas-data-cleanerSkill
- report-generatorSkill
- sql-query-optimizerSkill
- time-series-analyzerSkill
- visualization-generatorSkill
- backup-strategySkill
- ci-cd-optimizerSkill
- docker-compose-generatorSkill
- github-actions-pipelineSkill
- kubernetes-deploymentSkill
- load-balancer-configSkill
- log-aggregator-setupSkill
- monitoring-dashboardSkill
- nginx-config-generatorSkill
- security-hardeningSkill
- ssl-certificate-managerSkill
- terraform-module-builderSkill
- api-security-auditorSkill
- compliance-checkerSkill
- dependency-checkerSkill
- incident-responderSkill
- jwt-security-auditorSkill
- owasp-checkerSkill
- penetration-test-plannerSkill
- secret-detectorSkill
- threat-model-designerSkill
- vulnerability-scannerSkill
- accessibility-auditorSkill
- api-route-builderSkill
- auth-flow-builderSkill
- css-animation-crafterSkill
- form-validatorSkill
- graphql-schema-designerSkill
- html-component-builderSkill
- nextjs-app-scaffoldSkill
- performance-auditorSkill
- pwa-setupSkill
- react-component-generatorSkill
- seo-optimizerSkill
- tailwind-design-systemSkill
- websocket-integrationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 13 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
When performance and simplicity are priorities over heavy layout libraries.
- Distinctive: line 34
Create CSS custom properties for spacing scale, container widths, and breakpoints.
- Distinctive: line 38
Use Flexbox for one-dimensional flows (navbars, toolbars, button groups, card rows).
- Distinctive: line 39
Use Grid for two-dimensional layouts (page templates, card grids, dashboards).
- Distinctive: line 40
Consider subgrid and masonry for modern browsers.
- Distinctive: line 43
Write base styles for the smallest screen (usually 320-375px).
- Distinctive: line 45
Never hide critical content on mobile.
- Very specific: line 48
Use @container for components that should adapt to their parent width rather than viewport.
- Very specific: line 59
Use env(safe-area-inset-*) for mobile devices.
- Distinctive: line 60
Test on iPhone with notch/dynamic island.
- Very specific: line 112
Very narrow screens (320px): Ensure no horizontal scroll.
- Distinctive: line 113
Container vs viewport: Prefer container queries for cards/grids that live in sidebars.
- Distinctive: line 121
Use DevTools device toolbar for iPhone, iPad, desktop.
- Distinctive: line 122
Test with real devices if possible.
- Distinctive: line 123
Run Lighthouse — no layout shift issues (CLS < 0.1).
- Distinctive: line 124
Check that all content remains accessible and no overflow at any size.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Designs and implements robust, maintainable responsive page and component layouts using modern CSS (Grid for 2D, Flexbox for 1D), mobile-first methodology, CSS custom property design tokens for spacing and breakpoints, container queries where appropriate, and common layout patterns (sidebar, holy grail, masonry, dashboard).
When to Use This Skill
- Building the overall page layout or major sections (header, hero, main content, sidebar, footer).
- The user mentions "responsive", "mobile first", "works on all screen sizes", or provides a wireframe that needs to adapt.
- Creating reusable layout primitives for a design system.
- When performance and simplicity are priorities over heavy layout libraries.
Prerequisites
- CSS file or Tailwind setup in the project.
- Understanding of viewport vs container queries.
- Target breakpoints defined (or the skill will propose sensible ones: 640, 768, 1024, 1280).
- For advanced masonry or subgrid, modern browser support or fallbacks.
Steps
- Define design tokens:
- Create CSS custom properties for spacing scale, container widths, and breakpoints.
- Example:
--space-4: 1rem; --container-max: 1280px;
- Choose layout primitives:
- Use Flexbox for one-dimensional flows (navbars, toolbars, button groups, card rows).
- Use Grid for two-dimensional layouts (page templates, card grids, dashboards).
- Consider subgrid and masonry for modern browsers.
- Apply mobile-first:
- Write base styles for the smallest screen (usually 320-375px).
- Layer improvements with
min-widthmedia queries. - Never hide critical content on mobile; use progressive disclosure instead.
- Implement container queries (preferred for components):
- Use
@containerfor components that should adapt to their parent width rather than viewport. - Fallback to media queries when container queries are not supported.
- Use
- Build common patterns:
- Holy grail (header, sidebar, main, footer)
- Sidebar + content (collapsible on mobile)
- Masonry grid
- Dashboard (multiple resizable panels)
- Sticky header + scrollable content area
- Handle safe areas and notches:
- Use
env(safe-area-inset-*)for mobile devices. - Test on iPhone with notch/dynamic island.
- Use
- Add debug helpers (optional but useful):
- A temporary outline or grid overlay toggle for development.
- Output:
- Complete CSS (or Tailwind config + component classes).
- HTML structure example.
- Responsive demo notes.
Examples
Example: Holy Grail Layout with Sidebar
:root {
--sidebar-width: 280px;
--header-height: 64px;
}
.layout {
display: grid;
grid-template-areas:
"header header"
"sidebar main"
"footer footer";
grid-template-rows: var(--header-height) 1fr auto;
grid-template-columns: var(--sidebar-width) 1fr;
min-height: 100dvh;
}
@media (max-width: 768px) {
.layout {
grid-template-areas:
"header"
"main"
"footer";
grid-template-columns: 1fr;
}
.sidebar { display: none; } /* or use a drawer pattern */
}
.header { grid-area: header; }
.sidebar { grid-area: sidebar; }
.main { grid-area: main; }
.footer { grid-area: footer; }Full HTML + more patterns (masonry using grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) with masonry-auto-flow or JS fallback) included in the skill output.
Edge Cases & Error Handling
- Very narrow screens (320px): Ensure no horizontal scroll. Use
overflow-x: hiddenon body and test all components. - Container vs viewport: Prefer container queries for cards/grids that live in sidebars.
- Print styles: Provide a separate print stylesheet or
@media printrules that collapse sidebars and optimize for paper. - High zoom levels: Layouts must not break at 200%+ zoom (reflow, not zoom).
- Dynamic content: Account for variable height headers/footers using
min-height: 100dvhandgrid.
Verification
- Open the layout in browser and resize from 320px to 1920px.
- Use DevTools device toolbar for iPhone, iPad, desktop.
- Test with real devices if possible.
- Run Lighthouse — no layout shift issues (CLS < 0.1).
- Check that all content remains accessible and no overflow at any size.
- Success: Layout adapts gracefully, no horizontal scroll, content hierarchy preserved on mobile.
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

