Give bots skills: runbooks they load when a job matches

A skill is a runbook: a name, a unique slug, a one-line description of when
it applies, and the markdown body. A run only ever sees the slug and
description (one load_skill tool carries them), and reads the whole body
only when it calls the tool, so a long runbook costs nothing until needed.

Skills are the third extension kind beside MCP servers and custom tools, on
the same botExtensionsSql path, so per-bot, per-workspace and all-bots
grants work the same way, and attachDefaultExtensions hands an every-bot
skill to new bots. load_skill is a reserved tool name, so a custom tool
cannot shadow it, and a built-in wins a clash.

Managed on Settings > Skills; ExtensionRow links each kind to its own page
and a skill never reports a failure, since nothing connects or runs.
This commit is contained in:
2026-10-22 12:31:42 +01:00
parent 379ef35e08
commit 08d02e6033
62 changed files with 1438 additions and 79 deletions
@@ -17,8 +17,9 @@ type Props = {
};
/**
* One MCP server or tool the bot can use here, in the composer's tools
* modal. One that isn't working says so, one that's off is struck out.
* One MCP server, tool or skill the bot can use here, in the composer's
* tools modal. One that isn't working says so, one that's off is struck
* out. A skill has nothing to connect or run, so it never reports one.
*/
export default function ComposerToolRow({ item, busy, onRemove }: Props) {
const Icon = extensionIcon({ kind: item.kind });
@@ -27,11 +28,13 @@ export default function ComposerToolRow({ item, busy, onRemove }: Props) {
item.source == "workspace" ? "From this workspace" : "",
!item.enabled
? "Off for every bot"
: item.state == "error"
? "Not working"
: item.state == "untested"
? "Not checked yet"
: "",
: item.kind == "skill"
? ""
: item.state == "error"
? "Not working"
: item.state == "untested"
? "Not checked yet"
: "",
].filter(Boolean);
return (
@@ -18,19 +18,19 @@ type Props = {
* The extension being changed, as `kind:id`.
*/
busy?: string;
onAdd: (params: { kind: "mcp" | "tool"; id: number }) => Promise<boolean>;
onAdd: (params: { kind: "mcp" | "tool" | "skill"; id: number }) => Promise<boolean>;
onRemove: (params: {
kind: "mcp" | "tool";
kind: "mcp" | "tool" | "skill";
id: number;
name: string;
}) => Promise<boolean>;
};
/**
* The composer's tools button: how many MCP servers and tools the bot can
* use here, opening them in a modal rather than filling the composer with
* chips. Super admins and admins remove any it was given (even one every
* bot started with) and add more; a workspace's own stay.
* The composer's tools button: how many MCP servers, tools and skills the
* bot can use here, opening them in a modal rather than filling the
* composer with chips. Super admins and admins remove any it was given
* (even one every bot started with) and add more; a workspace's own stay.
*/
export default function ComposerToolsModal({
bot_name,
@@ -75,8 +75,8 @@ export default function ComposerToolsModal({
</H2>
<Span className="text-[13px] leading-[18px] text-ink-secondary">
{count
? "MCP servers and tools it was given, plus this workspace's. Remove one to take it away, or add another below."
: "It has none yet. Give it an MCP server or tool below, or make one under Settings."}
? "MCP servers, tools and skills it was given, plus this workspace's. Remove one to take it away, or add another below."
: "It has none yet. Give it an MCP server, tool or skill below, or make one under Settings."}
</Span>
</Stack>
@@ -15,7 +15,7 @@ type Props = {
};
/**
* Under the composer: one button counting the MCP servers and tools the
* Under the composer: one button counting the MCP servers, tools and skills the
* bot can use here (they open in a modal, so ten of them don't fill the
* composer), then the computer it's on, opening it in the viewer.
*/
@@ -51,7 +51,7 @@ type Props = {
*/
workspace_id?: number | null;
/**
* Its MCP servers and tools, listed under the input.
* Its MCP servers, tools and skills, listed under the input.
*/
extensions?: BotExtensionsPayload | null;
/**