All skills
inference-shell avatar

/tools-ui

@b576e8e

Tool lifecycle UI components for React/Next.js from ui.inference.sh. Display tool calls: pending, progress, approval required, results. Capabilities: tool status, progress indicators, approval flows, results display. Use for: showing agent tool calls, human-in-the-loop approvals, tool output. Triggers: tool ui, tool calls, tool status, tool approval, tool results, agent tools, mcp tools ui, function calling ui, tool lifecycle, tool pending

Use this Skill: https://skilld.dev/gh/inference-shell/skills/tools-ui

This session only. Nothing lands on disk.

SKILL.md

≈113 tokens always: the name and description. ≈869 when used: this file.

Install the belt CLI skill: npx skills add belt-sh/cli

Tool UI Components

Tool lifecycle components from ui.inference.sh.

Tool UI Components

Quick Start

npx shadcn@latest add https://ui.inference.sh/r/tools.json

Tool States

State Description
pending Tool call requested, waiting to execute
running Tool is currently executing
approval Requires human approval before execution
success Tool completed successfully
error Tool execution failed

Components

Tool Call Display

import { ToolCall } from "@/registry/blocks/tools/tool-call"

<ToolCall
  name="search_web"
  args={{ query: "latest AI news" }}
  status="running"
/>

Tool Result

import { ToolResult } from "@/registry/blocks/tools/tool-result"

<ToolResult
  name="search_web"
  result={{ results: [...] }}
  status="success"
/>

Tool Approval

import { ToolApproval } from "@/registry/blocks/tools/tool-approval"

<ToolApproval
  name="send_email"
  args={{ to: "user@example.com", subject: "Hello" }}
  onApprove={() => executeTool()}
  onDeny={() => cancelTool()}
/>

Full Example

import { ToolCall, ToolResult, ToolApproval } from "@/registry/blocks/tools"

function ToolDisplay({ tool }) {
  if (tool.status === 'approval') {
    return (
      <ToolApproval
        name={tool.name}
        args={tool.args}
        onApprove={tool.approve}
        onDeny={tool.deny}
      />
    )
  }

  if (tool.result) {
    return (
      <ToolResult
        name={tool.name}
        result={tool.result}
        status={tool.status}
      />
    )
  }

  return (
    <ToolCall
      name={tool.name}
      args={tool.args}
      status={tool.status}
    />
  )
}

Styling Tool Cards

<ToolCall
  name="read_file"
  args={{ path: "/src/index.ts" }}
  status="running"
  className="border-blue-500"
/>

Tool Icons

Tools automatically get icons based on their name:

Pattern Icon
search*, find* Search
read*, get* File
write*, create* Pencil
delete*, remove* Trash
send*, email* Mail
Default Wrench

With Agent Component

The Agent component handles tool lifecycle automatically:

import { Agent } from "@/registry/blocks/agent/agent"

<Agent
  proxyUrl="/api/inference/proxy"
  config={{
    core_app: { ref: 'openrouter/claude-sonnet-45@0fkg6xwb' },
    tools: [
      {
        name: 'search_web',
        description: 'Search the web',
        parameters: { query: { type: 'string' } },
        requiresApproval: true, // Enable approval flow
      },
    ],
  }}
/>

Related Skills

# Full agent component (recommended)
npx skills add inference-sh/skills@agent-ui

# Chat UI blocks
npx skills add inference-sh/skills@chat-ui

# Widgets for tool results
npx skills add inference-sh/skills@widgets-ui

Documentation

Component docs: ui.inference.sh/blocks/tools

Source: SKILL.md on GitHub

2 warnings16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides React components for agent tool lifecycle visualization. It facilitates the download of UI components from the vendor's official registry and handles tool outputs, which represents a potential surface for indirect prompt injection.

  • Socket16d

    1 alert: gptAnomaly

  • Snyk16d

    Risk: MEDIUM · 1 issue

  • Runlayer6mo

    1 file scanned · No issues

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at b576e8e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 5 months ago
  • React
  • Next.js
  • tool-calling
  • ui-components
  • agent
  • human-in-the-loop
  • approval-flows
  • shadcn

README badge

README badge for inference-shell/skills/tools-ui

React/Next.js components for displaying tool lifecycle states (pending, running, approval, success, error) from ui.inference.sh. Includes ToolCall, ToolResult, and ToolApproval components with automatic icon mapping and support for human-in-the-loop approval flows in agent interfaces.

Generated from the current SKILL.md.

Does this work with React and Next.js?
Yes. The skill provides React components from ui.inference.sh that work in both React and Next.js projects.
Can I add approval gates to tool execution?
Yes. The ToolApproval component supports human-in-the-loop approval flows with onApprove and onDeny callbacks. Tools can be marked as requiresApproval in agent config.
What tool states does this skill handle?
The skill displays five states: pending, running, approval, success, and error. Each state has a corresponding UI representation.
Do I need to manually assign icons to tools?
No. Tools automatically receive icons based on their name pattern (e.g., search*, read*, write*, send*, delete*).
Does this require the Agent component or can I use it standalone?
You can use the individual ToolCall, ToolResult, and ToolApproval components standalone, or integrate with the full Agent component for automatic tool lifecycle handling.

Generated from the current SKILL.md. These answers refresh after source changes.