hooks
Skill4 starsChanged 47 days agoMITView on GitHub
Create, inspect, test, and remove custom BB hooks with the `bb hooks` CLI, including premade templates (desktop notifications, Slack, Discord, Telegram, ntfy phone push, log to file, follow-up and review threads, block patterns, office hours). Use when the user wants something to happen automatically when a thread finishes, fails, needs attention, or is archived, wants a webhook or shell command fired on a BB event, or wants to block or hold messages before they reach the agent.
22 other projects use a version of this.
Adopted by
Most recently taken up by
- opus-pro/reel-runbooktheir own version, first seen Nov 8, 2026
- Data-Wise/crafttheir own version, first seen Oct 31, 2026
- AI-Answer/ContentRepurposeSystemtheir own version, first seen Oct 28, 2026
- uplika/uplika-plugintheir own version, first seen Oct 25, 2026
- parcadei/Continuous-Claudetheir own version, first seen Oct 17, 2026
- captkernel/claude-writing-toolstheir own version, first seen Oct 15, 2026
Used with
Projects with it also use yt-titles, outlines and 1 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Samin12Skillyt-titles
Generate high-performing YouTube title ideas based on the user's video content description, cross-referenced with your recent top-performing videos. Use this skill whenever the user wants YouTube title suggestions, asks "what should I title this video", "give me title ideas", "title options for my video about...", "help me name this video", brainstorming video titles, or any request involving YouTube title generation or optimization. Also trigger when the user mentions titling, naming, or headlining a YouTube video even casually.
Also in 3 projects that use this
Clay-HHKSkilloutlines
Guarantee valid JSON/XML/code structure during generation, use Pydantic models for type-safe outputs, support local models (Transformers, vLLM), and maximize inference speed with Outlines - dottxt.ai's structured generation library
Also in 3 projects that use this
BlockSkillfrontend-design
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Also in 3 projects that use this
Other versions22 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 22
- parcadei/Continuous-Claude★ 3.9ksame name
- parcadei/Continuous-Claude-v2★ 3.9ksame name
- parcadei/Continuous-Claude-v3★ 3.9ksame name
- duncan-buildroom/freeskills★ 65same name
- nimadorostkar/Claude-Skills-collection★ 33same name
- AI-Answer/ContentRepurposeSystem★ 26same name
- duncan-buildroom/profit-room-skills★ 18same name
- coopersimson96/ai-content-system★ 17same name
- issue-orchestrator/issue-orchestrator★ 10same name
- Samin12/skills★ 8same name
12 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- create-hookSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 0 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 21 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 27
Prefer a template over a hand-written command when one fits.
- Very specific: line 93
Run bb hooks templates first.
- Very specific: line 97
Create the hook with a short kebab-case id and quote the command: bb hooks add notify-done --event thread.idle --command 'osascript -e …
- Very specific: line 99
Run bb hooks test <id> (add --thread $BB_THREAD_ID for a real payload) and read the output before relying on it.
- Very specific: line 101
Check bb hooks history when a hook seems not to fire.
- Very specific: line 109
Keep gate hooks fast and side-effect free.
- Very specific: line 111
Do not add hooks the user did not ask for.
“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Custom hooks
A hook binds one BB event to a shell command or a webhook URL. Definitions
are stored in the plugin's hooks setting (Settings → Installed plugins →
Hooks) and the bb hooks command reads and writes the same list. The user
also has a Hooks page in the BB sidebar (Marketplace, Installed, Sources,
Secrets); point them there for browsing and forms, and use the CLI yourself.
Premade hooks (start here)
| Command | Effect |
bb hooks templates | List templates from subscribed marketplace catalogs. The plugin ships none of its own. |
bb hooks templates <template> | Show its parameters and an example. |
bb hooks use <template> --set key=value… | Create hooks from it. --event overrides events (repeatable), --id renames, --project/--provider/--title/--text filter. |
| bb hooks marketplace add owner/repo | Subscribe to a catalog (hooks-catalog.json in a GitHub repo, or an https URL). Then bb hooks templates --search <text> and bb hooks use catalog/template --yes. |
| bb hooks marketplace stats [on\|off] | Show or set whether new BB Hooks Marketplace installs are reported to its install counter. Leave the choice to the user; never switch it on for them. |
| bb hooks secrets set <name> <value> | Store a credential encrypted; reference it as {{secret:<name>}}. Secret template params are stored this way automatically. |
| bb hooks export <id> | Turn a hook into a template JSON for a catalog; bb hooks marketplace init prints a starter catalog. |
Prefer a template over a hand-written command when one fits. A fresh install subscribes to MacHatter1/bb-hooks-marketplace (catalog name community). Examples:
bb hooks use community/slack --set webhookUrl=… --yes,
bb hooks use community/block-pattern --set 'pattern=\bprod\b' --set 'message=Ask a human.' --yes,
bb hooks use community/review --set provider=codex --title '^feat' --yes.
Commands
| Command | Effect |
bb hooks events | List every event a hook can subscribe to, with what it means. |
bb hooks list | Show hooks: id, event, enabled, target, match. |
bb hooks show <id> | Print one hook as JSON. |
bb hooks add <id> --event <event> --command '<shell>' | Create a command hook. |
bb hooks add <id> --event <event> --url <https://…> | Create a webhook hook. |
bb hooks edit <id> [flags] | Change fields; --clear-match drops filters. |
bb hooks enable <id> / bb hooks disable <id> | Toggle without deleting. |
bb hooks remove <id> | Delete. |
bb hooks test <id> [--thread <thread_id>] | Run it now with a sample payload, or the given thread's facts. |
bb hooks history [--limit n] [--hook id] | Recent runs with status, duration and output. |
Optional add/edit flags: --project <proj_id>, --provider <id>,
--title <regex>, --text <regex> (filters), --timeout <ms>, --cwd <dir>,
--header k=v (webhooks), --description <text>, --disabled,
--on-error proceed|reject|wait (gate hooks only). Add --json to any
command when the output drives code.
Events
Observe-only (the hook is told after the fact): thread.created,
thread.active, thread.idle, thread.failed, thread.archived,
thread.unarchived, thread.deleted, interaction.pending,
message.queued, message.dispatched, message.cancelled, turn.failed,
experimental_thread.events (noisy: up to once per second per running thread),
experimental_terminal.input.
Gate (the hook's answer is acted on): message.dispatch runs before every
message reaches the provider. Exit 0 proceeds, exit 2 rejects (stderr becomes
the message the user sees), exit 3 queues the message with stderr as the
reason. Any other exit is a failure and the reason names the exit code.
A JSON object on the last stdout line overrides the exit code:
{"action":"reject","message":"…"}, {"action":"wait","reason":"…","sendAt":<epoch ms>}
or {"action":"proceed"}. Gate hooks must answer within 8 seconds.
What the hook receives
- stdin (command) or POST body (webhook): one JSON object with
event,hookId,timestamp,serverUrl, and the event payload (threadfor thread events, pluslastAssistantText,error,entry,interaction, or the dispatch context). Read it withjq, for examplejq -r .thread.title. - environment:
BB_HOOK_EVENT,BB_HOOK_ID,BB_THREAD_ID,BB_PROJECT_ID,BB_PROVIDER_ID,BB_THREAD_TITLE,BB_THREAD_STATUS,BB_SERVER_URL; gate hooks also getBB_DISPATCH_ATTEMPT,BB_MODELandBB_MESSAGE_TEXT(first 1000 characters). Observe hooks whose command mentionsBB_MODEL,BB_REASONING_LEVEL,BB_SERVICE_TIERorBB_PERMISSION_MODEalso get the triggering thread's execution settings. - Template settings of type
agenttakeinherit, a provider id, or JSON{providerId, model, reasoningLevel}; in a command they expand to{{agent.mode}},{{agent.providerId}},{{agent.model}},{{agent.reasoningLevel}}and{{agent.serviceTier}}. - Webhooks get
x-bb-hooks-eventandx-bb-hooks-idheaders, and when the plugin's webhook secret is set,x-bb-hooks-timestampandx-bb-hooks-signature: sha256=<hmac of "<timestamp>.<body>">.
Procedure
- Run
bb hooks templatesfirst; use one when it fits. Otherwise runbb hooks eventsif unsure which event fits.thread.idleis "the agent finished",interaction.pendingis "the agent needs the user",thread.failedandturn.failedare "something broke". - Create the hook with a short kebab-case id and quote the command:
bb hooks add notify-done --event thread.idle --command 'osascript -e "display notification \"$BB_THREAD_TITLE\" with title \"Agent finished\""'. - Run
bb hooks test <id>(add--thread $BB_THREAD_IDfor a real payload) and read the output before relying on it. - Check
bb hooks historywhen a hook seems not to fire.
Rules
- Commands run on the machine that hosts the BB server, not inside the
thread's environment;
--cwdis a server-side path. - Change hooks only through
bb hooksor the settings page; never edit the plugin database directly. - Keep gate hooks fast and side-effect free; a slow or failing gate hook lets
the message through unless
--on-error rejectorwaitis set. - Do not add hooks the user did not ask for. Never put a credential in a
command line or url: store it with
bb hooks secrets setand reference{{secret:name}}. - Catalog templates run third-party commands on the server. Show the user
what
bb hooks templates <catalog/template>prints before using--yes.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

