agentleFS
willdadywilldady/platypus/.agents/skills/ui-conventions/SKILL.md

ui-conventions

Skill130 starsChanged 7 days agoMITView on GitHub

Which Platypus frontend primitive a screen uses, and how it reads — the need → primitive table, and empty states (EmptyCard vs ListState). Use when building or changing any screen, list or section in apps/frontend.

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every empty state renders through one of two components, picked by what the empty thing _is_ on the page:

    line 31
  2. Distinctive:

    Read-only viewer: no button, and the description names who can act — "Ask an organization admin to add one." for admin-gated resources, …

    line 71

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Frontend UI Conventions

Shared primitives

Reach for the shared primitive before building the need by hand. The last column points at the rules that govern it; empty states have their own picker under § Empty states.

NeedPrimitiveGoverned by
A list of entity cardsEntityCardListcard-conventions
A row's ⋮ menuRowActionsMenucard-conventions § The ⋮ menu order
A disabled item's title-row badgeDisabledBadgecard-conventions § Icons and badges
A count that lists its names on hoverCountTooltipcard-conventions § Card height
A list's create controls and paginationListFooter§ Empty states
A loading skeleton that announces what loadsLoadingRegion—
A labelled text field, textarea or selectFormTextField / FormTextareaField / FormSelectField—
A collapsed "Advanced settings" blockFormAdvancedSectionform-conventions § How the form submits
A write-backed entity formuseEntityFormform-conventions
A one-shot write with a pending stateuseMutation—
A read-only value with a copy buttonCopyRow—
A delete behind a confirm dialogDeleteConfirmDialog + useDeleteFlow (lists) or useEntityDelete (forms)form-conventions § When a delete fails

Empty states

Every empty state renders through one of two components, picked by what the empty thing is on the page:

The empty thing is…ComponentExamples
A screen's main content: a settings page, a top-level listEmptyCardProviders, MCP, Sandbox, Webhooks, A2A endpoints, Organization Skills, Blueprints, Agents, Members
A section within a page, or a list filtered to nothingListState variant="empty"Workspace home Skills / Boards / Triggers, "No skills match your filters", A2A tokens
A picker or command list inside a popoverCommandEmptyCommand menu, timezone and model pickers

The same list can take both: SkillsList shows EmptyCard on the Organization Skills screen and ListState inside the workspace home section. A border-dashed div in a diff is the tell of a hand-rolled empty state; route it through one of the two components instead.

A screen that failed to load uses EmptyCard too, titled Couldn't load … (trigger runs, plugins, FetchErrorNotice). A list's read failure is ListError, which stays unbordered because it also renders inside dialogs and chat.

EmptyCard

components/empty-card.tsx: icon, title, description, action.

  • Icon: the bare Lucide icon the sidebar uses for that screen (lib/settings-links.ts, components/org-settings-menu.tsx), no size class (the frame sizes it). A concept keeps one icon everywhere it appears; MCP is Wrench, even on the Organization surface.
  • Title: No X configured for things you set up or connect (providers, MCP servers, sandbox, webhooks, endpoints); No X yet for things users author or that accumulate (skills, blueprints, agents, invitations, runs). No trailing period.
  • Description: what the thing is for, or why you'd want one. It adds to the title rather than restating it. At Organization scope, say where it goes next: "Add a provider here, then attach it to the workspaces that should use it."
  • Action: the buttons that fill the gap, main one first with the default (solid) variant, the rest outline (Attach shared, Import). The same buttons render once: inside the card while the list is empty, below the list (all outline) once it has rows. Build them as one actions element and place it by emptiness — see resource-list.tsx, skills-list.tsx.
  • Read-only viewer: no button, and the description names who can act — "Ask an organization admin to add one." for admin-gated resources, "Only the workspace owner can add one." for Owner-only ones (Org Admins see other Workspaces read-only). A card with nothing to do, like Organization Agents (shared agents only arrive by Promote), explains how one arrives instead.

ListState

One short line in the same dashed frame: No triggers yet., No Cron triggers to show. The section's buttons sit below it, so the line states the fact and leaves the instruction to the buttons. They sit there in every state, loading and failed included — the footer of a section never blinks out. An EmptyCard screen is the other way round: it holds the buttons itself while empty, and the footer appears only once there are rows.

Button verbs

An entry button (the one that starts the create flow) says Add for things you connect to and Create for things you author:

VerbFor
Addprovider, MCP server, webhook, endpoint, workspace, workspace context
Createagent, skill, blueprint, board, trigger, organization

Name the noun in full (Add MCP server). The form's own submit button follows form-conventions.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.