Revert "feat: skill prerequisites — hide skills with unmet runtime dependencies"

This commit is contained in:
Teknium
2026-03-08 03:58:13 -07:00
committed by GitHub
parent 0df7df52f3
commit b8120df860
17 changed files with 11 additions and 336 deletions

View File

@@ -328,11 +328,6 @@ license: MIT
platforms: [macos, linux] # Optional — restrict to specific OS platforms
# Valid: macos, linux, windows
# Omit to load on all platforms (default)
prerequisites: # Optional — runtime requirements
env_vars: [MY_API_KEY] # Env vars that must be set
commands: [curl, jq] # CLI binaries that must be on PATH
# Skills with unmet prerequisites are hidden
# from the system prompt and flagged in skill_view.
metadata:
hermes:
tags: [Category, Subcategory, Keywords]
@@ -371,25 +366,6 @@ platforms: [windows] # Windows only
If the field is omitted or empty, the skill loads on all platforms (backward compatible). See `skills/apple/` for examples of macOS-only skills.
### Skill prerequisites
Skills can declare runtime prerequisites via the `prerequisites` frontmatter field. Skills with unmet prerequisites are automatically hidden from the system prompt (the agent won't claim it can use them) and show a clear warning in `skill_view()` telling the agent what's missing.
```yaml
prerequisites:
env_vars: [TENOR_API_KEY] # Env vars checked via os.getenv()
commands: [curl, jq] # CLI binaries checked via shutil.which()
```
Both sub-fields are optional — declare only what applies. If the field is omitted entirely, the skill is always available (backward compatible).
**When to declare prerequisites:**
- The skill uses a CLI tool that isn't universally installed (e.g., `himalaya`, `openhue`, `ddgs`)
- The skill requires an API key in the environment (e.g., `NOTION_API_KEY`, `TENOR_API_KEY`)
- Without these, the skill's commands will fail — not just degrade gracefully
See `skills/gifs/gif-search/` and `skills/email/himalaya/` for examples.
### Skill guidelines
- **No external dependencies unless absolutely necessary.** Prefer stdlib Python, curl, and existing Hermes tools (`web_extract`, `terminal`, `read_file`).