Layout Systemのロゴ

Layout System

コミュニティ
sanky369
layout-system

レスポンシブレイアウトを修正または構築します。ページの外枠、グリッド、カードレイアウト、サイドバー、ブレークポイント戦略、コンテナクエリを扱います。「モバイルで崩れる」「レイアウトがごちゃごちゃ」「要素の位置が揃わない」「セクションごとに余白がばらばら」「レスポンシブにして」「正しく中央揃えにして」と言われた場合や、ダッシュボード、ページ、グリッドのレイアウトを依頼された場合に使用してください。既存CSSの問題点(固定幅、絶対位置指定、メディアクエリの乱立)を調べ、Grid/Flexboxの使い分けを適用し、コンテンツに基づくブレークポイントを設定したリファクタリング済みCSS/JSXと、レスポンシブ表示の確認チェックリストを作成します。余白トークンだけに関する相談はdesign-foundationに、テキストの読みやすさに関する相談はtypography-systemに引き継ぎます。

Add to TypingMind

概要

公開者sanky369
リポジトリvibe-building-skills
スキル名layout-system
スター
31
フォーク
7
同梱ファイル
1
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 1個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    sanky369がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Layout System」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/sanky369/vibe-building-skills/tree/main/skills/frontend-design/layout-system
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sanky369/vibe-building-skills.git /tmp/vibe-building-skills
mkdir -p .claude/skills
cp -r /tmp/vibe-building-skills/skills/frontend-design/layout-system .claude/skills/layout-system
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでLayout Systemを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にLayout Systemを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Layout Systemは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Layout System

Produce working, mobile-first layout code for the user's actual screens — a refactored page shell, grid, or component layout — not a CSS tutorial. Governing principle: content determines structure. Choose Grid vs Flexbox by the shape of the content, place breakpoints where the content breaks, and let flexible tracks absorb the rest.

When to use / handoffs

  • Use for page structure, alignment, responsiveness, grids, overlap/overflow bugs, and breakpoint strategy.
  • Spacing values themselves inconsistent across the app (no scale) → establish tokens first via skills/frontend-design/design-foundation.
  • Text hard to read at some widths (line length, fluid type) → skills/frontend-design/typography-system.
  • Layout is fine but the screen feels cluttered → skills/frontend-design/visual-hierarchy-refactoring.

Step 1 — Inspect the codebase

  1. Locate the target. If the user named a screen/component, read it plus its CSS. Otherwise glob the main layout files (**/layout.*, **/App.*, **/*page*, global CSS).
  2. Detect the styling system. Tailwind classes vs CSS Modules vs styled-components — deliver in the same system.
  3. Grep for layout smells and record counts:
    • width:\s*\d+px|w-\[\d+px\] — fixed widths (breakage source #1)
    • position:\s*absolute outside overlays/badges — layout by coordinates
    • float:|margin-top:\s*-|margin-left:\s*- — legacy/negative-margin hacks
    • @media — count distinct breakpoint values; >4 distinct min-widths = breakpoint sprawl
    • overflow-x and 100vw — horizontal-scroll suspects
  4. Read existing breakpoints (Tailwind screens, or media queries) — reuse them unless they're the problem.
  5. Check for spacing tokens — if a scale exists, all new gaps/padding must use it.

Step 2 — Intake

Ask in one batch, only if not inferable: which screen/flow matters most, and the smallest and largest viewports that matter (default: 320px–1440px, content capped ~1200–1280px). Infer density and stack from the code. Don't stall — with a named target and visible code, state assumptions and build.

Step 3 — Build mobile-first, with these decision rules

  1. Start at 320px, single column, then add columns only where content earns them. Never shrink a desktop design downward.
  2. Grid vs Flexbox:
    • Rows AND columns must align (page shell, dashboard, gallery, form with aligned labels) → Grid.
    • One direction, sizes driven by content (navbar, button row, tag list, media-object) → Flexbox.
    • Card grid with unknown item count → Grid with repeat(auto-fit, minmax(min(100%, 280px), 1fr)) — zero media queries.
    • If you're using Flexbox with percentage-width children to fake columns, switch to Grid.
  3. Page shell: Grid with grid-template-areas; collapse areas at smaller widths. Canonical:
css
.shell { display: grid; gap: var(--space-4); grid-template-areas: "header" "main" "footer"; }
@media (min-width: 768px) {
  .shell {
    grid-template-columns: 250px minmax(0, 1fr);
    grid-template-areas: "header header" "sidebar main" "footer footer";
  }
  .sidebar { position: sticky; top: 0; height: fit-content; }
}

(minmax(0, 1fr) — not bare 1fr — so wide children can't blow out the track.) 4. Breakpoints from content: resize until something breaks (line too long, column too squeezed, orphaned whitespace) and put the breakpoint there. Keep to 2–3 per component. Use the project's existing breakpoint tokens. 5. Container queries when a component renders in containers of different widths (card in sidebar AND main): container-type: inline-size on the wrapper, @container (min-width: …) on the component. Viewport media queries only for page-level structure. 6. Media proportions: aspect-ratio + object-fit: cover; never fixed height on responsive images. 7. Units: rem for space/type, %/fr/minmax() for tracks, ch for text measure, px only for borders and true pixel concerns.

For the full pattern gallery (hero, card grid, sidebar, responsive nav, holy-grail, sticky footer, container-query card), read references/layout-patterns.md and adapt rather than reinventing.

Step 4 — Verify at the checkpoints

Test (or reason through, if you can't render) at 320, 375, 768, 1024, 1440. Look for: horizontal scroll, squeezed columns (<~250px of real content), text measure outside 45–75ch, touch targets <44px, content trapped under sticky elements.

Required output format

Deliver code plus this summary:

## Layout changes
[Refactored files with full code — same styling system as the project]

## Decisions
| Question | Choice | Rule applied |
| Shell | Grid, template-areas | 2-D alignment needed |
| Card list | auto-fit minmax(280px, 1fr) | unknown item count → no media queries |
| Breakpoints | 768px, 1024px (existing tokens) | content broke at sidebar collapse |
| Container queries | card only | renders in 2 container widths |

## Smells removed
| Smell | Where | Replaced by |
| fixed width 960px | Header.tsx | max-width + margin-inline auto |
| ... |

## Verified
320 / 375 / 768 / 1024 / 1440 — [result per width, or "reasoned, not rendered" flagged]

Quality bar (check before delivering)

  • No horizontal scrollbar at 320px
  • Zero fixed pixel widths on containers (max-width caps allowed)
  • Grid for 2-D, Flexbox for 1-D — no percentage-width flex-column fakery
  • Body text measure 45–75ch at every breakpoint
  • Touch targets ≥ 44×44px on mobile
  • All gaps/padding use the project's spacing scale (no new magic numbers)
  • ≤3 breakpoints per component, all from the project's breakpoint set
  • Visual reordering (Grid placement, order) doesn't scramble DOM/tab order
  • aspect-ratio on media; no fixed-height image boxes

Integration

  • Consumes: spacing scale + breakpoint tokens from skills/frontend-design/design-foundation.
  • Produces: the page shell and layout patterns that skills/frontend-design/typography-system (measure, fluid type) and skills/frontend-design/visual-hierarchy-refactoring (whitespace, grouping) refine, and that skills/frontend-design/component-architecture encodes as reusable layout components.
  • Accessibility of the result is audited by skills/frontend-design/accessibility-excellence.

References

  • references/layout-patterns.md — copy-adaptable patterns: hero, card grid, sidebar+main, responsive nav, holy grail, sticky footer, container-query card, aspect-ratio media, plus the breakpoint table. Read when building any standard pattern.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Layout System」では何ができますか?

レスポンシブレイアウトを修正または構築します。ページの外枠、グリッド、カードレイアウト、サイドバー、ブレークポイント戦略、コンテナクエリを扱います。「モバイルで崩れる」「レイアウトがごちゃごちゃ」「要素の位置が揃わない」「セクションごとに余白がばらばら」「レスポンシブにして」「正しく中央揃えにして」と言われた場合や、ダッシュボード、ページ、グリッドのレイアウトを依頼された場合に使用してください。既存CSSの問題点(固定幅、絶対位置指定、メディアクエリの乱立)を調べ、Grid/Flexboxの使い分けを適用し、コンテンツに基づくブレークポイントを設定したリファクタリング済みCSS/JSXと、レスポンシブ表示の確認チェックリストを作成します。余白トークンだけに関する相談はdesign-foundationに、テキストの読みやすさに関する相談はtypography-systemに引き継ぎます。

TypingMindでLayout Systemを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Layout Systemはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにLayout Systemをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/sanky369/vibe-building-skills/tree/main/skills/frontend-design/layout-systemを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Layout Systemを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Layout Systemで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもLayout Systemを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Layout System」は無料ですか?

はい。sanky369がMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇