본문으로 건너뛰기
cccskills
무료GitHub에 공개

responsive-ui

Use these guidelines for visible UI changes to plan layouts across mobile, tablet, desktop, and large screens. They cover mobile-first breakpoints, design-system components, overflow, touch targets, long content, and checks at four screen widths.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

MANDATORY for any UI work in apps/app, apps/portal, or packages/design-system — every component, page, or layout change must work on mobile (~375px), tablet (~768px), desktop (~1280px), and large desktop (~1920px) BY DEFAULT, without being asked. Read this before writing or editing any JSX/TSX that renders visible UI. Triggers on: new component, page, layout, table, toolbar, form, modal/sheet, dashboard, "build UI", "add a column", "add a filter", any styling change.

trycompai/comp스타 2,058(GitHub 2,058 + cccskills 0)

실행 점수 미검증

설치 방법 보기

이럴 때 유용합니다

  • Building a responsive page or component
  • Updating a table, toolbar, or form
  • Checking a layout at several screen widths
  • Making existing UI easier to use on mobile

포함된 파일(1)

  • SKILL.md5.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Responsive UI — default, not a feature request

The rule

Every UI change ships working at all four device classes. Nobody has to ask.

DeviceTest widthTailwind context
Mobile375pxbase (no prefix)
Tablet768pxmd:
Desktop1280pxxl:
Large desktop1920pxbeyond 2xl:

Tailwind is mobile-first: unprefixed classes are the mobile layout; prefixes add behavior at wider screens (sm: 640, md: 768, lg: 1024, xl: 1280, 2xl: 1536). Write the mobile layout first, then widen — not the other way around.

A change is NOT done until you have reasoned through (or better, viewed via the webapp-testing skill / browser dev tools) what it looks like at 375, 768, 1280, and 1920. If you only checked one width, you checked none.

Works WITH the design system — precedence rules

This skill layers on top of the ui skill; where they touch, the design-system rules win. Responsiveness is achieved THROUGH the DS, never around it:

  • Never put responsive classes (or any className) on DS components (Text, Stack, HStack, Badge, Button, …) — they don't accept it. Put breakpoint utilities on a wrapper <div> (the ui skill's "Layout with Wrapper Divs" pattern):
    // ✅ breakpoints on the wrapper, DS component untouched
    <div className="hidden sm:block"><Badge variant="outline">Active</Badge></div>
    // ❌ className on a DS component
    <Badge className="hidden sm:block">Active</Badge>
    
  • Reach for DS layout primitives first (PageLayout, Stack, HStack, Section) — they carry responsive spacing already. Raw responsive divs are for what the primitives don't cover, not a replacement for them.
  • Arbitrary pixel values stay an anti-pattern (w-[847px] ❌ — per the ui skill). Prefer the standard Tailwind scale (max-w-sm, w-48, max-w-xs). A fixed control width like w-[200px] is acceptable ONLY when it matches an established pattern already used on that surface, and it must still carry a responsive strategy (see below).

Non-negotiables

  1. The page body never scrolls horizontally. Wide content (tables, code, diagrams) scrolls inside its own container, never the page.
  2. No fixed width without a responsive strategy. A fixed-width control is only acceptable if the element hides, shrinks, or wraps on smaller screens (hidden sm:block, w-full md:max-w-xs, or a wrapping parent) — with the breakpoint classes on a wrapper div, never on a DS component.
  3. Touch targets on mobile: interactive elements ≥40px tall; don't rely on hover for anything essential (no hover on touch devices).
  4. Test with real content lengths — long names, emails, 33-item counts. Use truncate / min-w-0 on flex children that hold text.
  5. Large desktops: content must not stretch into unreadable full-width lines — cap with max-w-* containers where the layout doesn't already.

Repo patterns (use these, don't invent)

  • Tables: the design-system Table already wraps rows in overflow-x-auto — wide tables scroll horizontally inside themselves on mobile. That is the accepted pattern for dense admin tables. Do NOT try to reflow table columns per breakpoint; do keep cells reasonable (min-w-* max-w-* on cell content is fine).
  • Toolbars / filter rows: primary control (search) is w-full md:max-w-[300px]; secondary controls (filters, source selectors) collapse on phones with hidden sm:block. Example: the People tab toolbar in apps/app/.../people/all/components/TeamMembersClient.tsx.
  • Page shells: use design-system PageLayout / Stack / HStack — they carry the responsive spacing; don't rebuild them with raw divs.
  • Grids: grid-cols-1 md:grid-cols-2 xl:grid-cols-3 style progressions — never a fixed column count for all widths.
  • Sheets/Modals: design-system Sheet/Dialog are responsive already; don't fix their widths with arbitrary values.
  • Images/logos: constrain (max-w-full, explicit small sizes); never let an image force layout width.

Checklist before "done" (run mentally or in the browser)

  • 375px — nothing overflows the viewport; controls usable or intentionally hidden; text truncates instead of breaking layout
  • 768px — secondary controls visible; layout uses available width sensibly
  • 1280px — the intended "design" width; matches mockups
  • 1920px — no absurdly stretched content; whitespace balanced
  • Long content (names, emails, high counts) doesn't break any of the above
  • Tests: if a component hides/reflows per breakpoint in a way that matters, its test asserts the class contract (e.g. hidden sm:block)

When you can skip a width

Admin-only dense screens (e.g. internal tooling) may treat mobile as "usable via horizontal scroll" rather than fully reflowed — but that must be a conscious choice following the existing pattern of that page, never an accident of not checking.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Guide API endpoint changes so request DTOs, runtime validation, OpenAPI documentation, and MCP tool metadata stay aligned. It covers discoverability, authentication, uploads, long-running tasks, and response types that MCP tools cannot handle.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding an API endpoint with a request body
  • Updating DTO validation and OpenAPI metadata
  • Making an endpoint available as an MCP tool
trycompai/comp2.1천2026년 10월 24일 업데이트

Review specified files for design system usage, replace legacy @trycompai/ui components and lucide-react icons with available @trycompai/design-system equivalents, and run the app type check to verify the migration.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Migrating legacy UI components
  • Replacing lucide-react icons with Carbon icons
  • Checking specified files for design system compliance
trycompai/comp2.1천2026년 10월 24일 업데이트

Review specified files for outdated hook and API patterns, then replace them with the prescribed SWR hooks, API clients, or server API calls. The guidance covers data fetching, mutations, cache updates, and response handling, followed by a typecheck command.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Auditing files for disallowed API and hook patterns
  • Replacing raw fetch calls with the API client
  • Migrating server actions and database mutations to API hooks
trycompai/comp2.1천2026년 10월 24일 업데이트

Review NestJS API endpoints and frontend components for role-based access control and audit log compliance. The skill lists permission, guard, route, and UI gating rules, then directs the agent to fix violations and run type checks.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Auditing API routes for permission decorators
  • Checking UI actions against user permissions
  • Fixing access control inconsistencies
trycompai/comp2.1천2026년 10월 24일 업데이트

Audit unit tests for components that use permissions. Add missing tests and fix failures, checking that administrators can use mutation controls, auditors cannot, and read-only content remains visible to both.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Adding permission tests for a component
  • Checking admin and auditor behavior
  • Fixing failing permission-related tests
trycompai/comp2.1천2026년 10월 24일 업데이트

Set up Better Auth for TypeScript applications, including server and client configuration, database adapters, sessions, email and social sign-in, and plugins. The guide also highlights environment variables, schema generation, and security settings to review.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Configuring Better Auth in a TypeScript app
  • Connecting an ORM or database adapter
  • Setting up sessions and cookie storage
trycompai/comp2.1천2026년 10월 24일 업데이트

trycompai의 스킬 모두 보기

이 스킬의 문제 신고