Skip to content
Back to skills

Tools Handoffs Guardrails

ASecurity

"Build function tools, local and hosted tool surfaces,

  • 247 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 8, 2026
toolspythonshellrailsdockerapi

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill tools-handoffs-guardrails --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tools Handoffs Guardrails?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Tools Handoffs Guardrails
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-tools-handoffs-guardrails/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-tools-handoffs-guardrails)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: tools-handoffs-guardrails
description: "Build function tools, local and hosted tool surfaces,
  agents-as-tools, handoffs, approvals, and guardrails in openai-agents-python."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# Tools, Handoffs, and Guardrails

Use this sub-skill when a task mentions `@function_tool`, function schemas, hosted or local tools, `ShellTool`, `ComputerTool`, `ApplyPatchTool`, agents-as-tools, handoffs, human approval, input/output guardrails, or tool guardrails.

## Start Here

- Read [references/api-reference.md](references/api-reference.md) for current constructor/decorator options, selection tables, and API boundaries.
- Read [references/workflows.md](references/workflows.md) for copyable patterns: basic function tools, approval flow, agents-as-tools versus handoffs, deferred tool search, shell/apply-patch/computer tools, and guardrails.
- Read [references/troubleshooting.md](references/troubleshooting.md) when schema generation, strict mode, approvals, guardrail timing, tool lookup, hosted/local execution, or `ComputerTool` model migration is surprising.
- Run [scripts/validate_function_tool_schema.py](scripts/validate_function_tool_schema.py) to inspect safe local `@function_tool` schema behavior without model or API calls.

## Routing Boundaries

- Use this sub-skill for Python function tools, SDK built-in tool classes, `Agent.as_tool()`, `handoff(...)`, `ToolExecutionConfig`, HITL approval pauses, and agent/tool guardrails.
- Route MCP server lifecycle, local MCP configuration, and hosted MCP depth to [../mcp-and-hosted-tools/SKILL.md](../mcp-and-hosted-tools/SKILL.md); keep only high-level hosted tool selection here.
- Route model/provider setup, Responses versus Chat Completions compatibility, and `OpenAIProvider` choices to [../models-providers/SKILL.md](../models-providers/SKILL.md).
- Route sandbox agents, manifests, Docker/hosted sandbox clients, and sandbox capability wiring to [../sandbox-agents/SKILL.md](../sandbox-agents/SKILL.md).
- Route runner lifecycle, sessions, server-managed conversations, streaming, and `RunState` persistence details to [../core-runtime/SKILL.md](../core-runtime/SKILL.md).

## Working Rules

- Prefer `@function_tool` for ordinary Python functions; use explicit `FunctionTool` only when you need a custom raw JSON invoker or manually built schema.
- Keep `strict_mode=True` unless you have verified the target model/provider accepts the looser schema and you have a fallback for validation errors.
- Use `Agent.as_tool()` when a manager should keep conversation control; use `handoff(...)` when a specialist should become the active agent.
- Use tool guardrails for checks around every custom function-tool call; agent input guardrails only cover the first agent input, and agent output guardrails only cover the final-producing agent.
- Treat approval-gated tools as resumable interruptions: inspect `result.interruptions`, convert to `RunState`, approve/reject, then resume the original top-level run.

## Evidence Base

This sub-skill distills the repository docs, source, examples, and tests for tools, handoffs, HITL approvals, guardrails, `ToolExecutionConfig`, deferred tool search, and local/hosted runtime tools. It intentionally bundles patterns instead of linking to original examples so future agents do not depend on a source checkout.

Files in this skill

  • SKILL.md3.3 KB
  • references/api-reference.md14.1 KB
  • references/troubleshooting.md10.4 KB
  • references/workflows.md15.3 KB
  • scripts/validate_function_tool_schema.py7.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.