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

block-authoring

Author a placeable layout block that looks right at ANY pane size. The one hard rule — size to the PANE with container queries (@container), never the viewport — plus list/form playbooks and the sizing contract (minWidth etc.) the viability metric reads. Use when adding/converting a croutonLayoutBlocks block, or when a block overflows/breaks in a narrow pane.

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

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.1 KB

SKILL.md(원문)

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

Author a block that looks good in any pane

A layout block doesn't live in a known screen — it lives in whatever pane the user dragged it to. So it must respond to its container, not the viewport, and it must declare how small it's allowed to get. This skill is the playbook; the contract it fills in is read by the viability metric (checkLayoutViability, #710) and the deterministic layout pass (#709).

Part of the layout engine (epic #703). A block is registered in croutonLayoutBlocks (see crouton-core CLAUDE.md, #704) — this skill is about how to build the component behind that registration.

The one hard rule: container queries, not viewport media queries

A block's width ≠ the viewport width. A list in a 280px sidebar on a 4K monitor is narrow, even though the viewport is huge. So:

  • ✅ Use @container (Tailwind / Nuxt UI 4 container queries) keyed off a container on the block root. Put @container on the root element, then size children with the @-prefixed variants (@sm:, @md:, @lg: …).
  • ❌ Never use viewport media queries (sm:/md:/lg:) or useBreakpoints/window width for a block's internal layout — those track the screen, not the pane. (Rejected in #710 for exactly this reason.)
<template>
  <!-- @container makes the @-variants below resolve against THIS element's width -->
  <div class="@container h-full overflow-auto">
    <div class="grid grid-cols-1 @md:grid-cols-2 gap-4">…</div>
  </div>
</template>

Reference implementations in packages/crouton-core/app/components/: LayoutSpikeList.vue, LayoutSpikeForm.vue, LayoutSpikeStats.vue (each uses @container; throwaway spike blocks, but the responsiveness pattern is the model).

Declare the sizing contract

On the block's CroutonLayoutBlockDefinition (in the package's app.config.ts croutonLayoutBlocks), declare what it needs. All optional; undeclared ⇒ fully fluid (minWidth 0).

FieldUse it for
minWidthThe viability floor (px). Below this the block breaks → the pane refuses to shrink past it, and the viability check flags it. Set it to the smallest width where the block is still legible after its narrowest container-query state kicks in.
minHeightSmallest usable height (px).
maxWidthDon't stretch past this (px).
defaultSizePreferred size (% of its pane group) when first placed.
resize'free' (default) · 'fixed' · 'aspect'.
aspectwidth/height ratio when resize: 'aspect'.
density'compact' | 'comfortable' | 'spacious' hint for the block's own layout.

Pick minWidth after you've authored the narrowest container state — it's the point past which even the collapsed layout stops working, not the desktop width.

List playbook

  • Column priority + collapse order: decide which columns drop first as the container narrows; keep the identifying column (title) longest.
  • Table → cards threshold: below a container width, switch a table to stacked cards (@container variant) — never a broken horizontal scrollbar.
  • Min column widths so columns don't crush; sticky header on scroll.
  • Empty / loading / error states all sized for the pane (no fixed-px blocks that overflow a narrow column).

Form playbook

  • Two-column ⇄ single-column at a container threshold (@md:grid-cols-2 → grid-cols-1), not a viewport one.
  • Label placement: top labels survive narrow panes better than left labels.
  • Field grouping stays intact across the collapse; primary action stays reachable (sticky footer or end of flow), full-width when narrow.

General rules

  • No fixed pixel widths that can overflow a pane — use intrinsic / fluid sizing.
  • Contain overflow: overflow-auto on the scroll root; the block fills its pane (h-full w-full) and scrolls internally rather than pushing the pane.
  • Honour your own minWidth — the declared floor and the narrowest CSS state should agree (don't declare 240 if the layout visibly breaks at 300).
  • SSR-safe: no window/measurement on first render (container queries are pure CSS, so they work in SSR — that's another reason to prefer them).

Check your work

  1. Drop the block into a wide pane, then drag it narrow — it should reflow (columns collapse / table→cards / 2col→1col) via container queries, not scroll sideways or crush.
  2. The pane should refuse to shrink the block below its minWidth.
  3. Run the viability metric over a layout that puts the block in a too-small pane — useCroutonLayoutBlocks().checkViability(tree, [1280, 768, 375]) (or the pure checkLayoutViability) should flag it. See crouton-core CLAUDE.md.

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

a11y

무료

Accessibility review for Vue surfaces — the code-cleaning analog of /code-review and /simplify, pointed at WCAG/ARIA. Reviews just your diff (or a package/file), rates findings by severity, and either comments inline on the PR (--comment) or applies the safe fixes for you (--fix). Steers the depth-aware `a11y` subagent. Use when asked to "check accessibility", "a11y this", "audit ARIA/keyboard", or run /a11y.

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

FriendlyInternet/nuxt-crouton102026년 10월 18일 업데이트

ask-human

무료

Emit a blocking question the owner can read in ~10 seconds and answer in one reply — the scannable, recommendation-first handoff every agent posts when it hits a fork it can't own. Leads with the one decision + a recommendation, carries the 🤖 provenance header, doubles as the

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

FriendlyInternet/nuxt-crouton102026년 10월 18일 업데이트

audit

무료

Audit packages for documentation completeness, detect drift between code and docs, and maintain documentation quality across the monorepo. Use when checking package docs, running audits, or reviewing documentation health.

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

FriendlyInternet/nuxt-crouton102026년 10월 18일 업데이트

When a bug or regression is reported, the FIRST step — before fixing — is to research how and when it was introduced (git archaeology), then record that finding on the tracking issue/PR. Use the moment a bug, error, broken build, or "this used to work" is reported, before writing a fix. Produces a first-bad-commit (or "not a code regression") note you paste onto the issue.

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

FriendlyInternet/nuxt-crouton102026년 10월 18일 업데이트

commit

무료

Smart, granular git commits following monorepo conventions. Analyzes changes, filters to session-relevant files, groups by intent, and uses conventional commit format. Use when committing code changes.

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

FriendlyInternet/nuxt-crouton102026년 10월 18일 업데이트

The crouton-conformance gate — the SECOND acceptance axis of graduation (the first is the experience side-by-side, /graduate stage C1). Checks a graduated app is a REAL crouton app — CLI-scaffolded, real collections, consumes the correct packages without reinventing them — by composing the existing probes (frontend-review, a11y, e2e-smoke, typecheck) plus crouton-structural checks, then renders a required, signed-off checklist on the graduation PR. Use at /graduate stage C2, or when asked "is this app crouton-native", "run the conformance gate", "check graduation conformance".

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

FriendlyInternet/nuxt-crouton102026년 10월 18일 업데이트

FriendlyInternet의 스킬 모두 보기

이 스킬의 문제 신고