crossplane-diff: Instructions file for Claude Code

CLAUDE.md

crossplane-diff CLAUDE.md is an instructions file for Claude Code from crossplane-contrib/crossplane-diff. It costs 11,341 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for Crossplane Diff, a tool related to comparing Crossplane configuration or resource definitions. They document how to build, test, generate, lint, and review the Go project.

In plain words
What is it for?
Building the binary, running unit and integration tests, checking coverage, fetching Crossplane cluster definitions, and running pre-pull-request checks.
Why use it?
They provide the project-specific commands needed to validate changes consistently before submitting them.

Instructions file for Claude Code

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

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

Reuse

Borrowing it

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

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 crossplane-diff CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/crossplane-contrib/crossplane-diff/claude-md"><img src="https://agentmods.dev/badge/instructions/crossplane-contrib/crossplane-diff/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 11,341 This file is loaded in full into every session.
When invoked 11,341 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.11341 $0.11341
Opus 5.5 $0.04536 $0.04536
Sonnet 5.5 $0.02268 $0.02268
Haiku 4.5 $0.01134 $0.01134

Measured 18d ago against content hash 32576cbc5a12, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

crossplane-diff 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 18d 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.

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 · 728 lines

How it starts

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

Building and Testing

# Build the binary for your platform
earthly +build

# Run unit and integration tests (fast, ~7s)
# Direct go test - fastest, immediate output
cd cmd/diff
go test ./...

# Via Earthly (ensures consistent environment, caches dependencies)
earthly +go-test

# Run a specific test
go test ./cmd/diff/diffprocessor -run TestCachedFunctionProvider -v

# Run a single test file
go test ./cmd/diff/diffprocessor/diff_processor_test.go -v

# Check test coverage
go test -cover ./cmd/diff/diffprocessor/... -coverprofile=/tmp/coverage.out
go tool cover -func=/tmp/coverage.out

# Pre-PR checks: linting, tests, generation (requires long timeout, can take several minutes)
earthly -P +reviewable

# Fetch Crossplane's CRDs at the crossplane version go.mod pins into cluster/gomod/crds. Required for unit and
# integration tests (run it in a fresh worktree, and again after a crossplane dependency bump). +go-test runs it.
earthly +fetch-crossplane-crds-gomod

# Fetch Crossplane's cluster directory for an image tag into cluster/<tag>. Only e2e uses it, because it must
# match the Crossplane image e2e runs.
earthly +fetch-crossplane-cluster --CROSSPLANE_IMAGE_TAG=main

# Tidy go modules
earthly +generate

Earthly Output Notes:

  • By default, Earthly buffers stdout and stderr separately, which can cause interleaved output
  • Use 2>&1 to merge streams for chronological output: earthly +go-test 2>&1 | tee output.log

End-to-End Tests

E2E tests run against real kind clusters with Crossplane installed. They can take several minutes to complete.

# Full E2E matrix against multiple Crossplane versions (slow, runs serially)
earthly -P +e2e-matrix

# Single E2E test against specific Crossplane version
earthly +e2e --CROSSPLANE_IMAGE_TAG=main

# Overriding FLAGS replaces the default `-labels=crossplane-version=<tag>` filter, so pass it yourself when
# targeting release-1.20; otherwise main-only (v2) tests run against Crossplane v1 and fail
earthly -P +e2e --CROSSPLANE_IMAGE_TAG=release-1.20 --FLAGS="-labels=crossplane-version=release-1.20 -test.run ^TestDiffExistingClaim$"

# Run specific E2E test with verbose logging
earthly -P +e2e --FLAGS="-v=4 -test.run ^TestCompositionDiff"

# Debug E2E: stop on first failure and preserve kind cluster
earthly -i -P +e2e --FLAGS="-test.failfast -fail-fast -destroy-kind-cluster=false"

# Run E2E tests directly (without Earthly wrapper for easier debugging)
go test -c -o e2e ./test/e2e
./e2e -v=4 -test.v -test.failfast -destroy-kind-cluster=false -test.run ^TestSpecificTest

Read the full file on GitHub · 728 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. 18d ago Changed · +6 lines · +161 tokens per session 32576cbc5a12
  2. 19d ago Changed · +9 lines · +243 tokens per session 2438a314d420
  3. 21d ago Changed · +6 lines · +141 tokens per session cb4b31a638d1
  4. 23d ago Changed · +12 lines · +280 tokens per session 6e22252fd7a4
  5. 26d ago Changed · +45 lines · +928 tokens per session 885b5ef75928
  6. 27d ago Changed · +41 lines · +898 tokens per session 2739a6745261
  7. 1mo ago Changed · +7 lines · +141 tokens per session 3b12d7704636
  8. 1mo ago Changed · +8 lines · +201 tokens per session 34e695c44168
  9. 1mo ago Changed · +10 lines · +232 tokens per session c797bd319eb0
  10. 1mo ago First seen · 584 lines · 8,116 tokens per session scan A 69edb956bf47

Subscribe to this mod's changes

crossplane-diff CLAUDE.md is an instructions file published in the GitHub repository crossplane-contrib/crossplane-diff (44 stars, last pushed 2d ago), licensed Apache-2.0. It adds 11,341 tokens to every session, about $0.0454 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-08-30.

Related

crossplane-diff CLAUDE.md compared with instructions from other repositories

crossplane-diff CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
crossplane-diff CLAUDE.mdcrossplane-contrib/crossplane-diffInstructions file442d agoApache-2.0A11,341Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,649GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode ai-customization.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA1,907GitHub Copilot