gopherstack: Instructions file for Claude Code

CLAUDE.md

gopherstack CLAUDE.md is an instructions file for Claude Code from BlackbirdWorks/gopherstack. It costs 1,781 tokens per session, scanned A, original, MIT.

A set of coding instructions for AI agents working on the gopherstack Go repository. It defines shared-code, locking, identifiers, timestamps, pagination, persistence, and AWS-behaviour rules.

In plain words
What is it for?
Use it when adding or changing gopherstack services, shared packages, stored state, AWS-style identifiers, timestamps, or paginated operations.
Why use it?
It prevents recurring implementation mistakes, such as inconsistent IDs, unsafe locking, incorrect timestamps, and state that is not saved correctly. It gives agents project-specific rules instead of relying only on general Go habits.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: names the TodoWrite tool.

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/blackbirdworks/gopherstack/claude-md"><img src="https://agentmods.dev/badge/instructions/blackbirdworks/gopherstack/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,781 This file is loaded in full into every session.
When invoked 1,781 The same file — it is already loaded in full.
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.01781 $0.01781
Opus 5.5 $0.00712 $0.00712
Sonnet 5.5 $0.00356 $0.00356
Haiku 4.5 $0.00178 $0.00178

Measured yesterday against content hash 26c449392424, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gopherstack 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 · 124 lines

How it starts

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

Project Instructions for AI Agents

pkgs/ usage and locking

Reuse pkgs/ instead of reimplementing in a service (e.g. awstime.Epoch would have prevented the QuickSight/IoT epoch-timestamp bugs).

  • Lock granularity follows invariant granularity. One coarse lockmetrics.RWMutex per service backend guards all its maps; AWS ops are cross-map transactions and Snapshot() needs one consistent view.
  • safemap.Map only for genuinely isolated single-map state (token stores, caches, janitor-swept stores). Never for backend resource maps: per-map locks tear cross-map state and risk deadlock.
  • No raw sync.Mutex/sync.RWMutex in services.
  • Per-map init/Reset/Snapshot/Restore boilerplate is a lifecycle problem, not a locking one (planned fix: gopherstack-drp). Persistence JSON field names must be preserved exactly.
  • ARNs: arn, never hand-format. IDs: awsid.New("vpc-"), not uuid.NewString()[:N].
  • Timestamps: awstime; awstime.Epoch() for epoch-seconds JSON numbers.
  • Pagination: page.Page[T], not hand-rolled NextToken/cursor logic.
  • Case-insensitive identifiers (e.g. RDS DBInstanceIdentifier): strs (Fold, Equal, ContainsFold), not per-service strings.ToLower/EqualFold.
  • Outbound HTTP: httpclient (own cloned transport); never &http.Client{} without a Transport (guarded by TestNoOutboundHTTPOnDefaultTransport).
  • All logging goes through pkgs/logger. Nil-safe pointer deref: ptrconv. Tags: tags. Shared errors: awserr.

AWS parity rules

  • No stubs: no no-op handlers, hardcoded/empty returns, fabricated IDs, or &StubOutput{}. Every routed SDK op must mutate/read real backend state, return AWS-accurate shapes and error codes, and persist (wire into the service's persistence.go backendSnapshot). If an op can't be implemented yet, say so; never ship a half-working stub.
  • Verify wire shapes against the real aws-sdk-go-v2 serializers/deserializers, not your handler's own output. Known bug classes:
    • wrong XML list wrappers (<member> vs <Item>), wrong root elements, missing response-root nesting when the output has no httpPayload member
    • ISO8601 strings where the JSON protocol expects epoch-seconds numbers
    • a hardcoded xml:"StubResponse" XMLName overriding the runtime root
    • stub registrations overwriting real handlers (EC2 uses registerStubOpsIfAbsent; real handlers must win)
    • missing errCodeLookup entries surfacing not-found as 500 InternalFailure
  • Unit tests are not parity proof. SDK-driven test/integration/*_parity_test.go caught 8 client-breaking wire bugs that green unit tests missed. Run task build-linux before go test ./test/integration/....
  • Grep-based stub hunting has false positives: an empty envelope returned AFTER real backend logic is correct (void-result ops). Read the backend method before flagging; conversely, a real-looking op may filter a never-populated map.
  • De-stubbing: remove the stub registration, delete the orphaned stub handler, drop it from bare-call stub test manifests, run golangci-lint.
  • PARITY.md front-matter items_still_open: is the only authoritative open list (gopherstack-anjf); never gaps:/deferred: or body text. A pass that fixes an item must remove it in the same commit. Dated body sections are history only (task parity-lint catches stale claims).

Read the full file on GitHub · 124 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 · 124 lines · 1,781 tokens per session scan A 26c449392424

Subscribe to this mod's changes

gopherstack CLAUDE.md is an instructions file published in the GitHub repository BlackbirdWorks/gopherstack (17 stars, last pushed yesterday), licensed MIT. It adds 1,781 tokens to every session, about $0.0071 per session on Opus 5.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-11-07.

Related

gopherstack CLAUDE.md compared with instructions from other repositories

gopherstack CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
gopherstack CLAUDE.mdBlackbirdWorks/gopherstackInstructions file17yesterdayMITA1,781Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot