paperdeck
CLAUDE.md1 starsChanged 46 days agoMITView on GitHub
PaperDeck turns a jailbroken Kindle into a dedicated, ambient e-ink smart workstation & companion dashboard. The host computer (Electron) collects developer data, AI quotas, system metrics, and media status, renders a high-contrast 800x600 monochrome layout, and serves it over HTTP to a Kindle display daemon powered by FBInk.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-localeSkill
- create-widgetSkill
- diagnose-kindleSkill
- test-and-verifySkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
15 rules. About 0 are common, 5 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
IPC Protocol: Never expose ipcRenderer, require, or fs to the renderer.
- Very specific: line 62
When adding or editing collectors in backend/collectors/:
- Distinctive: line 63
Never block the main loop: Use async I/O or cached results with a short TTL (15s–30s).
- Very specific: line 64
Never throw uncaught errors: Always wrap parser logic in try/catch and return honest fallback or { available: false }.
- Distinctive: line 65
No raw tokens or secrets: Never return raw API keys, bearer tokens, or sensitive account IDs in the returned payload.
- Very specific: line 80
All user-facing text belongs in locales/<lang>.json under appropriate namespaces (ui, auth, dashboard).
- Very specific: line 81
When adding new keys, update locales/en.json first (the source of truth fallback).
- Very specific: line 86
Use strictly high contrast: black (#000), white (#fff), and limited grayscale grays.
- Distinctive: line 87
Keep typography crisp, large, and legible from a distance.
- Distinctive: line 88
Avoid delicate thin lines or low-contrast gradients that look muddy on e-paper.
- Very specific: line 92
Use placeholders in documentation: <IP_PC>, <IP_KINDLE>, <SSH_USER>, <SSH_PASSWORD>.
- Distinctive: line 99
When acting as an autonomous agent in this codebase:
- Very specific: line 100
Run npm test after any backend or collector modification.
- Very specific: line 101
Run npm run typecheck after modifying TypeScript files in src/.
- Very specific: line 102
Use the specialized agent skills in .agents/skills/ for common workflows:
≈ “Common” is an estimate: at least 1 in 5 of the 27,641 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
CLAUDE.md — Agent & Developer Guide for PaperDeck
PaperDeck turns a jailbroken Kindle into a dedicated, ambient e-ink smart workstation & companion dashboard. The host computer (Electron) collects developer data, AI quotas, system metrics, and media status, renders a high-contrast 800x600 monochrome layout, and serves it over HTTP to a Kindle display daemon powered by FBInk.
⚡ Quick Reference Commands
# Development & Execution
npm run dev # Launch Electron app in dev mode (Vite HMR)
npm run backend # Run standalone backend API (:8787)
npm run supervisor # Run standalone render loop (without Electron GUI)
# Validation & Quality (Run before every commit/PR)
npm test # Run full Node.js unit test suite
npm run typecheck # Validate TypeScript for main, preload, and renderer
npm run build # Full build (typecheck + electron-vite build)
# Packaging
npm run build:mac # Package macOS application
npm run build:win # Package Windows installer (.exe)🏛️ Project Architecture
kindle-dashboard/
├── backend/ # Local Node.js server (CommonJS, default port 8787)
│ ├── collectors/ # Data extractors (Claude, Antigravity, OpenCode, Codex, System, Pet)
│ ├── config.js # Runtime configuration, layouts, and widget state
│ ├── preflight.js # Local credential expiration checks (no remote network calls)
│ └── server.js # Express API serving /dash.png, /api/usage, /api/auth, /api/ping
├── render/
│ └── dashboard.html # Clean HTML/CSS/JS template captured into 800x600 e-ink PNG
├── src/ # Electron Desktop Application (TypeScript)
│ ├── main/ # Electron main process (lifecycle, IPC handlers, SSH client, timer)
│ ├── preload/ # Secure contextBridge bridges (strictly scoped, no raw ipcRenderer)
│ ├── renderer/ # React 19 UI (control panel, layout drag-and-drop, logs, settings)
│ └── shared/ # Shared TypeScript types and IPC contract interfaces
├── kindle/ # Shell scripts running on Kindle (BusyBox / Upstart / FBInk loop)
├── locales/ # Internationalization JSON dictionaries (en.json, pt-BR.json)
└── test/ # Native Node.js test runner suite (`node:test`)📐 Development Guidelines & Rules
1. Code Style & Modular Boundaries
- Backend (
backend/&scripts/): CommonJS (require/module.exports). Keep dependencies minimal. - Frontend & Main (
src/): Modern TypeScript. Strict null checks, explicit return types where applicable. - IPC Protocol: Never expose
ipcRenderer,require, orfsto the renderer. Every IPC channel must be declared in:src/main/index.ts(handler)src/preload/index.ts(bridge function)src/shared/types.ts/src/preload/index.d.ts(typings)
- State & Data Directory: Packaged apps store data in Electron
userData(PaperDeck). In dev mode, runtime files useout/.
2. Collector Implementation Recipe
When adding or editing collectors in backend/collectors/:
- Never block the main loop: Use async I/O or cached results with a short TTL (15s–30s).
- Never throw uncaught errors: Always wrap parser logic in
try/catchand return honest fallback or{ available: false }. - No raw tokens or secrets: Never return raw API keys, bearer tokens, or sensitive account IDs in the returned payload.
- Follow the standard shape:
async function collect() { return { available: true, data: { /* widget-specific metrics */ }, updatedAt: new Date().toISOString() }; } - Add a unit test in
test/<collector-name>.test.js.
3. Internationalization (i18n)
- Zero hardcoded strings in UI components or status banners.
- All user-facing text belongs in
locales/<lang>.jsonunder appropriate namespaces (ui,auth,dashboard). - When adding new keys, update
locales/en.jsonfirst (the source of truth fallback). - To add a new language, create
locales/<lang-code>.json. The app discovers it automatically.
4. E-Ink Display Constraints (Kindle Rendering)
- Resolution is 800x600 landscape (Kindle Touch 3 / Paperwhite base).
- Use strictly high contrast: black (
#000), white (#fff), and limited grayscale grays. - Keep typography crisp, large, and legible from a distance.
- Avoid delicate thin lines or low-contrast gradients that look muddy on e-paper.
5. Security & Privacy Guardrails
- Never commit real user identifiers: serial numbers, real local IPs (e.g.
192.168.x.x), real usernames (outis), passwords, or API keys. - Use placeholders in documentation:
<IP_PC>,<IP_KINDLE>,<SSH_USER>,<SSH_PASSWORD>. - SSH passwords must be encrypted via Electron
safeStorageand never sent in plain text to the renderer.
🤖 Working with AI Agents in PaperDeck
When acting as an autonomous agent in this codebase:
- Run
npm testafter any backend or collector modification. - Run
npm run typecheckafter modifying TypeScript files insrc/. - Use the specialized agent skills in
.agents/skills/for common workflows:create-widget: scaffold and register a complete widget end-to-end.add-locale: safely add and synchronize translations.diagnose-kindle: inspect Kindle shell scripts and connection protocols.test-and-verify: execute and diagnose test suites.
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.

