Responsive Designのロゴ

Responsive Design

コミュニティ
lotfb86
responsive-design

Responsive web design sub-skill. Provides mobile-first layout patterns, CSS Grid/Flexbox strategies, responsive images, fluid typography, container queries, and breakpoint systems. Pull this in whenever building or reviewing UI that must work across mobile, tablet, desktop, and large screens. Triggers on: "make it responsive", "responsive design", "mobile-first", "breakpoints", "fluid layout", or any request involving cross-device layout.

概要

公開者lotfb86
リポジトリweb-design-skills
スキル名responsive-design
スター
20
フォーク
7
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

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

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

スキルの指示

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

Responsive Design

Comprehensive responsive web design patterns for building layouts that adapt seamlessly across all device types and screen sizes. This is a sub-skill — pull it into any design or build workflow that needs cross-device support.

When to Use This Skill

  • Building any new page or component that must work on mobile + desktop
  • Reviewing or fixing responsive layout issues
  • Converting a fixed-width design to responsive
  • Setting up a breakpoint system for a new project
  • Optimizing images and typography for multiple viewports

Standard Breakpoint System

Use these as the default breakpoints unless the project specifies otherwise:

css
:root {
  --breakpoint-sm: 640px;   /* Large phones */
  --breakpoint-md: 768px;   /* Tablets */
  --breakpoint-lg: 1024px;  /* Small desktops */
  --breakpoint-xl: 1280px;  /* Desktops */
  --breakpoint-2xl: 1536px; /* Large screens */
}

Tailwind equivalents: sm:, md:, lg:, xl:, 2xl:

Step 1: Mobile-First Approach

ALWAYS design starting from the smallest screen (320px+) and progressively enhance for larger viewports.

css
/* Base styles = mobile (no media query needed) */
.container {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Tablet and up */
@media (min-width: 768px) {
  .container {
    padding: 2rem;
    flex-direction: row;
    gap: 2rem;
  }
}

/* Desktop and up */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem;
  }
}

Rules:

  • MUST use min-width media queries (mobile-first), NOT max-width
  • MUST include <meta name="viewport" content="width=device-width, initial-scale=1"> in HTML
  • MUST use relative units (rem, em, %, vw, vh) — NOT fixed px for layout widths
  • MUST NOT set fixed widths like width: 1200px — use max-width instead

Step 2: Layout Patterns

Flexbox — Use for 1-dimensional layouts

Responsive navigation:

css
.nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .nav {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

Card row that wraps:

css
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.card {
  flex: 1 1 100%;           /* Full width on mobile */
}

@media (min-width: 768px) {
  .card { flex: 1 1 45%; }  /* 2 columns on tablet */
}

@media (min-width: 1024px) {
  .card { flex: 1 1 30%; }  /* 3 columns on desktop */
}

CSS Grid — Use for 2-dimensional layouts

Auto-responsive grid (no media queries needed):

css
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

Dashboard layout with sidebar:

css
.dashboard {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .dashboard {
    grid-template-columns: 250px 1fr;
    grid-template-rows: auto 1fr;
  }
}

@media (min-width: 1280px) {
  .dashboard {
    grid-template-columns: 280px 1fr 300px;
  }
}

Decision Guide

Use CaseUse
Nav bar, button group, toolbarFlexbox
Card grid, gallery, product listGrid (auto-fit)
Full page layout with sidebarGrid (explicit columns)
Centering a single elementFlexbox
Complex 2D dashboardGrid

Step 3: Responsive Images

srcset for resolution switching:

html
<img
  src="image-800.jpg"
  srcset="image-400.jpg 400w, image-800.jpg 800w, image-1200.jpg 1200w"
  sizes="(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"
  alt="Descriptive alt text"
  loading="lazy"
  decoding="async"
/>

Art direction with <picture>:

html
<picture>
  <source media="(min-width: 1024px)" srcset="hero-wide.webp" type="image/webp" />
  <source media="(min-width: 768px)" srcset="hero-medium.webp" type="image/webp" />
  <img src="hero-mobile.jpg" alt="Hero image" loading="lazy" />
</picture>

Rules:

  • MUST include loading="lazy" on below-the-fold images
  • MUST include meaningful alt text
  • MUST provide WebP/AVIF formats when possible
  • MUST size images appropriately — don't serve 2000px images to mobile
  • Use Astro <Image> component when in Astro projects (handles optimization automatically)

Step 4: Fluid Typography

Use clamp() for typography that scales smoothly without breakpoints:

css
:root {
  /* clamp(min, preferred, max) */
  --text-sm: clamp(0.8rem, 0.75rem + 0.25vw, 0.875rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.25rem, 1rem + 1vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.1rem + 1.5vw, 2rem);
  --text-2xl: clamp(1.875rem, 1.2rem + 2.5vw, 3rem);
  --text-3xl: clamp(2.25rem, 1.5rem + 3vw, 4rem);
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
p  { font-size: var(--text-base); }

Rules:

  • MUST use clamp() or relative units for font sizes — NOT fixed px
  • Minimum readable body text: 16px (1rem)
  • Line height should scale inversely: larger text = tighter line-height
  • Touch targets: minimum 44px height on interactive elements

Step 5: Container Queries (Modern CSS)

For component-level responsiveness independent of viewport:

css
.card-container {
  container-type: inline-size;
  container-name: card;
}

.card {
  display: flex;
  flex-direction: column;
}

@container card (min-width: 400px) {
  .card {
    flex-direction: row;
    align-items: center;
  }
}

@container card (min-width: 600px) {
  .card {
    gap: 2rem;
  }
  .card-image {
    flex: 0 0 40%;
  }
}

When to use:

  • Reusable components that live in different layout contexts (sidebar vs. main content)
  • Design system components that need intrinsic responsiveness
  • Widget/card patterns that should adapt to their container, not the viewport

Browser support: All modern browsers. Safe to use in 2025+ projects.

Step 6: Common Responsive Patterns

Show/Hide Elements

css
.mobile-menu { display: block; }
.desktop-nav { display: none; }

@media (min-width: 768px) {
  .mobile-menu { display: none; }
  .desktop-nav { display: flex; }
}

Responsive Spacing

css
.section {
  padding: clamp(2rem, 5vw, 6rem) clamp(1rem, 3vw, 4rem);
}

Responsive Table → Card Pattern

css
/* On mobile, transform table rows into stacked cards */
@media (max-width: 767px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead { display: none; }
  td::before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
  }
}

Constraints — Hard Rules

RuleDetails
MUSTInclude viewport meta tag in all HTML documents
MUSTUse mobile-first (min-width) media queries
MUSTUse relative units for layout (rem, %, vw)
MUSTTest at exact breakpoints: 320, 768, 1024, 1280, 1536
MUSTEnsure touch targets are at least 44px
MUST NOTUse fixed widths (width: 1200px) — use max-width
MUST NOTDuplicate base styles across all breakpoints (DRY)
MUST NOTUse device-specific breakpoints (e.g., "iPhone 14")
MUST NOTHide essential content on mobile — restructure instead

Testing Checklist

Before considering any responsive implementation complete:

  • Renders correctly at 320px width (smallest common mobile)
  • Renders correctly at 768px (tablet portrait)
  • Renders correctly at 1024px (tablet landscape / small desktop)
  • Renders correctly at 1280px (standard desktop)
  • Renders correctly at 1536px+ (large screens)
  • No horizontal scrollbar at any viewport
  • Touch targets are at least 44px on mobile
  • Images scale appropriately and don't overflow
  • Text remains readable at all sizes (min 16px body)
  • Navigation is accessible on all viewports
  • Forms are usable on mobile (proper input types, sizing)

Tailwind CSS Quick Reference

When using Tailwind (v3 or v4), apply responsive prefixes:

html
<!-- Stack on mobile, row on tablet, 3-col grid on desktop -->
<div class="flex flex-col md:flex-row lg:grid lg:grid-cols-3 gap-4 md:gap-6 lg:gap-8">
  <div class="w-full md:w-1/2 lg:w-auto">...</div>
</div>

<!-- Fluid text -->
<h1 class="text-2xl md:text-4xl lg:text-5xl">Heading</h1>

<!-- Responsive padding -->
<section class="px-4 py-8 md:px-8 md:py-12 lg:px-16 lg:py-20">...</section>

<!-- Hide/show -->
<nav class="hidden md:flex">Desktop Nav</nav>
<button class="md:hidden">Menu</button>

Integration with Other Skills

This skill works as a sub-skill for:

  • frontend-design — pull in when building any UI component
  • local-business-rebuild — all prospect sites must be fully responsive
  • website-rebuild — responsive is a core requirement
  • prospect-qa — use the testing checklist during QA reviews

よくある質問

AIスキル「Responsive Design」では何ができますか?

Responsive web design sub-skill. Provides mobile-first layout patterns, CSS Grid/Flexbox strategies, responsive images, fluid typography, container queries, and breakpoint systems. Pull this in whenever building or reviewing UI that must work across mobile, tablet, desktop, and large screens. Triggers on: "make it responsive", "responsive design", "mobile-first", "breakpoints", "fluid layout", or any request involving cross-device layout.

TypingMindでResponsive Designを使うメリットは何ですか?

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

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

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

Responsive Designを使えるAIモデルはどれですか?

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

Responsive Designは何個のAIモデルで使えますか?

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

AIスキル「Responsive Design」は無料ですか?

lotfb86がGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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