savecraft.gg: Skill for Claude Code

.claude/skills/working-on-worker/SKILL.md

working-on-worker is a skill for Claude Code from joshsymonds/savecraft.gg. It costs 73 tokens per session (1,141 once invoked), scanned A, original, Apache-2.0.

A set of coding rules for Savecraft’s Cloudflare Worker, the server-side program that handles requests, live connections, data storage, and game-save delivery.

In plain words
What is it for?
Use it when changing TypeScript Worker code, WebSocket handling, database schemas, routes, authentication-related server code, or Worker tests.
Why use it?
It reduces type errors and keeps server state, errors, message handling, and tests consistent across the project.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is joshsymonds/savecraft.gg's own configuration. It tells Claude Code how to work on savecraft.gg itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything savecraft.gg configures →

Reuse

Borrowing it

Nothing to install: this file belongs to joshsymonds/savecraft.gg. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/joshsymonds/savecraft.gg/main/.claude/skills/working-on-worker/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/joshsymonds/savecraft.gg

Made for: Claude Code.

Wrote 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.

agentmods badge for working-on-worker

README.md
[![agentmods](https://agentmods.dev/badge/skills/joshsymonds/savecraft.gg/working-on-worker/github.svg)](https://agentmods.dev/skills/joshsymonds/savecraft.gg/working-on-worker)
Your own site
<a href="https://agentmods.dev/skills/joshsymonds/savecraft.gg/working-on-worker"><img src="https://agentmods.dev/badge/skills/joshsymonds/savecraft.gg/working-on-worker/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.

agentmods 80×15 button for working-on-worker

Your own site · 80×15
<a href="https://agentmods.dev/skills/joshsymonds/savecraft.gg/working-on-worker"><img src="https://agentmods.dev/badge/skills/joshsymonds/savecraft.gg/working-on-worker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 73 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,141 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00073 $0.01141
Opus 5 $0.00036 $0.00571
Sonnet 5 $0.00015 $0.00228
Haiku 4.5 $0.00007 $0.00114

Measured 8d ago against content hash 971c2dd60047, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

working-on-worker 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 8d 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.

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.

.claude/skills/working-on-worker/SKILL.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Working on the Worker

Read docs/worker.md for the full architecture reference.

Verification

just test-worker   # Vitest + Miniflare

TypeScript Rules

Type safety:

  • Never use any — use unknown if type is truly unknown.
  • Never use @ts-ignore or @ts-expect-error — fix the type issue properly.
  • Strict mode enabled. Avoid type assertions except after type guards.
  • Never use ! non-null assertion without a preceding check.

State & data:

  • Discriminated unions for state machines and message types. Never use boolean flags for multiple states.
  • Exhaustive checking with never type in switch defaults.
  • Use readonly for properties unless mutation is needed. Never mutate parameters.

Null handling:

  • Always handle null/undefined explicitly.
  • Use optional chaining (?.) and nullish coalescing (??).

Error handling:

  • Custom error classes for different error types. Never throw strings — always Error objects.
  • Never ignore Promise rejections.

eslint-enforced (CI will fail):

  • T[] not Array<T> — eslint array-type rule.
  • toSorted((a, b) => a.localeCompare(b)) not sort() — eslint unicorn/sonarjs rules.
  • Max function complexity: 15. Split into helper functions to stay under.

Never do:

  • Use any, var, ==, @ts-ignore, bare ! assertions.
  • Mutate function parameters.
  • Skip runtime validation for external data (API responses, user input).

MCP Handler

The MCP server is a hand-rolled JSON-RPC 2.0 handler. Do NOT use @modelcontextprotocol/sdk — it depends on ajv/express/hono which are CJS and incompatible with the workerd runtime.

  • Handler: src/mcp/handler.ts (protocol routing)
  • Tools: src/mcp/tools.ts (pure tool functions)
  • The agents npm package (v0.6.0) replaces the deprecated @cloudflare/agents.

See docs/mcp.md for the full tool contracts and OAuth architecture.

Test Infrastructure

Sharded parallelism: just test-worker runs 4 vitest shards in parallel (worker/scripts/test-sharded.mjs), each with its own Miniflare instance. This sidesteps Miniflare's isolatedStorage WAL bug while giving true file-level parallelism. npm test still works for single-shard runs.

Read the full file on GitHub · 92 lines

Changes

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.

  1. 8d ago First seen · 92 lines · 73 tokens per session scan A 971c2dd60047

Subscribe to this mod's changes

working-on-worker is a skill published in the GitHub repository joshsymonds/savecraft.gg (12 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 73 tokens to every session and 1,141 once invoked, about $0.0004 per session on Opus 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-08-30.

Related

Other skills, from other repositories

stripe-projects

Provision SaaS services + sync creds via Stripe Projects.

NousResearch/hermes-agent · 15 tokens

azure-eventhub-dotnet

Azure Event Hubs SDK for .NET. Use for high-throughput event streaming: sending events (EventHubProducerClient, EventHubBufferedProducerClient), receiving events (EventProcessorClient with checkpointing), partition management, and real-time data ingestion. Triggers: "Event Hubs", "event streaming"…

microsoft/skills · 94 tokens

azure-mgmt-botservice-dotnet

Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".

microsoft/skills · 78 tokens

django-storages-s3

Use when configuring Django to store static and media files on AWS S3 with django-storages. Invoke when working with the STORAGES setting, S3 buckets, presigned URLs, CloudFront, or boto3-backed file storage in settings.py. Configures the Django 4.2+ STORAGES dict, public/private custom backends, presigned GET/POST…

Jeffallan/claude-skills · 138 tokens

wikipedia

Search and read Wikipedia via x wkp — MediaWiki API, no API key, zero install; query, extract, suggest, and DDG route in one module. Load for wiki, wikipedia, encyclopedia lookup, article summary.

x-cmd/x-cmd · 49 tokens

cve

Look up CVE records via x cve — cached, zero-API-key, daily xz TSV. Load for cve, vulnerability id, kev, epss, nvd, cvelist, or security advisory.

x-cmd/x-cmd · 49 tokens