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/).
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- hyper-frames/CLAUDE.mdCLAUDE.md
- add-db-migrationSkill
- add-tauri-commandSkill
- emitter-snapshot-changeSkill
The file
Files
Add a feature surface
Checklist (todo per item)
- Scaffold.
src/features/<kebab-name>/with only the subfolders the feature needs now (components/,hooks/,store/,model/). A feature can start as two files. - Pure logic first. Anything computable without React (list derivations, math, formatting decisions) goes in
model/as pure functions — written test-first. - Data. DB-backed reads/writes via TanStack Query hooks in
hooks/, callingsrc/lib/ipc/<domain>.tswrappers (add commands via the add-tauri-command skill if the backend surface doesn't exist yet). Ephemeral UI state: feature-local Zustand store only ifuseStategenuinely can't carry it. - Compose. Mount the surface from
src/app/(sidebar entry / route / window). Features never import each other — shared pieces move tosrc/components/orsrc/lib/. - 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).
- UI primitives. Build from
src/components/ui/; add missing primitives via the shadcn CLI, then edit as our code. - Tests. Colocated:
model/functions (unit), hooks withmockIPC, one behavior-level component test for the surface's core interaction. - 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.
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
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.

