Sandbox
@0xranx/agentbrief

CLI for role briefs in Claude Code, Cursor, and Codex

AgentBrief takes a brief made of role, knowledge, and skills and injects it into the files your agent reads. It preserves your existing setup and wraps the added content in markers so you can update or remove it later.

45 stars0 forksHTMLUpdated 5mo ago
Who it's for

Builders who want Claude Code, Cursor, or Codex to follow reusable role instructions and specialist workflows.

What it delivers

You can turn a generic agent into a domain specialist with one command, then reuse that setup across projects.

What it does

Brief compilation

Compiles a brief into the instruction format each engine expects, including `CLAUDE.md`, `.cursorrules`, and `AGENTS.md`.

Role packs

Ships named briefs like `security-auditor`, `code-reviewer`, `fullstack-engineer`, and `startup-founder`.

Pack combos

Bundles multiple briefs into one command for common setups like build, ship, and grow.

Brief management

Lets you search, list, show, preview, update, and eject applied briefs from the CLI.

Custom brief authoring

Supports local brief folders with `brief.yaml`, `personality.md`, `knowledge/`, and `skills/`.

How to get it

  1. 1Run
    npm install -g agentbrief
    # or
    pnpm add -g agentbrief
  2. 2Not sure where to begin? Pick a combo — each one bundles multiple specialist briefs into…
    fullstack-engineer  →  release-engineer  →  startup-founder
           Build                 Ship                 Grow
  3. 3Run
    agentbrief use fullstack-engineer   # Build: write production code
    agentbrief use release-engineer     # Ship: test, secure, deploy, document
    agentbrief use startup-founder      # Grow: product, growth, launch strategy

README

AgentBrief

CI npm License: MIT

One command turns your AI coding agent into a domain specialist.

Website · Catalog · npm · 中文

Your Claude Code, Cursor, OpenCode, or Codex gives generic answers because it doesn't know your domain. AgentBrief fixes that — install a brief and your agent gains real expertise: security auditing, code review, product specs, growth hacking, and more.

npx agentbrief use fullstack-engineer
# Your agent now enforces strict TypeScript, follows Next.js conventions,
# builds accessible UIs, and reviews PRs like a staff engineer — 9 skills in 1 command

Before vs After

WITHOUT a brief:
  You: "Review this code for issues"
  Agent: "The code looks good overall. Consider adding error handling."

WITH security-auditor brief:
  You: "Review this code for issues"
  Agent: "CWE-89 CRITICAL at line 23: SQL injection via string concatenation.
         Attack vector: attacker injects arbitrary SQL through userId param.
         Fix: const query = 'SELECT * FROM users WHERE id = $1';
              await db.query(query, [userId]);"

Install

npm install -g agentbrief
# or
pnpm add -g agentbrief

Quick Start Packs

Not sure where to begin? Pick a combo — each one bundles multiple specialist briefs into a single command:

  fullstack-engineer  →  release-engineer  →  startup-founder
       Build                 Ship                 Grow
PackWhat your agent gains
fullstack-engineerStrict TypeScript + Next.js + accessible UI + PR reviews (9 skills)
release-engineerQA testing + security review + CI/CD + documentation (10 skills)
startup-founderProduct specs + SEO + growth analytics + security + launch (12 skills)
agentbrief use fullstack-engineer   # Build: write production code
agentbrief use release-engineer     # Ship: test, secure, deploy, document
agentbrief use startup-founder      # Grow: product, growth, launch strategy

All Briefs

Code Quality & Engineering:

BriefYour agent becomes...
security-auditorOWASP security reviewer who cites CWE numbers
code-reviewerStaff engineer who catches architecture + logic issues
qa-engineerQA who finds bugs, writes tests, fixes with atomic commits
typescript-engineerType safety enforcer — zero any, exhaustive checks
nextjs-developerNext.js 15 specialist (App Router, RSC, Tailwind)
design-engineerDesign engineer with 80-item review checklist
devops-sreSRE who sets up CI/CD, monitoring, incident response
tech-writerDocumentation specialist with API docs + release notes

Product, Growth & Business:

BriefYour agent becomes...
product-managerPM who writes PRDs with RICE/ICE prioritization
growth-engineerGrowth hacker with SEO audit + analytics + content strategy
data-analystBI analyst with metrics frameworks + SQL patterns
startup-advisorStartup advisor with CEO review + launch planning
social-media-managerSocial media manager — Twitter/X + Xiaohongshu + Douyin research
feishu-writerFeishu/Lark specialist — docs, wikis, messaging, tasks (official lark-cli)

Browse the full Catalog or the Website for details on each brief.

Usage

# Apply from the official registry
agentbrief use security-auditor

# Apply from GitHub
agentbrief use github:owner/repo
agentbrief use github:owner/repo@v1.0

# Apply from local path
agentbrief use ./path/to/brief

# Browse, inspect, manage
agentbrief search                 # List all briefs
agentbrief list                   # See what's applied
agentbrief show <name>            # View injected content
agentbrief preview <name>         # Preview without applying
agentbrief update                 # Fetch latest versions
agentbrief eject <name>           # Clean removal

How It Works

AgentBrief compiles a brief (role + knowledge + skills) into the instruction files your AI agent reads, with content optimized per engine:

EngineFileCompilation
Claude CodeCLAUDE.mdFull — personality, knowledge refs, skill triggers
Cursor.cursorrulesMinimal — headings + first paragraph + lists
OpenCodeAGENTS.mdConcise — first sentence per paragraph
CodexAGENTS.mdConcise — same as OpenCode

Your existing files are preserved — briefs are injected between <!-- agentbrief:name:start/end --> markers. Eject removes only the brief content.

See what gets injected — example output for fullstack-engineer
<!-- agentbrief:fullstack-engineer:start -->
# AgentBrief: fullstack-engineer

## Role
You are a senior full-stack TypeScript developer. You build production
applications with Next.js 15, React 19, and Tailwind CSS. You enforce
strict type safety and review your own code with principal-engineer rigor.

## Constraints
- Never use `any` — always annotate return types on exports
- Server Components by default — only add 'use client' when needed
- WCAG 2.1 AA minimum — semantic HTML, keyboard navigation

## Skills
- **next-best-practices** — USE WHEN: Writing Next.js code
- **typescript-advanced-types** — USE WHEN: Complex type logic
- **architecture-review** — USE WHEN: Reviewing PRs
- **design-review-checklist** — USE WHEN: Checking UI quality
- **agent-browser** — USE WHEN: Visual verification needed
  ...and 4 more
<!-- agentbrief:fullstack-engineer:end -->

What's a Brief?

my-brief/
├── brief.yaml          # Config: name, version, extends, skills
├── personality.md      # Identity: role, tone, constraints
├── knowledge/          # Reference: domain materials (read on demand)
│   └── cheatsheet.md
└── skills/             # Workflows: executable skill directories
    └── my-skill/
        ├── SKILL.md    # Trigger condition + step-by-step process
        └── ...         # Any supporting files

See briefs/security-auditor/ for a complete example.

Built on Trusted Sources

Every official brief is curated from battle-tested, community-endorsed skills:

Create Your Own

agentbrief init my-agent              # Scaffold
# Edit personality.md, add knowledge/ and skills/
agentbrief use ./my-agent             # Test locally
agentbrief preview ./my-agent         # See compiled output
# Push to GitHub → agentbrief use github:you/my-agent

Want it in the official registry? Submit a PR. Read the Authoring Guide.

Community

Add .agentbrief/ to your .gitignore. Commit the engine files (CLAUDE.md, .cursorrules, AGENTS.md) so your team shares the same agent behavior.

License

MIT

Files in the repo

Repository payload21 top-level entries
  • .github
  • briefs
  • docs
  • examples
  • site
  • src
  • templates
  • .gitignore
  • biome.json
  • CATALOG.md
  • CHANGELOG.md
  • CLAUDE.md
  • CONTRIBUTING.md
  • LICENSE
  • package.json
  • pnpm-lock.yaml
  • README.md
  • README.zh-CN.md
  • registry.yaml
  • tsconfig.json
  • vitest.config.ts

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k