write-front-end
Skill4 starsChanged 2 days agoApache-2.0View on GitHub
Use only when writing or reviewing code under web/ (the React + Vite + Tailwind app). Not needed for CLI, core, store, server or integration work.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- audit-testsSkill
- deslopSkill
- follow-conventionsSkill
- review-codeSkill
- write-ci-workflowSkill
- write-pull-requestSkill
- write-skillSkill
- inscribeSkill
- pnyx-arrange-columnsSkill
- pnyx-cliSkill
- pnyx-firstmate-as-hydraSkill
- pnyx-manage-workersSkill
- pnyx-orchestrateSkill
- pnyx-report-progressSkill
- pnyx-set-upSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Never use native-styled controls (<select>, <input type="checkbox"> and friends as the browser draws them) or a third-party styled kit such …
- Very specific: line 17
Put derived values (labels, classes, formatted text) and compound conditions in named constants above the return, not inline in the JSX.
- Distinctive: line 18
Read Hydra data from the connection store, which builds it from Zero's queries.
- Distinctive: line 19
Use the installed React, Vite and Tailwind versions' current APIs, checked against their types or docs, not deprecated props or callbacks.
- Very specific: line 20
Keep accessible names, aria-label and data-* state attributes stable when you move or rename a component.
- Distinctive: line 22
Prefer inline creation and editing over modals and dialogs: a new column is created inline at the end of the Hydra, card fields edit in …
- Distinctive: line 65
When testing an action, hold its server request and assert the visible result before releasing it.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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
Writing the web app
follow-conventions applies here too; this skill adds what is specific to web/.
- Build UI from the primitives in
web/src/shared/ui/. When one is missing, add it there and extend it; do not inline a one-off control. - Never use native-styled controls (
<select>,<input type="checkbox">and friends as the browser draws them) or a third-party styled kit such as DaisyUI. Pnyx has one look in every browser. - Colors and fonts come from the theme tokens in
web/src/index.css. No raw hex values or ad hoc font stacks in components. - Reuse before building. Search
web/src/shared/ui/and the feature folders underweb/src/for a component, hook or formatter that already does the job; build a new one only when nothing composes into it. - Keep components small: one job each, composed from primitives. A screen reads as a list of named pieces, not one block of JSX. A piece used by one file sits above the exported component in that file; a generic piece several features use moves to
web/src/shared/ui/. A component that looks generic but carries one feature's logic stays in that feature's folder; when a file comes to hold unrelated concerns, split it along them inside that folder (follow-conventions). - Put derived values (labels, classes, formatted text) and compound conditions in named constants above the
return, not inline in the JSX. - Read Hydra data from the connection store, which builds it from Zero's queries; live agent activity and chat pages come over the one WebSocket. Don't keep a second copy of either in component state.
- Use the installed React, Vite and Tailwind versions' current APIs, checked against their types or docs, not deprecated props or callbacks.
- Keep accessible names,
aria-labelanddata-*state attributes stable when you move or rename a component; assistive technology relies on them. - Chat tokens (commands, skills and task mentions) share one rendering between the composer and sent messages, including their icons, colors and task navigation. Keep surrounding text normal and unknown command or skill names literal.
- Prefer inline creation and editing over modals and dialogs: a new column is created inline at the end of the Hydra, card fields edit in place. Reserve overlays for things that truly need them (command palette, confirming a destructive action).
Written text
Text people write goes through two shared components, so a new screen gets chips, mentions, skills and images by using them:
RichText(web/src/shared/ui/rich-text.tsx) shows agent- or owner-written text: questions, notes, briefs, reports, comments and chat. It renders task, column and skill chips, and every Markdown image, image token and image path as the composer's image chip. Images use the restricted source and viewer.CollapsibleTextisRichTextbehind "Show more". A one-line summary inside a control usesmarkdownText.ComposerField(web/src/hydra/composer-field.tsx) is the composer for owner-written prose: the Hydra composer, comment notes, answers, asks and briefs, and any new one. On its own it is a compact box that grows with its text, without the + menu. It handles @ mentions, / skills and commands, chips, images pasted or dropped at the caret, and copies that keep their references. The app provides its tasks, projects, columns and skills once throughComposerSourcesProvider. Model, mode, effort and Fast controls stay on the Hydra composer. A single-line title stays anInput.
<RichText text={card.intent} />
<ComposerField label="Your answer" value={text} change={({ text }) => setText(text)} />Actions show their result immediately
For reversible edits, publish the result through the shared optimistic resource as soon as the owner acts, then confirm it with the server in the background. Allocate a stable attempt/event ID before sending and retain it across uncertain delivery and retry. Key a created item by its client key, map that key to the confirmed ID, and update its fields in place. Confirmation must keep the same React element and DOM node: no refetch-driven remount, collapse or blink.
On a definite refusal, remove the refused preview and show the server's reason. Restore the draft when useful without replacing a newer edit. A message sent in Hydra's chat is the exception: the refused message stays in the chat marked Not sent with the server's reason, and Retry sends it again under the same event ID. While delivery is unconfirmed, retain the preview and show “Checking…”; a timeout or disconnect does not mean the edit failed. Use the shared pending state for these outcomes instead of inventing a second local saved state. Destructive or irreversible actions stay confirm-first; preview the result only after explicit confirmation.
Bad: the editor waits for the server before showing the edit.
await command(edit)
closeEditor()Good: the command publishes its shared preview synchronously, so the editor closes at once, while its durable ID lets confirmation reconcile it in place. The handler awaits the result and restores the draft on a refusal.
const saving = command({
name: 'task',
args: ['rename', task.key, '--title', title, '--event-id', crypto.randomUUID()],
})
closeEditor()
try {
await saving
} catch (error) {
restoreDraft({ title, error })
}When testing an action, hold its server request and assert the visible result before releasing it. For creation, retain the element reference and check its first painted frame and visibility through confirmation, as well as refusal and reconnect behavior.
Pull requests with visible changes
Show before and after screenshots of each changed view side by side in a Before | After table, at a reduced width (<img src="..." width="360">), in both light and dark themes. Add a short GIF when motion or interaction is the point. Host media on the pr-media branch under pr-<number>/, never in the PR's diff or a gist, and link it as https://github.com/leonardourci/pnyx/blob/pr-media/pr-<number>/<file>?raw=true.
Long lists in Activity and chat use @tanstack/react-virtual over Zero’s paged queries for variable row heights; zero-virtual needs fixed row heights.
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.

