agentbrief 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +130 -119
- package/README.zh-CN.md +201 -0
- package/briefs/base-agent/brief.yaml +6 -0
- package/briefs/base-agent/personality.md +9 -0
- package/briefs/base-agent/skills/agent-browser/SKILL.md +682 -0
- package/briefs/code-reviewer/brief.yaml +2 -0
- package/briefs/data-analyst/brief.yaml +2 -0
- package/briefs/{frontend-design → design-engineer}/brief.yaml +3 -1
- package/briefs/devops-sre/brief.yaml +2 -0
- package/briefs/fullstack-engineer/brief.yaml +10 -0
- package/briefs/growth-engineer/brief.yaml +2 -0
- package/briefs/{nextjs-fullstack → nextjs-developer}/brief.yaml +3 -1
- package/briefs/product-manager/brief.yaml +2 -0
- package/briefs/qa-engineer/brief.yaml +2 -0
- package/briefs/release-engineer/brief.yaml +10 -0
- package/briefs/release-engineer/personality.md +17 -0
- package/briefs/security-auditor/brief.yaml +2 -0
- package/briefs/social-media-manager/brief.yaml +12 -0
- package/briefs/social-media-manager/knowledge/social-media-playbook.md +55 -0
- package/briefs/social-media-manager/personality.md +17 -0
- package/briefs/social-media-manager/skills/twitter-workflow/SKILL.md +91 -0
- package/briefs/{startup-builder → startup-advisor}/brief.yaml +3 -1
- package/briefs/startup-founder/brief.yaml +10 -0
- package/briefs/tech-writer/brief.yaml +2 -0
- package/briefs/{typescript-strict → typescript-engineer}/brief.yaml +3 -1
- package/dist/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/registry.yaml +35 -18
- package/briefs/fullstack-dev/brief.yaml +0 -9
- package/briefs/startup-kit/brief.yaml +0 -9
- /package/briefs/{frontend-design → design-engineer}/knowledge/design-principles.md +0 -0
- /package/briefs/{frontend-design → design-engineer}/personality.md +0 -0
- /package/briefs/{frontend-design → design-engineer}/skills/design-review-checklist/SKILL.md +0 -0
- /package/briefs/{frontend-design → design-engineer}/skills/web-design-guidelines/SKILL.md +0 -0
- /package/briefs/{fullstack-dev → fullstack-engineer}/personality.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/knowledge/conventions.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/personality.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/SKILL.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/async-patterns.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/bundling.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/data-patterns.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/debug-tricks.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/directives.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/error-handling.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/file-conventions.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/font.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/functions.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/hydration-error.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/image.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/metadata.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/parallel-routes.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/route-handlers.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/rsc-boundaries.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/runtime-selection.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/scripts.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/self-hosting.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/next-best-practices/suspense-boundaries.md +0 -0
- /package/briefs/{nextjs-fullstack → nextjs-developer}/skills/tdd/SKILL.md +0 -0
- /package/briefs/{startup-builder → startup-advisor}/knowledge/startup-phases.md +0 -0
- /package/briefs/{startup-builder → startup-advisor}/personality.md +0 -0
- /package/briefs/{startup-builder → startup-advisor}/skills/ceo-review/SKILL.md +0 -0
- /package/briefs/{startup-builder → startup-advisor}/skills/launch-strategy/SKILL.md +0 -0
- /package/briefs/{startup-builder → startup-advisor}/skills/launch-strategy/evals/evals.json +0 -0
- /package/briefs/{startup-builder → startup-advisor}/skills/tdd/SKILL.md +0 -0
- /package/briefs/{startup-builder → startup-advisor}/skills/verification/SKILL.md +0 -0
- /package/briefs/{startup-kit → startup-founder}/personality.md +0 -0
- /package/briefs/{typescript-strict → typescript-engineer}/knowledge/type-patterns.md +0 -0
- /package/briefs/{typescript-strict → typescript-engineer}/personality.md +0 -0
- /package/briefs/{typescript-strict → typescript-engineer}/skills/typescript-advanced-types/SKILL.md +0 -0
package/README.md
CHANGED
|
@@ -4,79 +4,94 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/agentbrief)
|
|
5
5
|
[](./LICENSE)
|
|
6
6
|
|
|
7
|
-
>
|
|
7
|
+
> One command turns your AI coding agent into a domain specialist.
|
|
8
8
|
>
|
|
9
|
-
> [Website](https://0xranx.github.io/agentbrief) · [Catalog](./CATALOG.md) · [npm](https://www.npmjs.com/package/agentbrief)
|
|
9
|
+
> [Website](https://0xranx.github.io/agentbrief) · [Catalog](./CATALOG.md) · [npm](https://www.npmjs.com/package/agentbrief) · [中文](./README.zh-CN.md)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
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.
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npx agentbrief use
|
|
15
|
-
# Your
|
|
14
|
+
npx agentbrief use fullstack-engineer
|
|
15
|
+
# Your agent now enforces strict TypeScript, follows Next.js conventions,
|
|
16
|
+
# builds accessible UIs, and reviews PRs like a staff engineer — 9 skills in 1 command
|
|
16
17
|
```
|
|
17
18
|
|
|
18
|
-
##
|
|
19
|
+
## Before vs After
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
```
|
|
22
|
+
WITHOUT a brief:
|
|
23
|
+
You: "Review this code for issues"
|
|
24
|
+
Agent: "The code looks good overall. Consider adding error handling."
|
|
25
|
+
|
|
26
|
+
WITH security-auditor brief:
|
|
27
|
+
You: "Review this code for issues"
|
|
28
|
+
Agent: "CWE-89 CRITICAL at line 23: SQL injection via string concatenation.
|
|
29
|
+
Attack vector: attacker injects arbitrary SQL through userId param.
|
|
30
|
+
Fix: const query = 'SELECT * FROM users WHERE id = $1';
|
|
31
|
+
await db.query(query, [userId]);"
|
|
32
|
+
```
|
|
21
33
|
|
|
22
|
-
|
|
23
|
-
<summary><b>See it in action</b> — before vs after applying <code>security-auditor</code></summary>
|
|
34
|
+
## Install
|
|
24
35
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
#
|
|
36
|
+
```bash
|
|
37
|
+
npm install -g agentbrief
|
|
38
|
+
# or
|
|
39
|
+
pnpm add -g agentbrief
|
|
28
40
|
```
|
|
29
41
|
|
|
30
|
-
|
|
31
|
-
```markdown
|
|
32
|
-
# My Project
|
|
42
|
+
## Quick Start Packs
|
|
33
43
|
|
|
34
|
-
|
|
35
|
-
# AgentBrief: security-auditor
|
|
36
|
-
> OWASP/CWE security review specialist
|
|
44
|
+
Not sure where to begin? Pick a combo — each one bundles multiple specialist briefs into a single command:
|
|
37
45
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
## Constraints
|
|
44
|
-
- Never approve code containing known injection vectors
|
|
45
|
-
- Flag all hardcoded credentials as Critical severity
|
|
46
|
-
- Every finding must reference a CWE identifier
|
|
46
|
+
```
|
|
47
|
+
fullstack-engineer → release-engineer → startup-founder
|
|
48
|
+
Build Ship Grow
|
|
49
|
+
```
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
| Pack | What your agent gains |
|
|
52
|
+
|------|----------------------|
|
|
53
|
+
| `fullstack-engineer` | Strict TypeScript + Next.js + accessible UI + PR reviews (9 skills) |
|
|
54
|
+
| `release-engineer` | QA testing + security review + CI/CD + documentation (10 skills) |
|
|
55
|
+
| `startup-founder` | Product specs + SEO + growth analytics + security + launch (12 skills) |
|
|
50
56
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
57
|
+
```bash
|
|
58
|
+
agentbrief use fullstack-engineer # Build: write production code
|
|
59
|
+
agentbrief use release-engineer # Ship: test, secure, deploy, document
|
|
60
|
+
agentbrief use startup-founder # Grow: product, growth, launch strategy
|
|
55
61
|
```
|
|
56
62
|
|
|
57
|
-
|
|
58
|
-
</details>
|
|
63
|
+
## All Briefs
|
|
59
64
|
|
|
60
|
-
|
|
61
|
-
- **Non-invasive** — injected content is wrapped in markers, your existing files are untouched
|
|
62
|
-
- **Stackable** — apply multiple briefs; later ones layer on top
|
|
63
|
-
- **Engine-agnostic** — compiles to all engines simultaneously, optimized for each
|
|
65
|
+
**Code Quality & Engineering:**
|
|
64
66
|
|
|
65
|
-
|
|
67
|
+
| Brief | Your agent becomes... |
|
|
68
|
+
|-------|----------------------|
|
|
69
|
+
| `security-auditor` | OWASP security reviewer who cites CWE numbers |
|
|
70
|
+
| `code-reviewer` | Staff engineer who catches architecture + logic issues |
|
|
71
|
+
| `qa-engineer` | QA who finds bugs, writes tests, fixes with atomic commits |
|
|
72
|
+
| `typescript-engineer` | Type safety enforcer — zero `any`, exhaustive checks |
|
|
73
|
+
| `nextjs-developer` | Next.js 15 specialist (App Router, RSC, Tailwind) |
|
|
74
|
+
| `design-engineer` | Design engineer with 80-item review checklist |
|
|
75
|
+
| `devops-sre` | SRE who sets up CI/CD, monitoring, incident response |
|
|
76
|
+
| `tech-writer` | Documentation specialist with API docs + release notes |
|
|
66
77
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
78
|
+
**Product, Growth & Business:**
|
|
79
|
+
|
|
80
|
+
| Brief | Your agent becomes... |
|
|
81
|
+
|-------|----------------------|
|
|
82
|
+
| `product-manager` | PM who writes PRDs with RICE/ICE prioritization |
|
|
83
|
+
| `growth-engineer` | Growth hacker with SEO audit + analytics + content strategy |
|
|
84
|
+
| `data-analyst` | BI analyst with metrics frameworks + SQL patterns |
|
|
85
|
+
| `startup-advisor` | Startup advisor with CEO review + launch planning |
|
|
86
|
+
| `social-media-manager` | Social media manager — Twitter/X + Xiaohongshu posting |
|
|
87
|
+
|
|
88
|
+
Browse the **[full Catalog](./CATALOG.md)** or the **[Website](https://0xranx.github.io/agentbrief)** for details on each brief.
|
|
72
89
|
|
|
73
90
|
## Usage
|
|
74
91
|
|
|
75
92
|
```bash
|
|
76
|
-
# Apply from the official registry
|
|
93
|
+
# Apply from the official registry
|
|
77
94
|
agentbrief use security-auditor
|
|
78
|
-
agentbrief use nextjs-fullstack
|
|
79
|
-
agentbrief use typescript-strict
|
|
80
95
|
|
|
81
96
|
# Apply from GitHub
|
|
82
97
|
agentbrief use github:owner/repo
|
|
@@ -85,105 +100,101 @@ agentbrief use github:owner/repo@v1.0
|
|
|
85
100
|
# Apply from local path
|
|
86
101
|
agentbrief use ./path/to/brief
|
|
87
102
|
|
|
88
|
-
# Browse
|
|
89
|
-
agentbrief search
|
|
90
|
-
agentbrief
|
|
103
|
+
# Browse, inspect, manage
|
|
104
|
+
agentbrief search # List all briefs
|
|
105
|
+
agentbrief list # See what's applied
|
|
106
|
+
agentbrief show <name> # View injected content
|
|
107
|
+
agentbrief preview <name> # Preview without applying
|
|
108
|
+
agentbrief update # Fetch latest versions
|
|
109
|
+
agentbrief eject <name> # Clean removal
|
|
110
|
+
```
|
|
91
111
|
|
|
92
|
-
|
|
93
|
-
agentbrief list
|
|
94
|
-
agentbrief show <name>
|
|
95
|
-
agentbrief update
|
|
96
|
-
agentbrief eject <name>
|
|
112
|
+
## How It Works
|
|
97
113
|
|
|
98
|
-
|
|
99
|
-
agentbrief init my-agent
|
|
100
|
-
agentbrief init my-agent --template security
|
|
101
|
-
```
|
|
114
|
+
AgentBrief compiles a **brief** (role + knowledge + skills) into the instruction files your AI agent reads, with content optimized per engine:
|
|
102
115
|
|
|
103
|
-
|
|
116
|
+
| Engine | File | Compilation |
|
|
117
|
+
|--------|------|------------|
|
|
118
|
+
| Claude Code | `CLAUDE.md` | Full — personality, knowledge refs, skill triggers |
|
|
119
|
+
| Cursor | `.cursorrules` | Minimal — headings + first paragraph + lists |
|
|
120
|
+
| OpenCode | `AGENTS.md` | Concise — first sentence per paragraph |
|
|
121
|
+
| Codex | `AGENTS.md` | Concise — same as OpenCode |
|
|
104
122
|
|
|
105
|
-
|
|
106
|
-
agentbrief search
|
|
107
|
-
```
|
|
123
|
+
Your existing files are preserved — briefs are injected between `<!-- agentbrief:name:start/end -->` markers. Eject removes only the brief content.
|
|
108
124
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
NAME TRUST DESCRIPTION
|
|
113
|
-
security-auditor official OWASP/CWE security review specialist
|
|
114
|
-
code-reviewer official Rigorous PR review — naming, tests, architecture
|
|
115
|
-
typescript-strict official TypeScript type safety guardian — zero any
|
|
116
|
-
nextjs-fullstack official Next.js 15 + App Router + React 19 + Tailwind
|
|
117
|
-
frontend-design official React + Tailwind + shadcn/ui design engineering
|
|
118
|
-
devops-sre official Infrastructure monitoring, incident response, IaC
|
|
119
|
-
tech-writer official Technical documentation with style guide adherence
|
|
120
|
-
growth-engineer official CRO, SEO, analytics, growth engineering
|
|
121
|
-
product-manager official PRD generation, user stories, prioritization
|
|
122
|
-
startup-builder official Idea validation → MVP → launch workflow
|
|
123
|
-
qa-engineer official Automated QA — find bugs, write tests, fix with atomic commits
|
|
124
|
-
data-analyst official Business intelligence — metrics, SQL, dashboards, data storytelling
|
|
125
|
-
fullstack-dev official Full-stack TypeScript developer — extends 4 briefs, 8 skills
|
|
126
|
-
startup-kit official Startup builder kit — extends 4 briefs, 9 skills
|
|
127
|
-
```
|
|
125
|
+
<details>
|
|
126
|
+
<summary><b>See what gets injected</b> — example output for <code>fullstack-engineer</code></summary>
|
|
128
127
|
|
|
129
|
-
|
|
128
|
+
```markdown
|
|
129
|
+
<!-- agentbrief:fullstack-engineer:start -->
|
|
130
|
+
# AgentBrief: fullstack-engineer
|
|
130
131
|
|
|
131
|
-
|
|
132
|
+
## Role
|
|
133
|
+
You are a senior full-stack TypeScript developer. You build production
|
|
134
|
+
applications with Next.js 15, React 19, and Tailwind CSS. You enforce
|
|
135
|
+
strict type safety and review your own code with principal-engineer rigor.
|
|
132
136
|
|
|
133
|
-
##
|
|
137
|
+
## Constraints
|
|
138
|
+
- Never use `any` — always annotate return types on exports
|
|
139
|
+
- Server Components by default — only add 'use client' when needed
|
|
140
|
+
- WCAG 2.1 AA minimum — semantic HTML, keyboard navigation
|
|
141
|
+
|
|
142
|
+
## Skills
|
|
143
|
+
- **next-best-practices** — USE WHEN: Writing Next.js code
|
|
144
|
+
- **typescript-advanced-types** — USE WHEN: Complex type logic
|
|
145
|
+
- **architecture-review** — USE WHEN: Reviewing PRs
|
|
146
|
+
- **design-review-checklist** — USE WHEN: Checking UI quality
|
|
147
|
+
- **agent-browser** — USE WHEN: Visual verification needed
|
|
148
|
+
...and 4 more
|
|
149
|
+
<!-- agentbrief:fullstack-engineer:end -->
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
</details>
|
|
134
153
|
|
|
135
|
-
|
|
154
|
+
## What's a Brief?
|
|
136
155
|
|
|
137
156
|
```
|
|
138
157
|
my-brief/
|
|
139
|
-
├── brief.yaml # Config: name, version, skills
|
|
158
|
+
├── brief.yaml # Config: name, version, extends, skills
|
|
140
159
|
├── personality.md # Identity: role, tone, constraints
|
|
141
160
|
├── knowledge/ # Reference: domain materials (read on demand)
|
|
142
161
|
│ └── cheatsheet.md
|
|
143
162
|
└── skills/ # Workflows: executable skill directories
|
|
144
|
-
└── my-skill/
|
|
145
|
-
├── SKILL.md #
|
|
146
|
-
└── ... #
|
|
163
|
+
└── my-skill/
|
|
164
|
+
├── SKILL.md # Trigger condition + step-by-step process
|
|
165
|
+
└── ... # Any supporting files
|
|
147
166
|
```
|
|
148
167
|
|
|
149
|
-
See `
|
|
150
|
-
|
|
151
|
-
## Create & Publish Your Own
|
|
152
|
-
|
|
153
|
-
Share your expertise as a reusable brief:
|
|
154
|
-
|
|
155
|
-
1. **Scaffold** — `agentbrief init my-agent` (or `--template security`)
|
|
156
|
-
2. **Customize** — Edit `personality.md`, add `knowledge/` and `skills/`
|
|
157
|
-
3. **Test** — `agentbrief use ./my-agent` in a temp directory
|
|
158
|
-
4. **Preview** — `agentbrief preview ./my-agent` to see compiled output
|
|
159
|
-
5. **Publish** — Push to GitHub → `agentbrief use github:you/my-agent`
|
|
168
|
+
See [`briefs/security-auditor/`](./briefs/security-auditor/) for a complete example.
|
|
160
169
|
|
|
161
|
-
|
|
170
|
+
## Built on Trusted Sources
|
|
162
171
|
|
|
163
|
-
|
|
172
|
+
Every official brief is curated from battle-tested, community-endorsed skills:
|
|
164
173
|
|
|
165
|
-
|
|
174
|
+
- [obra/superpowers](https://github.com/obra/superpowers) **(90.6k ★)** — TDD, systematic debugging, verification
|
|
175
|
+
- [anthropics/skills](https://github.com/anthropics/skills) **(95.8k ★)** — Anthropic's official skill packages
|
|
176
|
+
- [garrytan/gstack](https://github.com/garrytan/gstack) **(YC CEO)** — CEO review, design review, QA
|
|
177
|
+
- [vercel-labs](https://github.com/vercel-labs/agent-browser) **(Vercel official)** — Next.js best practices, browser automation
|
|
178
|
+
- [coreyhaines31/marketingskills](https://github.com/coreyhaines31/marketingskills) — SEO audit, launch strategy, analytics
|
|
166
179
|
|
|
167
|
-
|
|
168
|
-
|--------|------|------------|
|
|
169
|
-
| Claude Code | `CLAUDE.md` | Full — all sections, verbose knowledge refs |
|
|
170
|
-
| Cursor | `.cursorrules` | Minimal — headings + first paragraph + lists, no knowledge/scale |
|
|
171
|
-
| OpenCode | `AGENTS.md` | Concise — first sentence per paragraph, compact refs |
|
|
172
|
-
| Codex | `AGENTS.md` | Concise — same as OpenCode |
|
|
173
|
-
|
|
174
|
-
## .gitignore
|
|
180
|
+
## Create Your Own
|
|
175
181
|
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
.
|
|
182
|
+
```bash
|
|
183
|
+
agentbrief init my-agent # Scaffold
|
|
184
|
+
# Edit personality.md, add knowledge/ and skills/
|
|
185
|
+
agentbrief use ./my-agent # Test locally
|
|
186
|
+
agentbrief preview ./my-agent # See compiled output
|
|
187
|
+
# Push to GitHub → agentbrief use github:you/my-agent
|
|
179
188
|
```
|
|
180
189
|
|
|
181
|
-
|
|
190
|
+
Want it in the official registry? [Submit a PR](./CONTRIBUTING.md). Read the **[Authoring Guide](https://0xranx.github.io/agentbrief/docs.html#AUTHORING)**.
|
|
182
191
|
|
|
183
192
|
## Community
|
|
184
193
|
|
|
185
|
-
- [GitHub Discussions](https://github.com/0xranx/agentbrief/discussions) — Questions, showcase
|
|
186
|
-
- [Contributing Guide](./CONTRIBUTING.md) —
|
|
194
|
+
- [GitHub Discussions](https://github.com/0xranx/agentbrief/discussions) — Questions, showcase, feature ideas
|
|
195
|
+
- [Contributing Guide](./CONTRIBUTING.md) — Submit briefs to the registry
|
|
196
|
+
|
|
197
|
+
Add `.agentbrief/` to your `.gitignore`. Commit the engine files (`CLAUDE.md`, `.cursorrules`, `AGENTS.md`) so your team shares the same agent behavior.
|
|
187
198
|
|
|
188
199
|
## License
|
|
189
200
|
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# AgentBrief
|
|
2
|
+
|
|
3
|
+
[](https://github.com/0xranx/agentbrief/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/agentbrief)
|
|
5
|
+
[](./LICENSE)
|
|
6
|
+
|
|
7
|
+
> 一条命令,让你的 AI 编程 Agent 变成领域专家。
|
|
8
|
+
>
|
|
9
|
+
> [官网](https://0xranx.github.io/agentbrief/index.zh.html) · [目录](./CATALOG.md) · [npm](https://www.npmjs.com/package/agentbrief) · [English](./README.md)
|
|
10
|
+
|
|
11
|
+
你的 Claude Code、Cursor、OpenCode 或 Codex 回答总是泛泛而谈?因为它不了解你的业务领域。AgentBrief 解决这个问题——安装一个**职能包(brief)**,你的 Agent 就拥有了真正的专业能力:安全审查、代码审查、产品规划、增长运营,等等。
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx agentbrief use fullstack-engineer
|
|
15
|
+
# 你的 Agent 现在会执行严格 TypeScript、遵循 Next.js 规范、
|
|
16
|
+
# 构建无障碍 UI、像 Staff 工程师一样审查 PR —— 一条命令获得 9 项技能
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 效果对比
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
没有职能包:
|
|
23
|
+
你:"帮我审查一下这段代码"
|
|
24
|
+
Agent:"代码整体看起来不错。建议加一些错误处理。"
|
|
25
|
+
|
|
26
|
+
使用 security-auditor 职能包:
|
|
27
|
+
你:"帮我审查一下这段代码"
|
|
28
|
+
Agent:"CWE-89 严重 第23行:通过字符串拼接导致 SQL 注入。
|
|
29
|
+
攻击向量:攻击者通过 userId 参数注入任意 SQL。
|
|
30
|
+
修复:const query = 'SELECT * FROM users WHERE id = $1';
|
|
31
|
+
await db.query(query, [userId]);"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 安装
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npm install -g agentbrief
|
|
38
|
+
# 或
|
|
39
|
+
pnpm add -g agentbrief
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 快速上手套装
|
|
43
|
+
|
|
44
|
+
不知道从哪开始?选一个组合包——每个都将多个专业职能包打包成一条命令:
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
fullstack-engineer → release-engineer → startup-founder
|
|
48
|
+
构建(Build) 交付(Ship) 增长(Grow)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
| 套装 | 你的 Agent 获得… |
|
|
52
|
+
|------|------------------|
|
|
53
|
+
| `fullstack-engineer` | 严格类型 + Next.js 规范 + 无障碍 UI + PR 审查(9 项技能) |
|
|
54
|
+
| `release-engineer` | 自动测试 + 安全审查 + CI/CD + 发布文档(10 项技能) |
|
|
55
|
+
| `startup-founder` | 产品规划 + SEO 审计 + 增长分析 + 安全 + 发布策略(12 项技能) |
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
agentbrief use fullstack-engineer # 构建:写生产级代码
|
|
59
|
+
agentbrief use release-engineer # 交付:测试、安全、部署、文档
|
|
60
|
+
agentbrief use startup-founder # 增长:产品、运营、发布策略
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 全部职能包
|
|
64
|
+
|
|
65
|
+
**代码质量与工程:**
|
|
66
|
+
|
|
67
|
+
| 职能包 | 你的 Agent 变成… |
|
|
68
|
+
|--------|------------------|
|
|
69
|
+
| `security-auditor` | OWASP 安全审查员,引用 CWE 编号 |
|
|
70
|
+
| `code-reviewer` | Staff 级工程师,捕获架构 + 逻辑问题 |
|
|
71
|
+
| `qa-engineer` | QA 工程师,发现 Bug、编写测试、原子提交修复 |
|
|
72
|
+
| `typescript-engineer` | 类型安全守卫——零 `any`、穷举检查 |
|
|
73
|
+
| `nextjs-developer` | Next.js 15 专家(App Router、RSC、Tailwind) |
|
|
74
|
+
| `design-engineer` | 设计工程师,附带 80 项审查清单 |
|
|
75
|
+
| `devops-sre` | SRE 工程师,搭建 CI/CD、监控、故障响应 |
|
|
76
|
+
| `tech-writer` | 文档专家,API 文档 + 发布说明 |
|
|
77
|
+
|
|
78
|
+
**产品、增长与商业:**
|
|
79
|
+
|
|
80
|
+
| 职能包 | 你的 Agent 变成… |
|
|
81
|
+
|--------|------------------|
|
|
82
|
+
| `product-manager` | 产品经理,PRD + RICE/ICE 优先级排序 |
|
|
83
|
+
| `growth-engineer` | 增长工程师,SEO 审计 + 数据分析 + 内容策略 |
|
|
84
|
+
| `data-analyst` | 数据分析师,指标体系 + SQL + 数据叙事 |
|
|
85
|
+
| `startup-advisor` | 创业顾问,CEO 审查 + 发布规划 |
|
|
86
|
+
| `social-media-manager` | 社媒运营,Twitter/X + 小红书发布 |
|
|
87
|
+
|
|
88
|
+
查看 **[完整目录](./CATALOG.md)** 或 **[官网](https://0xranx.github.io/agentbrief/index.zh.html)** 了解每个职能包的详情。
|
|
89
|
+
|
|
90
|
+
## 使用方法
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# 从官方 registry 安装
|
|
94
|
+
agentbrief use security-auditor
|
|
95
|
+
|
|
96
|
+
# 从 GitHub 安装
|
|
97
|
+
agentbrief use github:owner/repo
|
|
98
|
+
agentbrief use github:owner/repo@v1.0
|
|
99
|
+
|
|
100
|
+
# 从本地目录安装
|
|
101
|
+
agentbrief use ./path/to/brief
|
|
102
|
+
|
|
103
|
+
# 浏览、查看、管理
|
|
104
|
+
agentbrief search # 列出所有职能包
|
|
105
|
+
agentbrief list # 查看已安装的
|
|
106
|
+
agentbrief show <name> # 查看注入内容
|
|
107
|
+
agentbrief preview <name> # 预览(不安装)
|
|
108
|
+
agentbrief update # 更新到最新版
|
|
109
|
+
agentbrief eject <name> # 干净卸载
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## 工作原理
|
|
113
|
+
|
|
114
|
+
AgentBrief 将**职能包**(角色 + 知识 + 技能)编译成 AI Agent 读取的指令文件,并根据引擎智能优化输出:
|
|
115
|
+
|
|
116
|
+
| 引擎 | 文件 | 编译方式 |
|
|
117
|
+
|------|------|---------|
|
|
118
|
+
| Claude Code | `CLAUDE.md` | 完整——人格、知识引用、技能触发条件 |
|
|
119
|
+
| Cursor | `.cursorrules` | 精简——标题 + 首段 + 列表 |
|
|
120
|
+
| OpenCode | `AGENTS.md` | 简洁——每段首句 |
|
|
121
|
+
| Codex | `AGENTS.md` | 简洁——同 OpenCode |
|
|
122
|
+
|
|
123
|
+
你的现有文件不会被覆盖——职能包通过 `<!-- agentbrief:name:start/end -->` 标记注入。卸载只移除职能包内容。
|
|
124
|
+
|
|
125
|
+
<details>
|
|
126
|
+
<summary><b>查看注入内容示例</b>——<code>fullstack-engineer</code> 的输出</summary>
|
|
127
|
+
|
|
128
|
+
```markdown
|
|
129
|
+
<!-- agentbrief:fullstack-engineer:start -->
|
|
130
|
+
# AgentBrief: fullstack-engineer
|
|
131
|
+
|
|
132
|
+
## Role
|
|
133
|
+
You are a senior full-stack TypeScript developer. You build production
|
|
134
|
+
applications with Next.js 15, React 19, and Tailwind CSS. You enforce
|
|
135
|
+
strict type safety and review your own code with principal-engineer rigor.
|
|
136
|
+
|
|
137
|
+
## Constraints
|
|
138
|
+
- Never use `any` — always annotate return types on exports
|
|
139
|
+
- Server Components by default — only add 'use client' when needed
|
|
140
|
+
- WCAG 2.1 AA minimum — semantic HTML, keyboard navigation
|
|
141
|
+
|
|
142
|
+
## Skills
|
|
143
|
+
- **next-best-practices** — USE WHEN: Writing Next.js code
|
|
144
|
+
- **typescript-advanced-types** — USE WHEN: Complex type logic
|
|
145
|
+
- **architecture-review** — USE WHEN: Reviewing PRs
|
|
146
|
+
- **design-review-checklist** — USE WHEN: Checking UI quality
|
|
147
|
+
- **agent-browser** — USE WHEN: Visual verification needed
|
|
148
|
+
...and 4 more
|
|
149
|
+
<!-- agentbrief:fullstack-engineer:end -->
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
</details>
|
|
153
|
+
|
|
154
|
+
## 什么是 Brief(职能包)?
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
my-brief/
|
|
158
|
+
├── brief.yaml # 配置:名称、版本、继承、技能
|
|
159
|
+
├── personality.md # 身份:角色、语气、约束
|
|
160
|
+
├── knowledge/ # 知识:领域参考材料(按需读取)
|
|
161
|
+
│ └── cheatsheet.md
|
|
162
|
+
└── skills/ # 技能:可执行的工作流目录
|
|
163
|
+
└── my-skill/
|
|
164
|
+
├── SKILL.md # 触发条件 + 分步流程
|
|
165
|
+
└── ... # 其他支持文件
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
查看 [`briefs/security-auditor/`](./briefs/security-auditor/) 获取完整示例。
|
|
169
|
+
|
|
170
|
+
## 可信来源
|
|
171
|
+
|
|
172
|
+
每个官方职能包都源自经过实战检验、社区认可的技能:
|
|
173
|
+
|
|
174
|
+
- [obra/superpowers](https://github.com/obra/superpowers) **(90.6k ★)** — TDD、系统化调试、验证
|
|
175
|
+
- [anthropics/skills](https://github.com/anthropics/skills) **(95.8k ★)** — Anthropic 官方技能包
|
|
176
|
+
- [garrytan/gstack](https://github.com/garrytan/gstack) **(YC CEO)** — CEO 审查、设计审查、QA
|
|
177
|
+
- [vercel-labs](https://github.com/vercel-labs/agent-browser) **(Vercel 官方)** — Next.js 最佳实践、浏览器自动化
|
|
178
|
+
- [coreyhaines31/marketingskills](https://github.com/coreyhaines31/marketingskills) — SEO 审计、发布策略、数据分析
|
|
179
|
+
|
|
180
|
+
## 创建你自己的
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
agentbrief init my-agent # 脚手架
|
|
184
|
+
# 编辑 personality.md,添加 knowledge/ 和 skills/
|
|
185
|
+
agentbrief use ./my-agent # 本地测试
|
|
186
|
+
agentbrief preview ./my-agent # 查看编译输出
|
|
187
|
+
# 推送到 GitHub → agentbrief use github:you/my-agent
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
想收录到官方 registry?[提交 PR](./CONTRIBUTING.md)。阅读 **[创作指南](https://0xranx.github.io/agentbrief/docs.html#AUTHORING)**。
|
|
191
|
+
|
|
192
|
+
## 社区
|
|
193
|
+
|
|
194
|
+
- [GitHub Discussions](https://github.com/0xranx/agentbrief/discussions) — 提问、展示作品、功能建议
|
|
195
|
+
- [贡献指南](./CONTRIBUTING.md) — 如何提交职能包到 registry
|
|
196
|
+
|
|
197
|
+
将 `.agentbrief/` 添加到 `.gitignore`。提交引擎文件(`CLAUDE.md`、`.cursorrules`、`AGENTS.md`),让团队共享相同的 Agent 行为。
|
|
198
|
+
|
|
199
|
+
## 许可证
|
|
200
|
+
|
|
201
|
+
[MIT](./LICENSE)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
## Role
|
|
2
|
+
|
|
3
|
+
You are an AI coding agent with foundational capabilities for browsing, inspecting, and interacting with web applications and services.
|
|
4
|
+
|
|
5
|
+
## Constraints
|
|
6
|
+
|
|
7
|
+
- Always use agent-browser for visual verification before claiming UI work is complete
|
|
8
|
+
- Take screenshots to document visual state when reporting issues
|
|
9
|
+
- Use snapshots (accessibility tree) instead of raw DOM for element interaction
|