hackbox CLAUDE.md

A project guide for Hackbox, a real-time multiplayer game platform where a host game sends screens to players' phones and receives their actions. It explains the monorepo, a repository containing several related applications, and the Cloudflare-based system that connects them.

In plain words
What is it for?
Use it when working on the relay, HTTP API, Cloudflare Workers, Durable Objects for live shared state, or D1 for stored history.
Why use it?
It helps the coding agent understand which application handles each part of the platform and how live messages and saved game history move through the system.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/devanhurst/hackbox/claude-md
Clone the repo
git clone --depth 1 https://github.com/devanhurst/hackbox
Per session 4,287 This file is loaded in full into every session.
When invoked 4,287 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.04287 $0.04287
Opus 5 $0.02143 $0.02143
Sonnet 5 $0.00857 $0.00857
Haiku 4.5 $0.00429 $0.00429

Measured yesterday against content hash 0aa7a6d26a39, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hackbox CLAUDE.md 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 yesterday.

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.md · 319 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Hackbox is a real-time multiplayer game platform (think Jackbox): a host (a third-party game, typically a Unity build, not in this repo) drives UI onto players' phones and receives their interactions, all relayed in real time.

The platform runs entirely on Cloudflare — Durable Objects for real-time sync, D1 for durable history, and several Workers. There is no always-on server and (for the live path) no managed database.

History: Hackbox was migrated off a Node/Express/Socket.io + Postgres service (on Render, at app.hackbox.ca) onto Cloudflare. That legacy service has since been shut down and its code removed from this repo — there is no backwards-compatible fallback transport any more. All work goes in the Cloudflare Workers below.

Monorepo layout

Dir Worker What it is
relay/ hackbox-relay The realtime core: a Room Durable Object (partyserver) holding live member state + a replay cache, and writing permanent history to D1.
api/ hackbox-api A Hono Worker — the HTTP front door (POST /api/rooms, room existence probes).
client/ hackbox-client The Vue 3 player SPA, served as a static-assets Worker.
admin/ hackbox-admin A Nuxt 3 admin dashboard (Access-protected) reading room/member history from D1 + live presence from the relay.
db/ The Cloudflare D1 schema (schema.sql) — permanent room/member history.
docs/ The public docs site (Nuxt Content, hackbox.ca/docs). Source under docs/content/.

Routing — apex path prefixes, not subdomains

All Workers are served under the apex hackbox.ca via path prefixes rather than api./relay. subdomains (subdomains get reset by some users' SNI-filtering middleboxes; the apex is the durable fix). Order matters — more specific routes win:

Read the full file on GitHub · 319 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. yesterday First seen · 319 lines · 4,287 tokens per session scan A 0aa7a6d26a39

Subscribe to this mod's changes

hackbox CLAUDE.md is an instructions file published in the GitHub repository devanhurst/hackbox (5 stars, last pushed 27d ago), licensed MIT. It adds 4,287 tokens to every session, about $0.0214 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-31.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

buildNext

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

Instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,040 tokens

langchain AGENTS.md

Instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens