agentbrief CLAUDE.md

agentbrief CLAUDE.md is an instructions file for coding agents from 0xranx/agentbrief. It costs 4,305 tokens per session, scanned A, original, MIT.

Project instructions for AgentBrief, a command-line package manager that gives coding agents defined roles, knowledge, and skills. They describe its architecture and which files handle each responsibility.

In plain words
What is it for?
Working on AgentBrief's package loading, compilation, engine-file injection, knowledge and skill copying, version locking, and project documentation.
Why use it?
They help an agent understand the project before changing code and keep different parts of the tool from accumulating unrelated logic.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/0xranx/agentbrief/claude-md.svg)](https://agentmods.dev/instructions/0xranx/agentbrief/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/0xranx/agentbrief/claude-md"><img src="https://agentmods.dev/badge/instructions/0xranx/agentbrief/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,305 This file is loaded in full into every session.
When invoked 4,305 The same file — it is already loaded in full.
Security scan A 0 findings. 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.04305 $0.04305
Opus 5 $0.02152 $0.02152
Sonnet 5 $0.00861 $0.00861
Haiku 4.5 $0.00430 $0.00430

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

Security

Grade A, and why

agentbrief 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 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.

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

How it starts

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

AgentBrief — Project Conventions for Claude Code

完整的项目理念见 docs/VISION.md,设计决策见 docs/DESIGN.md。 如果你是新会话,请先读这两个文件再动手改代码。

Project Context(项目上下文概要)

AgentBrief 是一个 CLI 工具——给 AI Coding Agent 装"职业技能包"的包管理器。

  • 定位:用户在自己的工程目录下运行 agentbrief use <source>,该目录下的 Agent(Claude Code / Cursor / OpenCode / Codex)就自动变成一个具备特定人格、领域知识和技能的"数字员工"。
  • 类比:eslint-config-airbnb 之于代码规范 = AgentBrief 之于 Agent 行为规范。
  • 与 GolemBot 的关系:独立项目,互补关系。GolemBot 是 runtime(让 Agent 跑起来、接入 IM 渠道),AgentBrief 是 definition(定义 Agent 是谁)。两者不强绑定,AgentBrief 单独可用。
  • 分发模型:去中心化,GitHub 仓库即 brief 包,git tag 即版本。通过 0xranx/agentbrief-registry 索引仓库提供官方认证(official / verified / community 三级信任)。
  • 核心体验:一条命令生效、一条命令撤销、可叠加、非侵入、引擎无关。

Architecture

Core Flow

resolve(source)  →  load(brief.yaml)  →  compile(spec + personality)  →  inject(engine files)
                                                                       →  copy(knowledge, skills)
                                                                       →  update(lock.yaml)

File Responsibility Boundaries

File Responsibility Should Not Contain
types.ts All type definitions, engine file mappings Logic
brief.ts Load and validate brief.yaml, load personality.md Compilation, injection
compiler.ts Compile brief spec + personality → markdown string File I/O, injection
injector.ts Inject/eject markdown into engine instruction files Brief loading, compilation
resolver.ts Resolve source strings (local path, github:) to local dirs Brief loading, injection
lock.ts Read/write .agentbrief/lock.yaml, clean brief data dirs Injection, compilation
index.ts Public API (use, eject, list, init), orchestration Engine-specific logic
cli.ts Argument parsing, call public API, format output Business logic

Things You Must Never Do

  1. Don't put business logic in cli.ts — it only parses arguments and formats output.
  2. Don't mix concerns across modules — compiler doesn't do I/O, injector doesn't load briefs.
  3. Don't hardcode engine file paths outside types.tsENGINE_FILES in types.ts is the single source of truth.
  4. Don't break injection markers — the <!-- agentbrief:name:start/end --> format is the contract for non-destructive inject/eject. Changing the marker format is a breaking change.
  5. Don't引入新的核心抽象 — 项目只有两个核心概念:Brief(说明书)和 Engine Target(注入目标)。不要引入 Plugin、Registry、Pipeline 等新抽象。

Read the full file on GitHub · 270 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 · 270 lines · 4,305 tokens per session scan A 19deef645d5c

Subscribe to this mod's changes

agentbrief CLAUDE.md is an instructions file published in the GitHub repository 0xranx/agentbrief (45 stars, last pushed 5mo ago), licensed MIT. It adds 4,305 tokens to every session, about $0.0215 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-30.

Related

Other instructions, from other repositories