agentleFS
Konadu-Akwasi-AkuokoKonadu-Akwasi-Akuoko/katto/.claude/skills/add-feature-surface/SKILL.md

add-feature-surface

Skill2 starsChanged 5 months agoMITView on GitHub

Use when creating a new UI surface or feature area in the React app (a new sidebar tab, panel, window, or major view under src/features/).

The file

Files
SKILL.md

Add a feature surface

Checklist (todo per item)

  1. Scaffold. src/features/<kebab-name>/ with only the subfolders the feature needs now (components/, hooks/, store/, model/). A feature can start as two files.
  2. Pure logic first. Anything computable without React (list derivations, math, formatting decisions) goes in model/ as pure functions — written test-first.
  3. Data. DB-backed reads/writes via TanStack Query hooks in hooks/, calling src/lib/ipc/<domain>.ts wrappers (add commands via the add-tauri-command skill if the backend surface doesn't exist yet). Ephemeral UI state: feature-local Zustand store only if useState genuinely can't carry it.
  4. Compose. Mount the surface from src/app/ (sidebar entry / route / window). Features never import each other — shared pieces move to src/components/ or src/lib/.
  5. Palette. Register the surface's actions in the ⌘K command registry (every user-facing action in the app is reachable from the palette — design rule).
  6. UI primitives. Build from src/components/ui/; add missing primitives via the shadcn CLI, then edit as our code.
  7. Tests. Colocated: model/ functions (unit), hooks with mockIPC, one behavior-level component test for the surface's core interaction.
  8. Gate. just check.

Common mistakes

  • Importing another feature's components — move the shared piece to src/components/ instead.
  • Putting the surface's list state in Zustand when TanStack Query already caches it — Query is the source for DB-backed data.
  • Skipping the palette registration — surfaces without palette commands are design-incomplete in this app.

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.