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.
npx agentmods add instructions/clerk/protect-cli/claude-mdgit clone --depth 1 https://github.com/clerk/protect-cliWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.03027 | $0.03027 |
| Opus 5 | $0.01514 | $0.01514 |
| Sonnet 5 | $0.00605 | $0.00605 |
| Haiku 4.5 | $0.00303 | $0.00303 |
Grade A, and why
protect-cli 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 435 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance for Claude Code when working with the Clerk CLI codebase.
Project Overview
The Clerk CLI is a command-line interface for managing Clerk authentication instances. It's written in Go and distributed via:
- Homebrew (source build via Formula, signed .pkg via Cask)
- NPM (binary wrapper that downloads pre-built Go binaries)
- GitHub Releases (direct binary downloads)
Tech Stack
- Language: Go 1.23+
- CLI Framework: Cobra
- Interactive UI: Huh (forms), Bubbles (TUI components)
- Module Path:
clerk.com/cli
Code Structure
cmd/clerk/
main.go # Entry point
internal/
api/ # HTTP client layer
client.go # Backend API client (sk_* keys)
platform_client.go # Platform API client (ak_* keys)
users.go # Users API
organizations.go # Organizations API
applications.go # Applications API (Platform)
transfers.go # Transfers API (Platform)
protect.go # Protect Rules & Schema API
billing.go # Billing API
... # Other resource APIs
cmd/ # Cobra command definitions
root.go # Root command, global flags, prefix matching
config.go # Config, profile, alias commands
users.go # Users commands
apps.go # Applications commands (Platform API)
transfers.go # Transfers commands (Platform API)
protect.go # Protect commands
... # Other command groups
config/ # Configuration management
config.go # INI-based profiles
aliases.go # Command aliases (JSON)
output/ # Output formatting
format.go # Table/JSON/YAML formatting
colors.go # Terminal colors
ai/ # AI integration for rule generation
ai.go # Provider abstraction
openai.go # OpenAI provider
anthropic.go # Anthropic provider
mcp.go # MCP client for external tools
scripts/
postinstall.js # NPM postinstall (downloads Go binary)
build-macos-pkg.sh # macOS signing and packaging
export-certs-for-github.sh # Certificate export helper
Formula/
clerk.rb # Homebrew Formula (builds from source)
Casks/
clerk.rb # Homebrew Cask (uses signed .pkg)
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.
- 2d ago First seen · 435 lines · 3,027 tokens per session scan A 224b3ae500b0
protect-cli CLAUDE.md is an instructions file published in the GitHub repository clerk/protect-cli (5 stars, last pushed 5mo ago), licensed MIT. It adds 3,027 tokens to every session, about $0.0151 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-31.
Other instructions, from other repositories
petdex AGENTS.md
AGENTS.md instructions for crafter-station/petdex, covering petdex agent notes, commands, architecture and invariants.
guardvibe CLAUDE.md
Instructions for goklab/guardvibe, covering project guidelines, guardvibe security scanner, when user asks for security scan/fix, never do these and quick reference.
petdex CLAUDE.md
Claude Code instructions for crafter-station/petdex, a project described as: A public gallery of animated pets for Codex, Claude Code, DeepSeek Harness, Hermes, OpenCode, Gemini CLI, and more.
mcp-server-clerk CLAUDE.md
Claude Code instructions for BalajiSriraman/mcp-server-clerk, covering claude.md — clerk mcp server, project overview, tech stack, project structure and key architectural concepts.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.