Skip to content
Agentmart
Submit a tool

ux

Forms, flows and screens.

Skill by rainmanjam

IndexedMIT★ 24
Write a review

Chalk Labs

Need help deploying ux?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/rainmanjam-ux

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Forms, flows and screens. Structure, naming and clarity of user-facing interaction code: component boundaries, state ownership, and keeping presentation separable from the rules behind it.

Use cases: presentations, design, frontend

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/ux

What's inside

Skill name
ux
Description
Forms, flows and screens. Structure, naming and clarity of user-facing interaction code: component boundaries, state ownership, and keeping presentation separable from the rules behind it.
License
MIT
Instructions
83 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# UX: Structuring Interaction Code

Interface code accumulates faster than any other kind, because every requirement arrives as
"and also, when the user does X". Without structure a screen becomes one component holding
fetching, validation, formatting, submission and error display, and every change risks all of
them.

The discipline is ordinary: single responsibility, explicit state ownership, and names that
survive being read alone. What is different is that the pressure to skip it is higher, because
interface code is visible and the deadline is usually visual.

## Decide where state lives, once

Most interface bugs are state-ownership bugs wearing other clothes.

**One owner per piece of state.** If two components can both change a value, they will
disagree, and the disagreement will be intermittent. Lift the state to the nearest common
parent and pass it down, or move it out of the tree entirely.

**Derive rather than duplicate.** A `total` stored alongside the `items` it sums is two facts
that must agree. Compute it. If computing it is expensive, memoise the computation rather than
storing a second copy.

**Keep server state and form state distinct.** What the server last said and what the user has
typed are different things with different lifetimes. Conflating them is why "the form reset
itself" bugs are so hard to reproduce.

**Name state for what it is, not what it shows.** `isSubmitting` is a fact. `showSpinner` is a
consequence, and it will eventually need to be true for a second reason.

## Split components along seams that will move

**By responsibility, not by size.** A 400-line component that renders one coherent thing is
easier to work with than four components passing state between them.

**Separate what fetches from what displays.** A component that both loads and renders cannot be
previewed, tested, or reused with different data. Take data as props; let a parent decide where
it came from.

**Keep the rules out of the markup.** Whether a discount applies is a business question with a
right answer that does not depend on React. It should be a function you can test without
rendering.

**Push formatting to the edge.** Currency, dates and pluralisation are presentation. Keep the
underlying values unformatted until the moment they are shown, or you will parse your own
output later.

## Handle the states that are not "success"

Every screen that loads has at least four states, and most code writes one.

- **Loading**, including a second load over existing content, which is a different visual case
- **Empty**, which is not an error and should not look like one
- **Error**, with something the user can act on
- **Partial**, where some of the data arrived

If those live as branches inside one render, the component is doing five things. A small
discriminated union describing the state, matched once, keeps them separable and makes it
obvious when one is missing.

## What good output looks like

- **Show the component boundary and the prop types.** Most of the design is visible from the signature.
- **Say where each piece of state lives and why.** Ownership is the decision worth recording.
- **Cover the non-success states explicitly**, or say which are out of scope.
- **Point at specific components.** "The table" is not reviewable.

## What to avoid

**Prop drilling as a default.** Passing a value through four components that do not use it
couples all four. Either lift it out of the tree or restructure so the intermediate layers do
not exist.

**Premature component extraction.** Splitting a component that has one caller, to "keep files
small", adds a hop with no benefit. Wait for the second use.

**Effects that synchronise state.** An effect that copies one piece of state into another is
almost always a derivation that should have been computed.

**Styling decisions in a structural review.** Spacing and colour are real work and a different
conversation. Mixing them in means the structural comments get skimmed.

From rainmanjam/poka-yoke, MIT.

More from rainmanjam/poka-yoke

Signals

Stars
24
Forks
3
Open issues
0
Last commit (this folder)
Aug 24, 2026 (2 months ago)
Last release
Aug 25, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from rainmanjam

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get ux running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying ux?

CallGet help
Cite this page

ux skill. Agent Mart. https://agentmart.dev/skills/rainmanjam-ux (last updated 2026-10-24)