claudecode-switchboard
CLAUDE.md4 starsChanged 3 months agoMITView on GitHub
A local dashboard for every Claude Code session on this Mac. Two files, Node stdlib, no build. After any meaningful change, append an entry to WORKLOG.md. This applies to agents and humans alike, and it is not optional — it is the first thing to read here and the last thing to write. git log already records what changed. WORKLOG.md records why, how you verified it, and what you tried that didn't work. Most of the wrong turns in this…
In this repositoryOne other file it gives its agents.
- switchboardSkill
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Write an entry when you fixed something non-obvious, made a call that could reasonably have gone the other way, or learned something about …
- Very specific: line 44
node claude-sessions.js --selftestmust pass: before you commit. It covers token accounting and the /talk sanitiser. - Very specific: line 59
Every subprocess call uses execFileSync with an argument array.
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md 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
switchboard
A local dashboard for every Claude Code session on this Mac. Two files, Node stdlib, no build.
Log your work
After any meaningful change, append an entry to WORKLOG.md. This applies to agents and humans alike, and it is not optional — it is the first thing to read here and the last thing to write.
git log already records what changed. WORKLOG.md records why, how you verified it, and
what you tried that didn't work. Most of the wrong turns in this repo were repeats of something
already ruled out, so the "Rejected" line matters as much as the rest.
Write an entry when you fixed something non-obvious, made a call that could reasonably have gone the other way, or learned something about Claude Code's internals. Skip it for typos.
House rules
- Zero dependencies. Two files and Node's stdlib. Don't add a package for what thirty lines can do, and don't add a build step.
- Nothing in a scrolling flex column may shrink. Children default to
flex-shrink: 1, which squashes the shortest items when the column overflows — a 27px line rendered at 11px and looked like a blank strip. Setflex: none, and checkscrollHeight > offsetHeight, not just that an element "is visible". - Never let a selector reach into message content.
#talklog .m i,.q,.what .q— three separate bugs where a broad descendant selector styled text a user or agent wrote. Scope rules for chrome to a class the chrome owns (i.hd), never to a bare tag inside a content block. - Nothing here is public API. The
~/.claudelayout, transcript record shapes, the peer socket path, the usage endpoint — all internal and liable to change. Parse defensively: skip records you don't understand so the failure mode is missing data, never a crash. - Verify by running it. Reasoning about the code is how most of the mistakes in WORKLOG.md happened. Start the server, open the page, look at it — in dark mode too.
tick()rebuilds every tile every 2 seconds. Anything the user is mid-interaction with must live outside#groups, or its state must live outside the DOM. This has bitten twice.- Bump
versionin both.claude-plugin/plugin.jsonandpackage.jsonfor anything worth shipping.claude plugin updatecompares versions, not commits, so without a bump installed copies keep serving old code. - Check who owns port 7823 before testing a change.
/switchboardruns a copy from the plugin cache path; a dev server started while it is up walks to 7824 without complaint, and you end up verifying old code.lsof -nP -iTCP:7823 -sTCP:LISTENsettles it. - A green
--selftestdoes not mean the server runs. It exits early, so it cannot catch a load-order or module-level error. Start the server and curl/apibefore you commit. node claude-sessions.js --selftestmust pass before you commit. It covers token accounting and the/talksanitiser.
Security
This dashboard serves the text of your prompts. Treat the port like your terminal.
- Binds to loopback only.
HOST=0.0.0.0publishes prompts, working directories and session names with no authentication. /focus,/send,/talkand/killare POST + same-origin only — any web page you visit can otherwise reach a localhost port./talkis the general "type into my terminal" endpoint. Control characters stripped, 2000 char cap, AppleScript literal escaped, body not query string. If you touch it, extend the--selftestassertions./killsends SIGTERM, never SIGKILL, only to a pid that is live and in the registry.- Every subprocess call uses
execFileSyncwith an argument array. No shell. - The Keychain OAuth token is used for one request. Never log it, write it, or serve it.
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.

