Quick Start
How It Works
| Component | Purpose |
|---|---|
| SkillRequirements | Parsed requirements from frontmatter |
| CapabilityValidator | Validates skills against available capabilities |
| ValidationResult | Per-skill validation status and details |
| EnforcementLevel | Controls strictness of requirement checking |
Frontmatter Reference
All frontmatter keys are optional and backward-compatible. Existing skills without requirements are unaffected.| Frontmatter Key | Aliases | Type | Maps to |
|---|---|---|---|
requires_tools | requires-tools | list[str] or string | SkillRequirements.tools |
requires_servers | requires-servers | list[str] or string | SkillRequirements.servers |
requires_env | requires-env | list[str] or string | SkillRequirements.env_vars |
allowed-tools | — | list[str] or string | Also appended to tools (backward compat) |
openclaw | — | dict | SkillRequirements.openclaw_hints (passthrough) |
fallback_for_tools | fallback-for-tools | list[str] or string | SkillRequirements.fallback_for_tools |
fallback_for_servers | fallback-for-servers | list[str] or string | SkillRequirements.fallback_for_servers |
requires_tools: "pdf_read, ocr_extract" and requires_tools: "pdf_read ocr_extract" work. The same normalization applies to fallback_for_tools and fallback_for_servers.
Graceful Fallback Skills
fallback_for_tools / fallback_for_servers let a skill stay hidden until the agent is missing the capability it covers.
SKILL.md frontmatter:
Behaviour
web_search present | terminal present | web-via-terminal offered? |
|---|---|---|
| ✅ | ✅ | ❌ (hidden — capable agent doesn’t need fallback) |
| ❌ | ✅ | ✅ (fallback fires) |
| ❌ | ❌ | ❌ (own requires_tools: [terminal] unmet) |
| ✅ | ❌ | ❌ (capability already present) |
A fallback skill’s own
requires_* gates are always enforced, regardless of the enforcement level. An unusable fallback is never injected into the agent’s context.When to Use fallback vs. requires
Skill Discovery Sequence
The validator evaluates bothavailable_tools / available_servers for the keep-or-hide decision and the fallback skill’s own requires_* gates before injecting it.
Skill States
| State | Meaning | Behavior |
|---|---|---|
| ACTIVE | All requirements satisfied | Skill fully available |
| DEGRADED | Some requirements missing (env vars) | Skill available with warnings |
| UNAVAILABLE | Critical requirements missing (tools/servers) | Under strict mode, excluded from picker |
| UNKNOWN | Not yet validated | Initial state before validation |
Enforcement Levels
| Level | Value | Behavior | Logging |
|---|---|---|---|
| DISABLED | "disabled" | No enforcement (legacy behavior) | None |
| TELEMETRY | "telemetry" | Log-only, no blocking | Debug/warn |
| WARN | "warn" | Default — surface warnings, allow activation | Warning |
| STRICT | "strict" | Hard fail — skills in UNAVAILABLE state excluded from system prompt | Error |
Configuration
Environment Variable
Programmatic Configuration
Diagnostics from Code
Basic Validation
Full Diagnostics
Filter Skills by State
CLI Diagnostics
Basic Skills Check
Detailed Requirements Check
Common Patterns
Terminal-based Web Fallback
Local-file Fallback for Absent MCP Server
Soft-warn in Dev, Strict in Prod
Add Tool Requirement to Existing Skill
Filter to Active-Only Skills for System Prompt
Best Practices
Prefer requires_tools over allowed-tools for new skills
Prefer requires_tools over allowed-tools for new skills
Use the new
requires_tools frontmatter key for better validation:Use requires_env sparingly (prefer tool-level auth)
Use requires_env sparingly (prefer tool-level auth)
Minimize environment variable dependencies:
Default to warn in development, strict in production
Default to warn in development, strict in production
Configure appropriate enforcement levels:
Use fallback_for_* for graceful degradation, not as a feature switch
Use fallback_for_* for graceful degradation, not as a feature switch
Fallback skills disappear automatically when the real capability is present; they are not a runtime toggle. If you need a user-controlled switch, gate the skill with
requires_env on a feature-flag env var instead.Cache validation results (validator already caches; document clear_cache())
Cache validation results (validator already caches; document clear_cache())
Validation results are automatically cached for performance:
Inverse: Graceful Fallback
fallback_for_tools and fallback_for_servers are the inverse of requires_* — a skill with these keys is offered only when the listed tool or server is absent.
| Key | Behaviour |
|---|---|
requires_tools | Skill needs these tools to be active |
fallback_for_tools | Skill is hidden when any of these tools is present |
Related
Skill Fallback
The inverse — offer a skill only when a tool or server is absent
Agent Skills
Learn about the Agent Skills system and how to create skills
Graceful Skill Fallback
Offer fallback skills only when a preferred capability is absent
Hermes/OpenClaw Import
Import skills from Hermes and OpenClaw with capability requirements
Skill Management
Manage skills programmatically with the SkillManager API
Doctor CLI
Use the doctor command to diagnose skill capability issues

