todome-server-implementation
Skill1 starsChanged 7 months agoMITView on GitHub
Apply todome-specific server constraints when implementing or reviewing changes under `server/`. Use when editing Bun/Hono/WebSocket handlers, storage, AI integration, GitHub sync, timeline logic, or any server-side payload that must stay aligned with `client/src/types.ts`.
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/vercel-composition-patterns/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- .agents/skills/vercel-react-view-transitions/AGENTS.mdAGENTS.md
- client/AGENTS.mdAGENTS.md
- server/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- todome-e2e-runnerSkill
- todome-frontend-implementationSkill
- todome-server-navigatorSkill
- todome-type-lint-runnerSkill
- vercel-composition-patternsSkill
- vercel-react-best-practicesSkill
- vercel-react-view-transitionsSkill
- web-design-guidelinesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 8 are distinctive, and 13 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Put new code in the matching module: ws/handlers, storage, domain, ai, github, or utilities.
- Very specific: line 13
Keep dependencies directional: ws/handlers may call ai/*, storage/*, and github/*, but storage should not import handlers.
- Very specific: line 14
When adding a new WebSocket type, update both server/ws/handlers/index.ts and the matching union in client/src/types.ts.
- Very specific: line 15
Use broadcast() and sendTo() instead of writing raw ws.send(JSON.stringify(...)).
- Very specific: line 16
After state changes, emit the corresponding *_sync event so the client fully resynchronizes.
- Very specific: line 17
Use getDbPath() for SQLite location decisions, keep schema changes in server/db.ts, and preserve the wsNeedsReload assumptions around …
- Very specific: line 18
After persisted changes, keep GitHub sync behavior intact with scheduleAutosync() when the existing flow expects it.
- Very specific: line 19
Keep Claude Agent SDK usage on the existing query()-based path and preserve the current permission model unless the task explicitly changes …
- Very specific: line 23
Put unit tests in server//*.test.ts using bun:test.
- Distinctive: line 24
If you fix data processing, storage, migration, or cross-entity state bugs, add a regression test in the same change.
- Distinctive: line 26
Check immutability when the code transforms arrays or objects.
- Distinctive: line 31
Start from the entrypoint closest to the change, usually a handler or storage function.
- Distinctive: line 33
Update shared client/server types whenever the payload changes.
- Distinctive: line 34
Add or update tests before wrapping up the task.
- Distinctive: line 35
After changes, run the relevant checks:
- Distinctive: line 43
Run the full set when the change crosses boundaries or touches shared types.
- Very specific: line 47
Use todome-server-navigator when the task first requires codebase orientation or handler tracing.
- Very specific: line 48
Use todome-e2e-runner after UI-visible backend changes that need end-to-end confirmation.
- Very specific: line 49
Use vercel-react-best-practices only if the server change also drives a React-side performance refactor.
- Very specific: line 54
Call out any payload coupling with client/src/types.ts.
- Distinctive: line 55
Prefer narrow, maintainable changes over new abstraction layers.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Todome Server Implementation
Apply the repo-specific server rules for todome. This skill mirrors the intent of server/AGENTS.md and .claude/rules/server.md, but packages it as an explicit Codex skill.
Core Rules
- Put new code in the matching module:
ws/handlers,storage,domain,ai,github, or utilities. Do not collapse new behavior into oversized files. - Keep dependencies directional:
ws/handlersmay callai/*,storage/*, andgithub/*, but storage should not import handlers. - When adding a new WebSocket
type, update bothserver/ws/handlers/index.tsand the matching union inclient/src/types.ts. - Use
broadcast()andsendTo()instead of writing rawws.send(JSON.stringify(...)). - After state changes, emit the corresponding
*_syncevent so the client fully resynchronizes. - Use
getDbPath()for SQLite location decisions, keep schema changes inserver/db.ts, and preserve thewsNeedsReloadassumptions around GitHub pull/restore. - After persisted changes, keep GitHub sync behavior intact with
scheduleAutosync()when the existing flow expects it. - Keep Claude Agent SDK usage on the existing
query()-based path and preserve the current permission model unless the task explicitly changes it.
Testing Rules
- Put unit tests in
server/**/*.test.tsusingbun:test. - If you fix data processing, storage, migration, or cross-entity state bugs, add a regression test in the same change.
- In multi-entity flows, assert not only the target behavior but also that unrelated tasks, goals, profile data, retros, life logs, or quotas stay unchanged.
- Check immutability when the code transforms arrays or objects.
- Include abnormal inputs such as broken JSON, missing keys, empty arrays, or invalid payloads when that is where the bug lives.
Workflow
- Start from the entrypoint closest to the change, usually a handler or storage function.
- Trace the full path: handler -> domain/AI/storage -> response broadcast.
- Update shared client/server types whenever the payload changes.
- Add or update tests before wrapping up the task.
- After changes, run the relevant checks:
bunx tsc --noEmit
cd client && npx tsc -b && npm run lint
bun run testRun the full set when the change crosses boundaries or touches shared types.
Companion Skills
- Use
todome-server-navigatorwhen the task first requires codebase orientation or handler tracing. - Use
todome-e2e-runnerafter UI-visible backend changes that need end-to-end confirmation. - Use
vercel-react-best-practicesonly if the server change also drives a React-side performance refactor.
Output Expectations
- Return implementation guidance and edits in terms of actual repo modules, not generic backend advice.
- Call out any payload coupling with
client/src/types.ts. - Prefer narrow, maintainable changes over new abstraction layers.
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.

