Borrowing it
Nothing to install: this file belongs to devapro/n-dashboard. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/devapro/n-dashboard/main/.claude/skills/write-widget/SKILL.mdgit clone --depth 1 https://github.com/devapro/n-dashboardWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/devapro/n-dashboard/write-widget)<a href="https://agentmods.dev/skills/devapro/n-dashboard/write-widget"><img src="https://agentmods.dev/badge/skills/devapro/n-dashboard/write-widget/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/devapro/n-dashboard/write-widget"><img src="https://agentmods.dev/badge/skills/devapro/n-dashboard/write-widget.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00071 | $0.02696 |
| Opus 5.5 | $0.00028 | $0.01078 |
| Sonnet 5.5 | $0.00014 | $0.00539 |
| Haiku 4.5 | $0.00007 | $0.00270 |
Grade A, and why
write-widget scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s -X POST localhost:8080/api/widgets -H 'content-type: application/json' \ How it starts
The opening of the file, as written. The whole thing — 201 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing an n-dashboard widget
A widget is one function on disk. The platform decides when to call it (clock, MQTT message, webhook, manual), validates what it returns against its kind's schema, and pushes the result to open tabs over SSE. There is no plugin format and no config-driven renderer, so summing a field, joining two APIs and remembering what you already saw are all ordinary code.
Read these first, in this order
Do not write a widget from memory of this file — the API is defined in the repo and this skill can drift from it.
-
src/shared/ctx.d.ts— the single source of truth forCtxand for every kind's data type. Read the type you are about to return, in full. -
src/shared/kinds/<kind>.ts— the runtime Zod schema, thesampleand the startertemplatefor that kind. The schema is what actually rejects a result. -
The closest
examples/*/widget.ts— each one exists to teach a specific part of the API and is heavily commented. Pick by what you need:need example HTTP JSON → one number crypto-pricean API key stock-quotesumming / reshaping an array api-sumMQTT, plus recorded history office-tempreading history back as a chart temp-historyGraphQL (and why res.okis not enough)github-prs,github-approvalsa webhook and a poll in one widget slack-unreadsigned JWT + a token cached in ctx.statebigquery-queryGoogle Calendar (same code on either auth path) next-meetingsthreshold bands disk-usageHTTP Basic + asking an API for fewer fields jira-jql
The two files
data/widgets/<id>/
widget.json config — kind, triggers, history, timeout
widget.ts the function
state.json ctx.state, written back after each successful scheduled run
history.ndjson append-only, trimmed to the retention window
widget.json, validated by widgetConfigSchema in src/shared/widget.ts:
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 201 lines · 71 tokens per session scan A 7e375381fa68
write-widget is a skill published in the GitHub repository devapro/n-dashboard (12 stars, last pushed 3mo ago), licensed MIT. It adds 71 tokens to every session and 2,696 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
write-widget compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| write-widgetdevapro/n-dashboard | Skill | 12 | 3mo ago | MIT | A | 71 | Claude Code |
| olares-chartbeclab/Olares | Skill | 5.3k | yesterday | AGPL-3.0 | A | 85 | Claude Code, Codex |
| olares-routerbeclab/Olares | Skill | 5.3k | yesterday | AGPL-3.0 | A | 202 | Claude Code, Codex |
| olares-clusterbeclab/Olares | Skill | 5.3k | yesterday | AGPL-3.0 | A | 77 | Claude Code, Codex |
| olares-filesbeclab/Olares | Skill | 5.3k | yesterday | AGPL-3.0 | A | 77 | Claude Code, Codex |
| olares-knowledgebeclab/Olares | Skill | 5.3k | yesterday | AGPL-3.0 | A | 80 | Claude Code, Codex |
| olares-marketbeclab/Olares | Skill | 5.3k | yesterday | AGPL-3.0 | A | 66 | Claude Code, Codex |