tools
Skill8 starsChanged 5 months agoMITView on GitHub
Registers LLM tools and renders custom tool-call UI in assistant-ui (@assistant-ui/react). Use when adding frontend-only tools with makeAssistantTool / useAssistantTool (browser actions like clipboard, navigation, localStorage, async-generator streaming, AbortSignal), rendering backend AI SDK tool() calls with makeAssistantToolUI / useAssistantToolUI (status.type running/complete/incomplete/requires-action, args, result, artifact via ToolCallMessagePartProps), building generative UI from tool results, or implementing human-in-the-loop and approval flows (addResult, resume with context.human(), respondToApproval for server-side needsApproval gates). Covers registering tool components inside AssistantRuntimeProvider and the case-sensitive toolName matching that connects a tool to its UI. Reach for this when tool UI is not rendering, a tool is not being called, or a result is not showing.
19 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- onetapstudiogames/1f3d9-citylifetheir own version, first seen Nov 29, 2026
- Fuzzdkk/dfir-skillstheir own version, first seen Nov 15, 2026
- skillberry-ai/cap-evolvetheir own version, first seen Nov 8, 2026
- soilmass/motion-design-agenttheir own version, first seen Nov 8, 2026
- p0/claude-code-promptstheir own version, first seen Oct 25, 2026
- hsantanna88/clo-authortheir own version, first seen Oct 9, 2026
Used with
Projects with it also use review.
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.
SentrySkillreview
Fixture review skill.
Also in 3 projects that use this
Other versions19 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- utopusc/livinity-io★ 7267% same
Wrote their own version · 18
- Pixeval/Pixeval★ 3.2ksame name
- BankrBot/openclaw-skills★ 1.2ksame name
- BankrBot/skills★ 1.2ksame name
- austintgriffith/ethskills★ 303same name
- hsantanna88/clo-author★ 262same name
- hugosantanna/clo-author★ 262same name
- first-fluke/fullstack-starter★ 226same name
- skillberry-ai/cap-evolve★ 71same name
- launchdarkly/ai-tooling★ 32same name
- brianonbased-dev/HoloScript★ 12same name
8 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 repository16 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- public/llms-full.txtllms.txt
- public/llms.txtllms.txt
- assistant-uiSkill
- cloudSkill
- copilotsSkill
- markdownSkill
- observabilitySkill
- primitivesSkill
- react-mcpSkill
- runtimeSkill
- setupSkill
- speckit-agent-context-updateSkill
- streamingSkill
- thread-listSkill
- updateSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 162
Check tool description is clear
- Very specific: line 163
Use stopWhen: stepCountIs(n) to allow multi-step
- Very specific: line 168
Check status.type === "complete" before accessing result
“Common” is measured: kept by at least 6 in 10 of the 14 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
assistant-ui Tools
Always consult assistant-ui.com/llms.txt for the latest API.
Tools let LLMs trigger actions with custom UI rendering.
References
- ./references/make-tool.md -- makeAssistantTool/useAssistantTool
- ./references/tool-ui.md -- makeAssistantToolUI rendering
- ./references/human-in-loop.md -- Confirmation patterns
- ./references/toolkits.md -- Toolkits and the Tools component
- ./references/mcp-server.md -- Server-side MCP tools
- ./references/generative-ui.md -- Declarative generative UI
- ./references/registry-components.md -- ToolFallback, ToolGroup, Image renderers
Tool Types
Where does the tool execute?
├─ Backend (LLM calls API) → AI SDK tool()
│ └─ Want custom UI? → makeAssistantToolUI
└─ Frontend (browser-only) → makeAssistantTool
└─ Want custom UI? → makeAssistantToolUIBackend Tool with UI
// Backend (app/api/chat/route.ts)
import { openai } from "@ai-sdk/openai";
import { streamText, tool, stepCountIs, convertToModelMessages, type UIMessage } from "ai";
import { z } from "zod";
export async function POST(req: Request) {
const { messages }: { messages: UIMessage[] } = await req.json();
const result = streamText({
model: openai("gpt-4o"),
messages: await convertToModelMessages(messages),
stopWhen: stepCountIs(5),
tools: {
get_weather: tool({
description: "Get weather for a city",
inputSchema: z.object({ city: z.string() }),
execute: async ({ city }) => ({ temp: 22, city }),
}),
},
});
return result.toUIMessageStreamResponse();
}import { makeAssistantToolUI } from "@assistant-ui/react";
const WeatherToolUI = makeAssistantToolUI({
toolName: "get_weather",
render: ({ args, result, status }) => {
// status is an object; check status.type (not status === "running")
if (status.type === "running") return <div>Loading weather...</div>;
return (
<div>
{result?.city}: {result?.temp}°C
</div>
);
},
});
<AssistantRuntimeProvider runtime={runtime}>
<WeatherToolUI />
<Thread />
</AssistantRuntimeProvider>;Frontend-Only Tool
import { makeAssistantTool } from "@assistant-ui/react";
import { z } from "zod";
const CopyTool = makeAssistantTool({
toolName: "copy_to_clipboard",
parameters: z.object({ text: z.string() }),
execute: async ({ text }) => {
await navigator.clipboard.writeText(text);
return { success: true };
},
});
<AssistantRuntimeProvider runtime={runtime}>
<CopyTool />
<Thread />
</AssistantRuntimeProvider>;API Reference
// makeAssistantToolUI render props (ToolCallMessagePartProps)
interface ToolCallMessagePartProps {
toolCallId: string;
toolName: string;
args: Record<string, unknown>;
argsText: string; // raw streamed JSON
result?: unknown;
isError?: boolean;
artifact?: unknown; // UI-only artifact attached to the result
// status is an OBJECT, not a string. Branch on status.type.
status:
| { type: "running" }
| { type: "complete" }
| { type: "incomplete"; reason: "cancelled" | "length" | "content-filter" | "other" | "error" }
| { type: "requires-action"; reason: "interrupt" };
// Supply a result from the renderer (instead of a tool execute function)
addResult: (result: unknown) => void;
// Resume a frontend tool paused via context.human(...)
resume: (payload: unknown) => void;
// Respond to a server-side approval gate
respondToApproval: (response: { approved: boolean; reason?: string }) => void;
}Human-in-the-Loop
const DeleteToolUI = makeAssistantToolUI({
toolName: "delete_file",
render: ({ args, status, addResult }) => {
if (status.type === "requires-action") {
return (
<div>
<p>Delete {args.path}?</p>
<button onClick={() => addResult({ confirmed: true })}>Confirm</button>
<button onClick={() => addResult({ confirmed: false })}>Cancel</button>
</div>
);
}
return <div>File deleted</div>;
},
});Common Gotchas
Tool UI not rendering
toolNamemust match exactly (case-sensitive)- Register UI inside
AssistantRuntimeProvider
Tool not being called
- Check tool description is clear
- Use
stopWhen: stepCountIs(n)to allow multi-step
Result not showing
- Tool must return a value
- Check
status.type === "complete"before accessing result
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.

