create-widget
Skill1 starsChanged 46 days agoMITView on GitHub
Step-by-step workflow to scaffold, implement, and register a new dashboard widget in PaperDeck.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- add-localeSkill
- diagnose-kindleSkill
- test-and-verifySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 5 are distinctive, and 8 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.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill whenever an agent needs to add a new widget or data card to PaperDeck.
- Distinctive: line 12
Must include a TTL cache (e.g.
- Very specific: line 13
Must catch all errors and return { available: false, error: err.message } instead of throwing.
- Distinctive: line 38
Import the new collector.
- Very specific: line 39
Add it to collectAll() mapping.
- Very specific: line 42
Add to AVAILABLE_WIDGETS array with { id: '<widget-name>', name: '<Readable Name>' }.
- Very specific: line 43
Add default toggle/display options to DEFAULT_WIDGET_OPTIONS.
- Very specific: line 46
Add card rendering logic inside the renderWidget(block, payload) switch.
- Very specific: line 47
Use high-contrast CSS (pure black #000 text, white #fff background, #333 borders).
- Distinctive: line 48
Ensure typography is crisp and legible on an 800x600 e-ink screen.
- Very specific: line 51
Add widget definition to TOOL_CONFIG_OPTIONS.
- Distinctive: line 52
Add preview card representation.
- Distinctive: line 55
Test standard data collection and fallback error handling.
≈ “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
Create Widget Skill
Use this skill whenever an agent needs to add a new widget or data card to PaperDeck.
1. Create Data Collector (backend/collectors/<widget-name>.js)
- Must use CommonJS.
- Must include a TTL cache (e.g. 15-30 seconds).
- Must catch all errors and return
{ available: false, error: err.message }instead of throwing. - Export
collect()function.
const CACHE_TTL_MS = 30000;
let cache = { at: 0, data: null };
async function collect() {
const now = Date.now();
if (cache.data && (now - cache.at < CACHE_TTL_MS)) {
return cache.data;
}
try {
const data = { /* collect your metrics here */ };
cache = { at: now, data: { available: true, data, updatedAt: new Date().toISOString() } };
return cache.data;
} catch (err) {
return { available: false, error: err.message, data: null };
}
}
module.exports = { collect };2. Register Collector in backend/collectors/index.js
- Import the new collector.
- Add it to
collectAll()mapping.
3. Register Widget in backend/config.js
- Add to
AVAILABLE_WIDGETSarray with{ id: '<widget-name>', name: '<Readable Name>' }. - Add default toggle/display options to
DEFAULT_WIDGET_OPTIONS.
4. Add E-Ink Rendering Card in render/dashboard.html
- Add card rendering logic inside the
renderWidget(block, payload)switch. - Use high-contrast CSS (pure black
#000text, white#fffbackground,#333borders). - Ensure typography is crisp and legible on an 800x600 e-ink screen.
5. Register in Layout Editor (src/renderer/src/views/LayoutEditor.tsx)
- Add widget definition to
TOOL_CONFIG_OPTIONS. - Add preview card representation.
6. Write Unit Test (test/<widget-name>-collector.test.js)
- Test standard data collection and fallback error handling.
7. Run Verification
npm test
npm run typecheck
npm run buildDoes 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.

