layout

by BytesAgain

Generate CSS layouts. Use when building grid or flexbox layouts, creating responsive breakpoints, or scaffolding HTML pages.

3.7k编码与调试未扫描2026年3月23日

安装

claude skill add --url github.com/openclaw/skills/tree/main/skills/bytesagain/layout

文档

Layout

Generate CSS Grid layouts, Flexbox containers, responsive breakpoint media queries, page scaffold HTML, and spacing utility classes — all from a single shell script. Analyze existing CSS files for layout property usage.

Commands

grid

Generate a CSS Grid layout with configurable columns, rows, gap, named areas, and custom templates.

Options:

FlagDefaultDescription
--columns3Number of grid columns
--rows1Number of grid rows
--gap1remGap between grid items
--col-templaterepeat(N, 1fr)Custom grid-template-columns value
--row-template(auto)Custom grid-template-rows value
--areas(none)Named grid areas (pipe-separated rows)
--classgrid-containerCSS class name
--output(stdout)Write CSS to file
bash
bash scripts/script.sh grid --columns 4 --rows 2 --gap "2rem" --output grid.css
bash scripts/script.sh grid --areas "header header header|sidebar main main|footer footer footer" --output layout.css

flex

Generate a Flexbox layout with direction, wrapping, alignment, and per-item grow factor.

Options:

FlagDefaultDescription
--directionrowFlex direction (row, column, etc.)
--wrap(flag)Enable flex-wrap: wrap
--nowrap(flag)Force flex-wrap: nowrap
--justifyflex-startjustify-content value
--alignstretchalign-items value
--items3Number of flex children to generate
--grow0flex-grow value for children
--classflex-containerCSS class name
--output(stdout)Write CSS to file
bash
bash scripts/script.sh flex --direction row --wrap --justify space-between --items 5 --output flex.css

responsive

Generate mobile-first (min-width) and desktop-first (max-width) media query breakpoints.

Options:

FlagRequiredDescription
--breakpointsYesComma-separated name:px pairs
--prefixNo (default screen-)Class name prefix
--outputNoWrite CSS to file
bash
bash scripts/script.sh responsive --breakpoints "sm:640,md:768,lg:1024,xl:1280" --output breakpoints.css

scaffold

Generate a complete HTML page skeleton with semantic sections. Supports four layout types:

  • basic — header, nav, main, footer
  • holy-grail — header, left sidebar, main, right sidebar, footer
  • dashboard — header with logo/nav/user, sidebar navigation, card grid, data table
  • landing — header with nav links, hero section with CTA, features grid, pricing cards, footer

Options:

FlagDefaultDescription
--typebasicLayout type (basic, holy-grail, dashboard, landing)
--titlePageHTML <title> value
--css(none)Path to CSS file to link
--output(stdout)Write HTML to file
bash
bash scripts/script.sh scaffold --type dashboard --title "Admin Panel" --css styles.css --output dashboard.html

spacing

Generate a spacing scale system with CSS custom properties and margin/padding utility classes.

Options:

FlagDefaultDescription
--base4Base spacing unit
--steps8Number of scale steps
--unitpxCSS unit (px, rem, etc.)
--prefixspCSS variable prefix
--output(stdout)Write CSS to file
bash
bash scripts/script.sh spacing --base 8 --steps 10 --unit px --output spacing.css

analyze

Analyze an existing CSS file and report layout property usage including display types, media queries, grid/flex properties, nesting depth, and file stats.

Options:

FlagRequiredDescription
--inputYesPath to CSS file to analyze
bash
bash scripts/script.sh analyze --input styles.css

Output

  • grid — CSS file with .grid-container and numbered __item-N rules
  • flex — CSS file with .flex-container and numbered __item-N rules
  • responsive — CSS file with min-width and max-width media query blocks
  • scaffold — Complete HTML5 document with semantic sections and optional CSS link
  • spacing — CSS file with :root custom properties plus .m-*, .mt-*, .p-*, .px-* (etc.) utility classes
  • analyze — Stdout report: rule block count, display type breakdown, media queries, grid/flex properties, nesting depth, file stats

Data Storage

No persistent data. All output goes to stdout or to the file specified by --output. No data directory is created.

Requirements

  • Bash 4+
  • Standard Unix utilities: grep, wc, du, head, sort
  • No API keys, no external dependencies

When to Use

  1. Bootstrapping a new web project — generate grid and flex CSS foundations in seconds instead of writing boilerplate by hand
  2. Creating responsive breakpoints — produce a consistent set of mobile-first and desktop-first media queries from named breakpoints
  3. Scaffolding HTML pages — generate semantic page skeletons for dashboards, landing pages, holy-grail layouts, or basic sites
  4. Building a spacing system — create a uniform spacing scale with margin/padding utility classes like Tailwind but custom-fit
  5. Auditing existing CSS — analyze a stylesheet to understand its layout property usage, media queries, and nesting complexity

Examples

bash
# Generate a 12-column grid with named areas
bash scripts/script.sh grid --columns 12 --gap "1.5rem" \
  --areas "header header header header header header header header header header header header|sidebar sidebar main main main main main main main main main main|footer footer footer footer footer footer footer footer footer footer footer footer" \
  --output grid.css

# Create a centered flex navbar
bash scripts/script.sh flex --direction row --justify center --align center --items 6 --class navbar --output navbar.css

# Generate responsive breakpoints with custom prefix
bash scripts/script.sh responsive --breakpoints "xs:480,sm:640,md:768,lg:1024,xl:1280,xxl:1536" --prefix "bp-" --output breakpoints.css

# Scaffold a landing page with linked CSS
bash scripts/script.sh scaffold --type landing --title "Product Launch" --css main.css --output index.html

# Analyze an existing stylesheet
bash scripts/script.sh analyze --input existing-styles.css

Tips

  • Use --output to write directly to a file; omit it to pipe or preview on stdout
  • Combine grid + responsive + spacing to scaffold a complete design system
  • The scaffold command produces clean HTML5 — pair it with your generated CSS files
  • Run analyze on legacy CSS before refactoring to understand what you're working with

Powered by BytesAgain | bytesagain.com | hello@bytesagain.com

相关 Skills

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描109.6k

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描109.6k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描109.6k

相关 MCP 服务

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
82.9k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
51.5k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.2k

评论