frontend-runtime-skills-contract

Validate streamed tool-call args against schemas before rendering components.

Updated May 19, 2026
One-click install
npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill frontend-runtime-skills-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontend-runtime-skills-contract
Source: https://github.com/zxc1a1a1/Multi_Agent-AgentHub/tree/main/.agents/skills/frontend-runtime-skills-contract
Command: npx skills add https://github.com/zxc1a1a1/Multi_Agent-AgentHub --skill frontend-runtime-skills-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents the frontend from executing or rendering unsafe, mismatched, or unregistered capabilities when it receives streamed tool-call data from agents.

Core Features & Use Cases

  • Runtime Capability Registry Contract: centralizes the mapping from toolName to component, behavior, risk level, and failure mode without binding to any specific agent.
  • Tool Call Arg Aggregation + Validation: aggregates fragmented args by toolCallId, parses JSON at TOOL_CALL_END, and validates against parametersSchema before executing.
  • Security-Aware Rendering and Degradation: enforces sandboxing rules (e.g., iframe for web_preview), disables reserved/disabled capabilities, and applies consistent fallback behavior (error cards, placeholders, or text fallback) to avoid white screens.
  • ToolResult Boundary Guidance: defines when ToolResult should or should not be returned, including safe error/error-card practices.

Quick Start

Register your frontend runtime capabilities in the Runtime Capability Registry keyed by toolName and then render only after the tool call ends, JSON parses, schema validates, and the registry status/risk policy allows execution.

Frequently Asked Questions about frontend-runtime-skills-contract

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I securely render frontend components from streamed tool calls?

To securely render frontend components from streamed tool calls, aggregate fragmented args by toolCallId, parse JSON at TOOL_CALL_END, and validate against parametersSchema before executing behavior-specific components.

How does schema validation prevent XSS in frontend runtime rendering?

Schema validation prevents XSS in frontend runtime rendering by gating component execution until args match parametersSchema, enforcing sandboxing rules like iframe for web_preview, and disabling reserved capabilities to isolate untrusted content.

What is the best way to handle tool call parsing errors and avoid white screens?

The best way to handle tool call parsing errors and avoid white screens is applying consistent fallback behavior using error cards, placeholders, or text fallback when JSON parsing or schema validation fails during streaming tool call consumption.

Can I bind frontend runtime capabilities to a specific agent name?

You cannot bind frontend runtime capabilities to a specific agent name; the Runtime Capability Registry requires strict lookup by toolName to centralize mapping from toolName to component, behavior, risk level, and failure mode.

When should ToolResult be returned after executing frontend runtime capabilities?

ToolResult should be returned after executing frontend runtime capabilities based on defined boundary guidance, which dictates when to safely return results or error cards without exposing unsafe execution states.

Why are reserved or disabled capabilities not executing in my frontend runtime?

Reserved or disabled capabilities are not executing in your frontend runtime because safety rules enforce non-execution of these capabilities, preventing the frontend from rendering unsafe, mismatched, or unregistered behaviors.