bb-plugin-authoring
Write or change a bb plugin: operations, hooks, slots, CLI and agent doors, app panels. Use when asked to extend bb or build a plugin.
от get-bb★ 15 звёзд на GitHub
Установить bb-plugin-authoring в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Writing a bb plugin
A plugin is a directory with a package.json bb block, a contract.ts and up to three parts:
server.ts, app.tsx, runner.ts. Everything in bb is built from the same pieces, so look at what is
already running before you write anything.
Loop
bb dev inspectlists every live operation, event, slot and hook.bb dev inspect threads.narrows it. Hook or call what is there; do not guess names.bb dev new <id>creates a working plugin (one operation with a CLI and an agent door, one live value, one app panel) in./<id>.bb dev watch <dir>loads it and reloads it whenever a file changes.bb plugin listshows whether it is running and why not.bb dev validate <dir>checks the manifest and lists what the plugin implements, hooks, calls and adds, and where it reaches outside bb (Node built-ins, network, environment variables).bb audit list --plugin <id>shows what the plugin did on someone's behalf.
To change something bb already does instead of starting empty, copy it: bb dev fork <id> copies any
built-in plugin (bb plugin list names them, core ones such as threads, composer and
thread-view included) into ./<id> and runs the copy in the original's place, reloading on save.
bb plugin remove <dir> --yes brings the original back. bb dev fork <id> --as <new-id> makes a
renamed copy that runs beside the original.
A plugin written for the original bb (@get-bb/plugin-sdk): bb dev port <dir> lists every old call
it makes and what it is now.
The pieces
Operation: a named, typed function.
bb.implement(op, run)makes this plugin its one implementation.bb.call(op, input)calls any operation.bb.on(op, hook)wraps one:hook(input, next); callnext()to continue, change what you pass or return to rewrite, and on operations that allow it return withoutnextto answer ordeny("reason")to refuse.Errors:
fail(code, message, { reason, hint })from@bb/plugin, with codenot_found,conflict,unavailableorinvalid; the CLI prints the message and hint. In a hook,deny(reason)refuses.Doors:
doors.climakesbb <path>;doors.agentoffers the operation to agents as a tool;doors.httpserves it at a REST path under/api/v1(path parameters, query or JSON body become the one input object). Every operation is callable from an app withcallOp,useOporuseCall, and from any program withcreateOpClient().call(op, input). Core's REST API is the core contracts' operations (threads.get,machines.list, …); call those instead of fetching URLs.CLI doors replace hand-written CLIs:
positionals,flags(aliases,split,placeholder,duration),from(fill a field from where the command ran:cwd,projectId,threadId,hostId),constraints(exactly-one,at-most-one,at-least-one,requires),print,exitCode,aliases,description. UsedefineCli/cliCommandonly for what a door cannot say.Offered:
bb.implement(op, run, { offered: ({ threadId, projectId, hostId, providerId }) => … })hides the agent tool where it does not apply.Versions: state the API you need in
package.json("engines": { "bb": "^1" }); the loader refuses a plugin outside that range.requiresmay name versions:{ "tasks": "^2" }.On a machine: git, files and terminals are operations from
@bb/runner(git.status,machineFiles.read,machineTerminals.open); a server part calls them withbb.runners.call(hostId, op, input)and a runner part can hook them.Event:
bb.emit(event, payload),bb.on(event, listener).{ userId }as a third argument (also onbb.changed(op, { userId })) delivers to one user only.Slot: a list other plugins add to.
bb.add(slot, item),bb.wrap(slot, matcher, change).service<T>()is a slot with one winner that holds an object:bb.use(service).Live value:
bb.provide(live, initial)on the server,useLive(live)in an app.Parts: each part is a plain function that takes
bb. The server, the app and each machine get the same handle shape: the verbs above pluspluginId,log,onStartandonDispose. An app part fills slots the same way:bb.add(shell.navPanel, { id, title, icon, path, view }). In components useuseOp,useCall,useLive,useSlot.Host services (server):
bb.db,bb.realtime,bb.runners,bb.server,bb.http.api,bb.http.socket. Core plugins are written with these too; there is no private API.Other plugins' contracts: import by package name,
import { pullRequests } from "bb-plugin-github/contract", and name the plugin inbb.requires(["github"]). In this repo also add"bb-plugin-github": "workspace:*"todependencies. Never import another plugin's server or app files.Settings:
bb.settings.define(fields, { scope })with scopeworkspace(default),useror `p
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл bb-plugin-authoring?
Write or change a bb plugin: operations, hooks, slots, CLI and agent doors, app panels. Use when asked to extend bb or build a plugin.
Как установить скилл bb-plugin-authoring?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bb-plugin-authoring запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…