vibedgames CLAUDE.md

vibedgames CLAUDE.md is an instructions file for coding agents from kyh/vibedgames. It costs 3,200 tokens per session, scanned A, original, MIT.

Project instructions for coding agents working on Vibedgames, a platform for deploying, hosting, and adding multiplayer features to browser games.

In plain words
What is it for?
Following the project workflow, setting up the development environment, checking the application, using the vg deployment command, and deciding which results need human review.
Why use it?
They give an agent the product context, design decisions, required commands, test checks, and conventions needed to work in the repository correctly.

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/kyh/vibedgames/claude-md
Clone the repo
git clone --depth 1 https://github.com/kyh/vibedgames

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 vibedgames CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/kyh/vibedgames/claude-md.svg)](https://agentmods.dev/instructions/kyh/vibedgames/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/kyh/vibedgames/claude-md"><img src="https://agentmods.dev/badge/instructions/kyh/vibedgames/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,200 This file is loaded in full into every session.
When invoked 3,200 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.1 $0.03200 $0.03200
Opus 5 $0.01600 $0.01600
Sonnet 5 $0.00640 $0.00640
Haiku 4.5 $0.00320 $0.00320

Measured yesterday against content hash 4271025c6770, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

vibedgames 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 · 127 lines

How it starts

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

Agent Instructions

Agent-driven development

Read AGENTS.md first. It is the tool-agnostic, runnable guide: quickstart, the two env files, seeded logins, headless auth, the pnpm verify gate, an agent-browser recipe, and which surfaces are checkable at runtime versus which need a human. This file carries the product context, architectural decisions and conventions that sit on top of it.

What This Is

vibedgames — infrastructure platform for deploying, hosting, and adding multiplayer to browser games. Users build games locally, deploy via CLI (vg deploy), and their game is served at {slug}.vibedgames.com. The web app is the central hub for discovering and playing games.

The primary user of the vg CLI is a coding agent, not a human. A human prompts their agent ("build me a bomberman game"), and the agent uses vg + the bundled skills to scaffold, generate assets, add multiplayer, and deploy. Optimise CLI UX accordingly: machine-readable output (--json), self-describing errors, deterministic exit codes, skills that document the exact commands the agent should run. Friction that a human would tolerate ("now open this URL...") blocks an agent.

Product & Business Context

  • The bet (why us): Seed your coding agent with the abilities of a full game studio. The wedge isn't "another hosting platform" — it's that an agent, armed with vg + the bundled skills, can do everything a studio does (scaffold, generate art/audio, add multiplayer, ship) without the human assembling an engine, art pipeline, or server stack. The differentiator is being agent-native and end-to-end.

Key Architectural Decisions

  • Games are untrusted user code. Session cookies are scoped to apex domain only (vibedgames.com). Games on {slug}.vibedgames.com subdomains cannot access auth cookies. CSP frame-ancestors restricts embedding. Never weaken these boundaries.
  • Single active deployment per game. No version history, no rollback. New deploy replaces old. R2 keys are games/{gameId}/{deploymentId}/{path} — immutable per deployment, enabling long cache (1yr) for assets and short cache (60s) for index.html.
  • CLI auth uses device-code flow. CLI shows 6-char code → user confirms in browser → CLI polls for token. Not OAuth.
  • better-auth 1.7 scopes account identity by (issuer, accountId). account.issuer is NOT NULL with a unique (issuer, accountId) index (account_issuer_account_id_uidx in packages/db/src/drizzle-schema-auth.ts). Credential accounts carry local:credential with accountId = the owning user's id; an OAuth provider with no real issuer carries local:oauth:<providerId>. Keep better-auth, @better-auth/api-key and @better-auth/expo on the same minor. Nothing in pnpm verify touches D1, so a schema/column mismatch surfaces only as a failed sign-in against the live database — any further change to these tables needs a matching db:push plus a backfill of existing rows.
  • Never regenerate the auth schema with @better-auth/cli. It is stuck at 1.4.21: generate:auth-schema emits no issuer, and it strips the hand-curated index(...) calls and the hand-added rate_limit table. Edit drizzle-schema-auth.ts by hand.
  • Multiplayer is host-authoritative, last-write-wins. No conflict resolution. First player becomes host; if host leaves, reassigns. Good for turn-based and host-controlled games.
  • Deploy on push to main. GitHub Actions detects changed apps and deploys via wrangler. Never run wrangler deploy locally.
  • Per-user generation credits (micro-USD ledger). Every account gets a $20 signup grant, materialized lazily on first credit access. credit_entry is an append-only ledger of integer micro-USD deltas — balance is SUM(delta_micro), there is no cached balance column, and idempotency lives in deterministic entry ids (signup:{userId}, hold:{requestId}, ...). generation tracks the per-request lifecycle: generate.forward blocks queue submits at balance ≤ 0, debits an estimated hold at submit (provider historical per-call estimate, clamped $0.01–$5), settles to actual cost from the x-fal-billable-units result-fetch header, and refunds holds when a status poll reports FAILED/CANCELLED. Only generation is metered; deploys/hosting are free. Never bypass the gate or write ledger rows outside packages/api/src/credits/.
  • Media goes through fal (internal only). vg generate exposes run, models, schema, upload, pricing, status, docs. The server holds FAL_API_KEY; the CLI proxies through the API. fal is a gateway to OpenAI, Veo, Sora, Kling, Flux, ElevenLabs, Retro Diffusion, etc. — there's no per-provider routing. End-user-facing surfaces (the vg generate CLI help and the skills under plugins/generate/skills/) must not name fal as a brand. To the user this is just a CLI that generates assets; "fal" stays an implementation detail. The one exception is model endpoint IDs: they're passed through verbatim (e.g. fal-ai/flux/dev, bytedance/seedance-2.0/...), exactly as the upstream API expects — the CLI does no id rewriting. Keep branding out of prose and help text, but never alter an endpoint ID.

Read the full file on GitHub · 127 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 Changed · +10 lines · +287 tokens per session 4271025c6770
  2. 5d ago First seen · 117 lines · 2,913 tokens per session scan A fcf85814c6ce

Subscribe to this mod's changes

vibedgames CLAUDE.md is an instructions file published in the GitHub repository kyh/vibedgames (55 stars, last pushed yesterday), licensed MIT. It adds 3,200 tokens to every session, about $0.0160 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.