A small, Claude-Code-native agent system, adapted from
Chromium's agents/ infrastructure
and sized for this repo (a ~112-hook TypeScript library). It keeps the valuable
patterns — a usage policy, a knowledge-base router, reusable skills, task commands, and
an eval set — and drops the heavy machinery Chromium needs at 35M-line scale (eval farms,
CI sharding, MCP extensions).
| Chromium piece | Here | Loaded when |
|---|---|---|
ai_policy.md |
ai-policy.md |
Read it before shipping AI-assisted code |
common.md workflow |
## AI Agent System in root CLAUDE.md |
Always (project memory) |
knowledge_base.md |
knowledge-base.md |
Always (it's the router) |
| Skills | skills/ |
Auto-activated by relevant requests |
Task Prompts (/cr:…) |
commands/ |
When you type the slash command |
| Eval cases + harness | eval/ |
Manually, after editing prompts/skills |
| Skill | Use it to |
|---|---|
new-hook |
Scaffold a new hook with the repo's real conventions |
hook-test |
Write & run jest tests for a hook |
hook-docs |
Write the .mdx docs (3 locales) + regenerate the registry |
pr-description |
Generate a commit/PR description in this repo's style |
(The publish-medium, publish-juejin, publish-hashnode, and ping-indexnow skills cover blog
publishing — all three platform skills drive opencli browser automation; see CLAUDE.md.)
/new-hook <useName> "<description>" <category>— full pipeline: scaffold → test → docs → registry → lint./pre-pr— pre-upload checklist (lint, test, registry, debug-log scan)./pr-desc— generate a PR/commit description from the current diff.
The same one Chromium leads with: consult the real source before you act, and reuse before you write. This codebase has strong conventions (SSR-safety, a shared util layer, a 3-part public export, multilingual JSDoc). The knowledge base routes a task to the files and utilities that already solve it. Start there.