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

state-machine

Create a temporary workbench for one existing component, using realistic mock data and a grouped state switcher. View loading, empty, error, access, and other implemented states individually, with a link to each state.

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

원문원문 설명 보기

Renders every state of a component you choose on a throwaway page, with mock data and a switcher, so you can work on each state.

설치 방법 보기

이럴 때 유용합니다

  • Comparing loading, empty, and error states in a table
  • Checking displays for different roles and plans
  • Inspecting layouts with realistic amounts of sample data
  • Rechecking every state after a visual change

포함된 파일(3)

  • SKILL.md6.2 KB
  • agents/openai.yaml177 B
  • switcher.md6.9 KB

SKILL.md(원문)

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

State machine

This skill takes one component and renders it on a throwaway page in every state it can be in. Mock data feeds each state, a switcher flips between them and the page is deleted in one step when you are done.

It is a workbench, not a review. The page stays up while the user works on the visuals, one state on screen and every other a keypress away. Stacking hostile scenarios on one page for a single look is break, exploring alternative designs is variant and reviewing finished work is interface-review.

1. Scope one component

One component per run: the audit log table, the network panel, the billing card. "The settings page" spans several, so list them and ask which one.

Restate it in one sentence: what the component shows, where it renders in production and where its data comes from.

2. Find the states in the code

The states are the branches the component already has. Read it and its data hooks for every one:

KindStates
DataLoading, empty, error, one item, a typical set, a set long enough to scroll or paginate, some requests resolved and others pending, stale data refetching
AccountPlan tier, role and permission checks, an owner versus a member
FeatureFlags, trials, limits reached, a disabled or locked feature

A state the code cannot reach is not a state. Do not add a branch to render one. Where the design shows a state the code lacks, list it as missing and leave it out.

Write the set down before building, one line each, named the way the product talks about it: empty, enterprise, member-no-access. Group them under headings in the product's words, by what changes. Use Data and Account or narrower ones such as Connection or Access. The switcher shows these groups. Say which kinds you dropped and why in one line. Combine kinds only where the code branches on the combination, such as member-empty, never as a cross product.

3. Build the throwaway page

A scratch route inside the app holds the real component, imported from the project and untouched. The route inherits the app's layout, fonts, global styles and providers for free.

Where the framework splits server from client components, the page is client code, "use client" in Next. Otherwise fixture data can silently vanish crossing that boundary, and the page renders empty.

Render one instance in a container as wide as the component is in production. The container, the fixtures and the switcher are everything the page adds, with no fonts, styles or themes of its own. Keep the page, its fixtures and its switcher in one folder, such as /states/audit-log, so removal is one delete.

4. Feed each state at the data boundary

Supply the data where the component receives it, from the page, without editing the component. In order of preference:

  1. Props, where the component takes its data as props.
  2. The app's own data seam: a seeded query cache, a mock provider or the project's request mocks.

A fixture threaded through props five levels down tests a path production never takes. Where the only way in is editing the component, say so and ask before adding a seam.

Make the data look like the product. Real-shaped names, timestamps, amounts and the item counts users actually have. Three rows of "Test item" make every state look fine.

Loading and pending states hold still. Keep them pending until the switcher moves, rather than resolving after a timeout.

5. Add the switcher

A grouped list beside the component flips the __state search param, so every state is a link. Where there is no room beside the component, it moves above it as a select with the same groups. The double underscore keeps it clear of any param the app's layout reads. switcher.md holds the spec.

6. Confirm every state renders, then hand over

Load the page once in a browser already at hand and flip through every state. The component shows the mock data, not the real data and not a blank region. Mock data that never appears is the common failure here. Live sync, a cache that refetches over the seed or a server boundary dropping the fixture all cause it. Fix the plumbing before handing over.

With no browser at hand, say so and hand the URL over for the user to check.

Then hand over the URL, the state list and the switcher keys. Stop there. Changing how a state looks is the user's next request, not part of this one.

Re-check every state after each change

After a visual change, flip through every state again, since a fix for one state often breaks another.

Remove it in one step, on the user's word

Delete the page folder and any seam the user approved. Then search the codebase for the route and fixture names, and check that the diff touches nothing else of the setup. Commit only when asked.

Before you finish

MistakeFix
The component edited to accept fixturesFeed data from the page through props or the app's data seam; ask before adding a seam
A rebuilt lookalike component on the pageImport the real component from the project
The page restyles or re-themes the componentThe app's layout, fonts and tokens as they are
Fixtures passed as props deep in the treeSupply the data where the component receives it
A branch added to the component to show a stateLeave out states the code cannot reach, and list missing ones
"Item 1", "Test user", three rowsProduct-shaped data in real quantities
Loading resolves after a timeoutHold it until the switcher moves
Handed over without loading each stateLoad every state; a blank or real-data state means broken plumbing
Switcher styled with the project's tokensKeep it visibly outside the design system
One long row of tabs, one per stateA grouped list beside the component that scrolls on its own; a select above it where the list does not fit
Visuals changed unaskedHand over and wait
Page deleted in the same turn it was builtRemove it only on the user's word
Route or fixture names left behindSearch for both after removal

리뷰

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

댓글

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

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

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

0 / 1,000자

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

같은 저장소의 스킬

Review and fix interface accessibility against WCAG 2.2, a web accessibility standard. Check keyboard navigation, focus, screen reader labels, forms, motion, and zoom, then report failures with their criteria and implement fixes using the project's existing styling system.

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

  • Check flows using only the keyboard
  • Fix control names and screen reader announcements
  • Improve form labels and error feedback
jakubkrehel/skills8.2천2026년 10월 13일 업데이트

Build and review interface color systems with palettes, format conversions, and semantic tokens that name colors by purpose. Measure foreground and background contrast, and identify inconsistent themes, misused color roles, and colors outside the supported range.

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

  • Build palettes around interface roles
  • Organize color tokens by purpose
  • Measure text and background contrast
jakubkrehel/skills8.2천2026년 10월 13일 업데이트

Review an interface across accessibility, layout, writing, typography, color, and visual polish. It coordinates specialist skills, combines evidence from code and rendered screens, and produces one report with findings ranked by their impact on users.

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

  • Reviewing a screen or complete user flow
  • Checking loading, error, and narrow-screen states
  • Prioritizing interface fixes by user impact
jakubkrehel/skills8.2천2026년 10월 13일 업데이트

Review and improve interface grouping, alignment, spacing, and responsive structure. Check whether content and actions remain accessible when screens resize, text grows in translation, zoom increases, or the layout switches to right-to-left reading.

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

  • Checking clipping and overlap on narrow screens or at higher zoom
  • Preparing layouts for longer translated text
  • Reviewing right-to-left layouts
jakubkrehel/skills8.2천2026년 10월 13일 업데이트

Set and review how interface text renders, including font loading, size hierarchy, line spacing, wrapping, truncation, and punctuation. Apply fixes within the existing styling system and check how realistic content behaves across different widths.

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

  • Organize heading and body text sizes
  • Fix wrapping and truncated text
  • Keep changing numbers aligned
jakubkrehel/skills8.2천2026년 10월 13일 업데이트

better-ui

무료

Refine interface surfaces, icons, and motion with specific values for corners, shadows, alignment, and transitions. Preserve the project's existing design conventions while identifying visual inconsistencies, touch interaction problems, and missing alternatives for reduced motion.

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

  • Refining corners and shadows on nested cards
  • Unifying icon appearance across interaction states
  • Adjusting button feedback and entrance animations
jakubkrehel/skills8.2천2026년 10월 13일 업데이트

jakubkrehel의 스킬 모두 보기

이 스킬의 문제 신고