Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add mslavov/shelly-forge --skill shelly-scriptinggit clone --depth 1 https://github.com/mslavov/shelly-forgeWrote 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/mslavov/shelly-forge/shelly-scripting)<a href="https://agentmods.dev/skills/mslavov/shelly-forge/shelly-scripting"><img src="https://agentmods.dev/badge/skills/mslavov/shelly-forge/shelly-scripting/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/mslavov/shelly-forge/shelly-scripting"><img src="https://agentmods.dev/badge/skills/mslavov/shelly-forge/shelly-scripting.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.00110 | $0.01311 |
| Opus 5.5 | $0.00044 | $0.00524 |
| Sonnet 5.5 | $0.00022 | $0.00262 |
| Haiku 4.5 | $0.00011 | $0.00131 |
Grade A, and why
shelly-scripting scanned grade A with 0 findings 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 today.
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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Shelly device scripting
Write device code in TypeScript under src/<solution>/. Each configured entry becomes
one ES5 script on a device. The interpreter is not Node or a browser. Support varies
by model and firmware. Check that the target supports scripting and the APIs you use.
Rules that prevent crashes
- Keep callbacks shallow. The official language reference warns that more than two or three levels of nested anonymous functions can crash the device. Define named callbacks before use and register them at startup.
- Never block. Scripts share the firmware's main task. Use
Timer.setand callbacks instead of busy waits or long loops. - Track resource use. Each script has at most 5 timers, 5 event handlers, 5 status handlers, 5 in-flight RPC calls, 10 MQTT subscriptions, and 5 HTTP endpoints. Register once, release unused handles, and sequence RPC calls.
- Keep durable state in KVS or
Script.storage. Module variables reset when the script restarts. Validate stored values before using them. - Keep the final artifact at or below
SCRIPT_MAX_BYTES, 65535 UTF-8 bytes.Script.PutCoderejects 65536 bytes or more. Forge reportssize-limitabove the limit andsize-budgetabove 80% of it.
Use the device types and checks
The generated device tsconfig loads node_modules/shelly-forge/types/lib.shelly.d.ts
and node_modules/shelly-forge/types/shelly.d.ts with noLib: true and types: [].
The replacement library rejects missing globals and unsupported array methods.
Keep moduleDetection: "force" in both device and test configurations so files
without imports or exports stay separate modules. Do not add Node or DOM types
to device code to silence errors.
Forge bundles with esbuild's esnext target and uses TypeScript for ES5 lowering.
Its __assign and __rest helpers feature-detect missing built-ins and use
fallbacks. The final pass normalizes UTF-8 even with --no-minify. AST checks use
the unminified ES5 bundle and include code excerpts; size checks use the shipped
artifact. For minified builds and check, text locations include (unminified)
and JSON findings include bundle: "unminified". build --no-minify writes the
matching file. Fix errors and investigate warnings. --strict makes warnings fail
the check. Passing these checks does not prove device compatibility.
What ships with it
3 files 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.
- today First seen · 97 lines · 110 tokens per session scan A ebb1578586a7
shelly-scripting is a skill published in the GitHub repository mslavov/shelly-forge (21 stars, last pushed yesterday), licensed MIT. It adds 110 tokens to every session and 1,311 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-06.
shelly-scripting compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| shelly-scriptingmslavov/shelly-forge | Skill | 21 | yesterday | MIT | A | 110 | Claude Code, Codex |
| womldali-benothmen/woml | Skill | 174 | 2d ago | none | A | 66 | Claude Code, Codex |
| bun-ffi-native-bindingHarmeet10000/skills | Skill | 7 | 6mo ago | MIT | A | 48 | Claude Code, Codex |
| viam-typescriptviam-devrel/agent-skills | Skill | 2 | 3mo ago | none | A | 234 | Claude Code |
| no-bare-castsprisma/orm | Skill | 48k | yesterday | Apache-2.0 | A | 52 | Claude Code, Codex |
| aws-sst-developmentsickn33/agentic-awesome-skills | Skill | 49k | yesterday | MIT | A | 26 | Claude Code |
| holoscan-install-wheelNVIDIA/skills | Skill | 3.9k | yesterday | Apache-2.0 | A | 34 | Claude Code, Codex |