drydock CLAUDE.md

drydock CLAUDE.md is an instructions file for coding agents from sideralith/drydock. It costs 7,297 tokens per session, scanned C, original, MIT.

A project constitution for Drydock, a containerised Claude Code workspace. It records the architecture, security boundaries, state separation, supported platforms, and design invariants that contributors must preserve.

In plain words
What is it for?
Use it when changing Drydock’s architecture, reviewing proposals or pull requests, or checking whether work preserves credential isolation and container behaviour.
Why use it?
It gives agents and contributors explicit rules for handling credentials, container state, host access, and runtime safety instead of relying on assumptions.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sideralith/drydock/claude-md.svg)](https://agentmods.dev/instructions/sideralith/drydock/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/sideralith/drydock/claude-md"><img src="https://agentmods.dev/badge/instructions/sideralith/drydock/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 7,297 This file is loaded in full into every session.
When invoked 7,297 The same file — it is already loaded in full.
Security scan C 1 finding. 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.07297 $0.07297
Opus 5 $0.03648 $0.03648
Sonnet 5 $0.01459 $0.01459
Haiku 4.5 $0.00730 $0.00730

Measured 4d ago against content hash b6ee21ec555c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

drydock CLAUDE.md scanned grade C 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 4d 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

has direct read access to the user's primary auth identities. A single `cat ~/.ssh/id_ed25519`
CLAUDE.md · 392 lines

How it starts

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

drydock — Project Constitution

Architecture, invariants, and conventions for agents and contributors working on drydock itself.

1. Project Identity

drydock is a containerized Claude Code workspace: Docker-out-of-Docker (DooD) via a bind-mounted host socket, credential isolation via ~/.config/drydock/, and container-specific Claude / engram state so host and container sessions never race. Threat model A: drydock defends against agent accidents (typos, runaway loops, footguns), not adversaries. Non-goals: no adversarial sandbox, no macOS first-class support until tested, no Windows native support.

This file is the architecture constitution — read by agents at session start and by contributors when evaluating a PR or proposal. It is not user documentation. See → README.md for user-facing setup and usage.

2. Architectural Invariants

Eight invariants, each following the next pattern — Rule, Why (with a specific falsifiable failure mode), Consequence — ordered outside-in: credentials → state isolation → hooks defense → optional features → DooD foundation → meta-rule → runtime hardening defaults. Stable identifiers (INV-N) enable cross-artifact citation; section identifiers (§N) likewise.

INV-1: Credential Isolation

  • Rule: The compose stack MUST NOT bind-mount host ~/.ssh, ~/.gnupg, or the gpg-agent socket. SSH and GPG material MUST live exclusively under ~/.config/drydock/keys/<project>_deploy and ~/.config/drydock/signing/. Drydock MUST NOT mutate any file the host owns — in particular, the sibling repo's .git/config (remote.*.url, hooks, includes) and the host's ~/.gitconfig are off-limits. Container-only routing (SSH alias resolution, url.insteadOf) is delivered via drydock-owned files under ~/.config/drydock/ that are RO bind-mounted into the container, never by editing host artifacts in place.
  • Why: Two independent failure modes share the same boundary. (1) Credential blast radius. A compromised or instruction-following-too-literally agent has direct read access to the user's primary auth identities. A single cat ~/.ssh/id_ed25519 or accidental cp to /tmp/ leaks the host's primary identity — not just a deploy key. The blast radius extends to every system that trusts that key (GitHub personal account, servers, cloud providers). (2) Host gitconfig non-contamination (issue #89). A drydock mutation of the sibling's .git/config — for example, rewriting remote.origin.url to a container-only SSH alias — silently breaks the same git operation on the host because .git/config is a single file shared across the bind-mount. The host's git fetch / git push against the sibling stops working the moment drydock writes; the host has no way to use a URL that only the container's managed SSH config knows how to resolve. Routing MUST happen via container-only mechanisms (url.insteadOf in a drydock-owned gitconfig, the managed SSH config, GIT_SSH_COMMAND) so the host artifact stays canonical end-to-end.
  • Consequence of violating: (1) A buggy or prompt-injected agent exfiltrates the full SSH identity in one command, compromising every system tied to that identity — not merely the one project being worked on. (2) A drydock release that writes host artifacts breaks the user's host workflow silently (e.g. git fetch fails immediately after drydock link --rw) and creates a mutually exclusive state where no value of the contaminated file works on both sides at once.
  • Where this lives in code: docker-compose.yml mounts list (no ~/.ssh, no ~/.gnupg); docker-compose.ssh.yml and docker-compose.gpg.yml (credential overlays sourced from ~/.config/drydock/ exclusively). For RW sibling mode: lib/sibling_ssh.sh (_generate_sibling_deploy_key, _regenerate_session_gitconfig, _restore_canonical_remote_url); the managed SSH config is written to ~/.config/drydock/ssh-config-<primary> and RO bind-mounted into the container; the per-project gitconfig is written to ~/.config/drydock/gitconfig-<primary> and RO bind-mounted, with GIT_CONFIG_GLOBAL pointing at it (docker-compose.ssh.yml). The keys directory (~/.config/drydock/keys/) mounts as a single :ro directory (no per-key overlay enumeration — scales to N siblings without changing the compose files). All per-sibling key material stays under ~/.config/drydock/keys/ — already covered by the __HOME__/.config/drydock/** deny rule in templates/managed-settings.d/00-secrets.json. cmd_link --rw (lib/commands.sh) MUST NOT call git remote set-url on the sibling; export_compose_env (lib/compose.sh) runs _restore_canonical_remote_url once per RW sibling on every drydock run as a startup migration for repos still carrying a v0.2.1 aliased URL.
  • Deep dive: docs/security.md

Read the full file on GitHub · 392 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. 4d ago First seen · 392 lines · 7,297 tokens per session scan C b6ee21ec555c

Subscribe to this mod's changes

drydock CLAUDE.md is an instructions file published in the GitHub repository sideralith/drydock (5 stars, last pushed 1mo ago), licensed MIT. It adds 7,297 tokens to every session, about $0.0365 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.