form-conventions
Skill114 starsChanged 2 months agoMITView on GitHub
Post-save conventions for Platypus frontend forms — where a save lands the user, and what the submit button is called. Use when adding or changing a form in apps/frontend, its submit button, or what happens after it saves.
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/humanizer/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-api-endpointSkill
- api-conventionsSkill
- ask-mattSkill
- better-auth-best-practicesSkill
- codebase-designSkill
- code-reviewSkill
- database-schema-changesSkill
- diagnosing-bugsSkill
- docs-auditSkill
- domain-modelingSkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- humanizerSkill
- implementSkill
- improve-codebase-architectureSkill
- platypus-toolsSkill
- pre-release-checkSkill
- prototypeSkill
- researchSkill
- resolving-merge-conflictsSkill
- setup-matt-pocock-skillsSkill
- shadcnSkill
- tddSkill
- teachSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- triageSkill
- wait-whatSkill
- wayfinderSkill
- wizardSkill
- writing-for-agentsSkill
- writing-great-skillsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Read the shape off apps/frontend/app.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Frontend Form Conventions
Where a save lands
One rule covers every form: a save returns the user to the entity's home, and only leaves the page when the form has no home to return to. Which of the two applies falls out of the entity's shape in the route tree:
| Shape | The form is… | On save | Examples |
| Collection member | the entity's page, reached from a list | go to list | Agents, Blueprints, Skills, Triggers, MCP, Providers, Webhooks, Workspace Context |
| Entity sub-page | a settings/ child of a page the entity owns | stay | Boards, Dashboards |
| Singleton | one per Workspace/Org/account, so there is no list | stay | Sandbox, Organization, Workspace |
| Dialog or inline | not a page at all | stay | Members, Invitations, Global Context, everything in Chat |
Read the shape off apps/frontend/app. settings/agents/[agentId] renders
the agent edit form — an agent has no detail page, so leaving the form means
returning to settings/agents. A board does have a page, and its form lives
at boards/[boardId]/settings, so saving keeps you there.
Staying means mutate() (or router.refresh()) plus a toast. Never
router.push to the page you are already on.
Creating always navigates — to the new entity where it has a page of its own, otherwise to the list it now belongs to.
Deleting always navigates away from whatever it destroyed, whatever the shape: to the list for a collection member, to the parent otherwise.
A list is wherever the list actually renders, not a route that looks like one.
Triggers navigate to the Workspace home because that is where the trigger list
lives; there is no triggers/ page.
What the button says
The label names the outcome, so it follows from the destination:
| Case | Label |
| Create, page-level form | Save |
| Edit that navigates to the list | Update |
| Edit saved in place | Save |
| Adding to a surface you stay on | Add |
Update is reserved for the edit-then-leave case — it is the word for a save
you are about to be carried away from. Add covers the in-place additions:
Add column, Add card, Add widget.
Let the form heading name the entity and keep the button to the bare verb
(Save, not Create board). Prefer the bare verb over Save changes too. A
loading state keeps the same verb as the button it replaces, with the repo's
ASCII ellipsis: Saving... under Save, Updating... under Update.
Unlike the destination rule, this one is ahead of the code. Most forms today
label on {id ? "Update" : "Save"} alone, so a stay-in-place edit can still
read Update (Sandbox, Organization, Workspace, Dashboard settings); #793
brings the existing buttons into line. Write new buttons to the rule above,
and leave the stragglers to that issue.
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.

