cli: Instructions file for Claude Code

CLAUDE.md

cli CLAUDE.md is an instructions file for Claude Code from archgate/cli. It costs 2,612 tokens per session, scanned A, original, Apache-2.0.

A set of instructions for working on Archgate, a command-line tool that turns architecture decisions into documents and machine-checkable rules.

In plain words
What is it for?
It guides development and verification of the Bun and TypeScript CLI, including linting, type checks, tests, formatting, dead-code checks, and architecture-record checks.
Why use it?
It defines the project's technologies, commands, formatting, tests, build checks, and required validation so changes can be checked consistently.

Instructions file for Claude Code

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

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is git config --local include.path ../.githooks.

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/archgate/cli/claude-md"><img src="https://agentmods.dev/badge/instructions/archgate/cli/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,612 This file is loaded in full into every session.
When invoked 2,612 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.02612 $0.02612
Opus 5.5 $0.01045 $0.01045
Sonnet 5.5 $0.00522 $0.00522
Haiku 4.5 $0.00261 $0.00261

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

Security

Grade A, and why

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 6d 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 · 120 lines

How it starts

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

CLAUDE.md

Archgate is a CLI tool for AI governance via Architecture Decision Records (ADRs) — combining human-readable docs with machine-checkable rules. The CLI dogfoods itself via ADRs in .archgate/adrs/. AI features are delivered as a Claude Code plugin (../plugins/claude-code), not via direct API calls.

Technology Stack

  • Runtime: Bun — not Node.js compatible (minimum version enforced in src/cli.ts)
  • Language: TypeScript (strict mode, ESNext, ES modules)
  • CLI framework: Commander.js (@commander-js/extra-typings)
  • Linter: Oxlint | Formatter: Oxfmt | Dead exports: Knip | Commits: Conventional Commits

Commands

bun run src/cli.ts <command>  # run CLI locally
bun run lint                  # oxlint
bun run typecheck             # tsc --build
bun run format                # oxfmt --write
bun run format:check          # oxfmt --check
bun run test                  # all tests (not bare `bun test` — picks up --timeout; see GEN-003)
bun run knip                  # dead export detection
bun run validate              # MANDATORY: lint + typecheck + format:check + test + ADR check + knip + build check
bun run build:check            # verify build compiles (CI builds binaries via release workflow)
bun run commit                # conventional commit wizard

Validation Gate

bun run validate must pass before any task is considered complete. Fail-fast pipeline: lint → typecheck → format:check → test → ADR check → knip → build check. Mirrors CI in .github/workflows/code-pull-request.yml.

Git Hooks (Git 2.54+)

Config-based hooks in .githooks run validation locally before commits and pushes:

  • pre-commit: lint + typecheck + format:check (~15s)
  • pre-push: full bun run validate (~60s, mirrors CI)

Activate once per clone:

git config --local include.path ../.githooks

Opt out of a specific hook: git config --local hook.<name>.enabled false. Skip all hooks for a single commit: git commit --no-verify.

Read the full file on GitHub · 120 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. 6d ago Changed · +61 tokens per session 2f5505f33a48
  2. 1mo ago First seen · 120 lines · 2,551 tokens per session scan A 2304e95dea83

Subscribe to this mod's changes

cli CLAUDE.md is an instructions file published in the GitHub repository archgate/cli (73 stars, last pushed yesterday), licensed Apache-2.0. It adds 2,612 tokens to every session, about $0.0104 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

Other instructions, from other repositories