create-hook
Skill4 starsChanged 47 days agoMITView on GitHub
Guide the user from an idea ("tell me when a thread needs me", "block messages that mention production") to a working BB hook. Use when a thread is opened from the Hooks page's New hook button, when the user asks to create, set up, or automate a hook, or when they describe something that should happen automatically on a BB thread event. Ends with a tested, installed hook.
17 other projects use a version of this.
Adopted by
Most recently taken up by
- tony-hoang-ai-automation/mkt-skillstheir own version, first seen Oct 25, 2026
- pahlevikun/levistacktheir own version, first seen Oct 25, 2026
- ArangoGutierrez/claude-toolkittheir own version, first seen Oct 15, 2026
- 0mlkrizzz655335v/claude-skills-zhtheir own version, first seen Oct 15, 2026
- microsoft/vscodetheir own version, first seen Oct 13, 2026
- leishifu666/skillstheir own version, first seen Oct 9, 2026
Used with
Projects with it also use review-bugbot, update-cli-config and 10 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.
0mlkrizzz655335vSkillreview-bugbot
缺陷导向代码审查。用 Bugbot 子代理找 bug。
Also in 5 projects that use this
PandelisZSkillupdate-cli-config
View and modify Cursor CLI configuration settings in ~/.cursor/cli-config.json. Use when the user wants to change CLI settings, configure permissions, switch approval mode, enable vim mode, toggle display options, configure sandbox, or manage any CLI preferences.
Also in 7 projects that use this
32103210Skillmigrate-to-skills
Convert 'Applied intelligently' Cursor rules (.cursor/rules/*.mdc) and slash commands (.cursor/commands/*.md) to Agent Skills format (.cursor/skills/). Use when you want to migrate rules or commands to skills, convert .mdc rules to SKILL.md format, or consolidate commands into the skills directory.
Also in 7 projects that use this
32103210Skillupdate-cursor-settings
Modify Cursor/VSCode user settings in settings.json. Use when you want to change editor settings, preferences, configuration, themes, font size, tab size, format on save, auto save, keybindings, or any settings.json values.
Also in 7 projects that use this
0mlkrizzz655335vSkillorigin
origin CLI 管理。安装、登录、更新、修复 origin.cursor.com 的 CLI。"disabled-environments:
Also in 3 projects that use this
Tsumugii24Skillsplit-to-prs
Split current work into small reviewable PRs. Use when the user asks to split a chat, set of changes, branch, or PR.
Also in 7 projects that use this
- +2 more from 32103210
- +2 more from 0mlkrizzz655335v
Other versions17 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 17
- microsoft/vscode★ 195ksame name
- am-will/codex-skills★ 1ksame name
- zhuangwenhui/CodingSkills★ 82same name
- KhaledSaeed18/dotclaude★ 5same name
- ArangoGutierrez/claude-toolkit★ 4same name
- tony-hoang-ai-automation/mkt-skills★ 4same name
- 0mlkrizzz655335v/claude-skills-zh★ 2same name
- Iteam-company/claude-code-boilerplates★ 2same name
- Goodnessmbakara/codex-skills★ 1same name
- JameMy0001/antigravity-skills-hub★ 1same name
7 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.
- hooksSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 6 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
If the user has not said what should happen and when, ask, briefly:
- Very specific: line 16
When: should it fire? Map their words to an event with bb hooks events: "finished" → thread.idle, "needs me / waiting" → …
- Distinctive: line 20
What: should happen? A notification, a message to a service, a shell command, a follow-up thread, or a decision to block or hold a message.
- Distinctive: line 25
Ask at most one round of questions.
- Very specific: line 30
Run bb hooks templates --search <words> (also bb hooks marketplace search).
- Very specific: line 31
If a template fits, install it with bb hooks use <ref> --set key=value …, adding --event, --title, --project, --text filters as needed.
- Distinctive: line 59
Ask the user which they want when it matters, for example a reviewer on a different provider than the author.
- Distinctive: line 65
Read the output; fix the command until it does what the user asked.
- Distinctive: line 72
Do not install more than the user asked for.
“Common” is measured: kept by at least 6 in 10 of the 17 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
Create a hook with the user
You are turning a plain-language wish into an installed, tested hook. Work
with the bb hooks CLI only; never edit the plugin's storage or settings
files by hand. The user can watch the result appear on the Hooks page.
1. Understand what they want
If the user has not said what should happen and when, ask, briefly:
- When should it fire? Map their words to an event with
bb hooks events: "finished" →thread.idle, "needs me / waiting" →interaction.pending, "broke / failed" →thread.failedorturn.failed, "before a message goes to the agent" →message.dispatch(a gate). - What should happen? A notification, a message to a service, a shell command, a follow-up thread, or a decision to block or hold a message.
- Which threads? Everything, or only some project, provider, or a title or text pattern.
Ask at most one round of questions. Prefer sensible defaults and say what you assumed.
2. Prefer a template
Run bb hooks templates --search <words> (also bb hooks marketplace search).
If a template fits, install it with bb hooks use <ref> --set key=value …,
adding --event, --title, --project, --text filters as needed.
Credentials belong in --set values for secret params (stored encrypted) or
in bb hooks secrets set <name> <value>; never paste a token into a command.
A template from a catalog needs --yes; before adding it, show the user what
bb hooks templates <ref> prints under "What it runs".
3. Otherwise write the hook
bb hooks add <id> --event <event> --command '<sh>' or --url <https://…>.
- Commands run with
/bin/shon the machine hosting BB. The event arrives as JSON on stdin;BB_THREAD_TITLE,BB_THREAD_ID,BB_PROJECT_ID,BB_HOOK_EVENT,BB_SERVER_URLandBB_CLI(the bb binary) are in the environment. Use{{secret:name}}for credentials. - Webhooks: add
--header 'name=value'and let the plugin send the event JSON, or shape it with a body template viabb hooks edit <id> --url …(bodies use{{thread.title}},{{lastAssistantText|500}}). - Gate hooks (
message.dispatch): exit 0 proceeds, 2 rejects with stderr as the reason, 3 queues; must answer within 8 seconds; use--on-errorto choose what happens if the command fails. - Chaining agents: call
"$BB_CLI" thread spawn …from the command; thefollow-upandreviewtemplates show the pattern, including the guard that stops chains after one hop. Theiragentsetting decides who runs the new thread:--set agent=inherit(same provider, model and reasoning as the triggering thread; the plugin passes them asBB_MODEL,BB_REASONING_LEVEL,BB_SERVICE_TIER),--set agent=codex(a provider with its default model), or--set agent='{"providerId":"codex","model":"gpt-5.5","reasoningLevel":"high"}'. Ask the user which they want when it matters, for example a reviewer on a different provider than the author.
4. Test, then hand over
bb hooks test <id>(add--thread $BB_THREAD_IDfor a real payload). Read the output; fix the command until it does what the user asked.- For a gate, test both directions: a message that should pass and one that should not.
bb hooks show <id>and tell the user, in two or three sentences: what fires when, where to see runs (Hooks → Installed), and how to disable or remove it (bb hooks disable <id>,bb hooks remove <id>).
Do not install more than the user asked for. Do not leave test hooks behind.
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.

