Index of every page on this site: llms.txt
All skills
inference-sh avatar

/tools-ui

@c895a47
by inference.shinference-sh/skills819 stars
108
Run it yourself

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-sh/skills/tools-ui

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈113 tokens for metadata: the name and description. ≈868 when used: this file.

Description uses 5.7% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈454 characters, or 5.7%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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: 'anthropic/claude-sonnet-5-5@latest' },
    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

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts3d5 checks · Risk SAFE
  • Gen Agent Trust Hub3d

    This skill provides documentation and installation instructions for a React/Next.js UI component library designed to visualize AI agent tool calls and lifecycles. All external resources and commands point to legitimate vendor-owned infrastructure or standard development tools.

  • Socket3d

    No alerts

  • Snyk3d

    Risk: LOW · No issues

  • Runlayer8mo

    1 file scanned · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

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

Last checked against GitHub 3 days ago.

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

README badge

README badge for inference-sh/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.