claude-code-containers: Instructions file for Claude Code

CLAUDE.md

claude-code-containers CLAUDE.md is an instructions file for Claude Code from ghostwriternr/claude-code-containers. It costs 1,566 tokens per session, scanned A, original, MIT.

Repository instructions for a Cloudflare Workers project that connects Claude Code with GitHub to process issues automatically. They describe the TypeScript worker, development and deployment commands, and Wrangler configuration.

In plain words
What is it for?
Running the local worker, generating Cloudflare types, using remote resources, deploying versions, and working on GitHub issue processing.
Why use it?
They clarify how the worker runs and which generated type file must be refreshed after configuration changes. This avoids mismatches between Cloudflare bindings and the TypeScript code.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is ghostwriternr/claude-code-containers's own configuration. It tells Claude Code how to work on claude-code-containers 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 claude-code-containers configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ghostwriternr/claude-code-containers. 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/ghostwriternr/claude-code-containers/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/ghostwriternr/claude-code-containers

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 claude-code-containers CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/ghostwriternr/claude-code-containers/claude-md/github.svg)](https://agentmods.dev/instructions/ghostwriternr/claude-code-containers/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/ghostwriternr/claude-code-containers/claude-md"><img src="https://agentmods.dev/badge/instructions/ghostwriternr/claude-code-containers/claude-md/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 claude-code-containers CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/ghostwriternr/claude-code-containers/claude-md"><img src="https://agentmods.dev/badge/instructions/ghostwriternr/claude-code-containers/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,566 This file is loaded in full into every session.
When invoked 1,566 The same file — it is already loaded in full.
Security scan A 1 finding. 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.01566 $0.01566
Opus 5.5 $0.00626 $0.00626
Sonnet 5.5 $0.00313 $0.00313
Haiku 4.5 $0.00157 $0.00157

Measured 2mo ago against content hash 2d69ac97e3df, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

claude-code-containers CLAUDE.md 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.

async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
CLAUDE.md · 161 lines

How it starts

The opening of the file, as written. The whole thing — 161 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.

Development Commands

npm run dev          # Start local development server (http://localhost:8787)
npm run deploy       # Deploy to Cloudflare Workers
npm run cf-typegen   # Generate TypeScript types after wrangler config changes

⚠️ Important: Always run npm run cf-typegen after making changes to wrangler.jsonc. This regenerates the TypeScript types and updates worker-configuration.d.ts to match your bindings and configuration.

Wrangler CLI Commands

npx wrangler dev                    # Start local development (same as npm run dev)
npx wrangler dev --remote          # Use remote Cloudflare resources
npx wrangler deploy                 # Deploy to production (same as npm run deploy)
npx wrangler login                  # Authenticate with Cloudflare
npx wrangler versions upload        # Upload new version with preview URL

Tech Stack & Architecture

This is a Cloudflare Workers Container project that integrates Claude Code with GitHub for automated issue processing. It combines:

  • TypeScript Worker (src/index.ts) - Main request router and GitHub integration
  • Node.js Container (container_src/src/main.ts) - Containerized Claude Code environment running on port 8080
  • Durable Objects - Two DO classes: GitHubAppConfigDO for encrypted credential storage and MyContainer for container management

Key Architecture Points

Request Flow:

  1. Worker receives requests and routes based on path
  2. GitHub webhooks trigger issue processing in Claude Code containers
  3. Container routes (/container, /lb, /singleton, /error) for testing and load balancing
  4. Setup routes (/claude-setup, /gh-setup/*) handle API key configuration and GitHub app OAuth

Container Management:

  • Extends cf-containers library's Container class
  • Default port 8080, 45-second sleep timeout
  • Lifecycle hooks: onStart(), onStop(), onError()
  • Load balancing support across multiple container instances
  • Contains Claude Code SDK (@anthropic-ai/claude-code) and GitHub API client (@octokit/rest)

Read the full file on GitHub · 161 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. 2mo ago First seen · 161 lines · 1,566 tokens per session scan A 2d69ac97e3df

Subscribe to this mod's changes

claude-code-containers CLAUDE.md is an instructions file published in the GitHub repository ghostwriternr/claude-code-containers (245 stars, last pushed 1y ago), licensed MIT. It adds 1,566 tokens to every session, about $0.0063 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.

Related

claude-code-containers CLAUDE.md compared with instructions from other repositories

claude-code-containers CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
claude-code-containers CLAUDE.mdghostwriternr/claude-code-containersInstructions file2451y agoMITA1,566Claude Code
plan-forge naming.instructions.mdsrnichols/plan-forgeInstructions file62d agoMITA1,453GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot