Skip to main content
A skill can declare itself a fallback for a tool or server, and it’s offered only when that capability is absent.
The user asks for research; a fallback skill is offered only when the primary tool is absent. The fallback declaration lives in the skill itself — the agent code doesn’t change at all.

Quick Start

1

Add fallback_for_tools to your SKILL.md

Create a SKILL.md file with the fallback declaration:
The skill becomes visible only when web_search and web are both absent, and the terminal tool is present.
2

Use the skill from your Agent

The agent automatically receives the fallback skill only when it needs it. No code changes required when you add or remove real tools.

How It Works

The filter runs in every enforcement mode — an unusable fallback is never injected into the prompt regardless of enforcement level.

Decision Table


Frontmatter Reference

Both underscored (fallback_for_tools) and hyphenated (fallback-for-tools) forms are accepted and treated identically.

Common Patterns

Web-via-terminal fallback

When no native web tool is available, offer a terminal-based alternative:

Filesystem-via-shell fallback

When no MCP filesystem server is connected, fall back to shell commands:

LLM-only summarise when no scraper

When no scraping tool is available, summarise from context only:

Best Practices

Fallback skills are injected when a real tool is missing. Shorter, focused instructions reduce token usage and avoid confusing the agent.
A fallback that can’t run is worse than no fallback. Use requires_tools to ensure the fallback’s own dependencies are met before it’s offered.
Without requires_tools: [terminal], the skill would be offered even when the terminal tool is also absent — and the agent would try to use instructions it can’t execute.
Avoid creating a chain of fallbacks-of-fallbacks. Pick the simplest fallback and stop there.
The fastest way to verify your fallback works is to construct an agent with and without the primary tool and check which skills are offered:

Skill Capability Gates

The inverse concept — declare what a skill requires to be active

Agent Skills

Learn about the Agent Skills system and how to create SKILL.md files

Skill Management

Manage skills programmatically with the SkillManager API

Doctor CLI

Diagnose skill issues with the doctor command