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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 11 additions and 336 deletions

View file

@ -170,22 +170,6 @@ def _skill_is_platform_compatible(skill_file: Path) -> bool:
return True # Err on the side of showing the skill
def _skill_prerequisites_met(skill_file: Path) -> bool:
"""Check if a SKILL.md's declared prerequisites are satisfied.
Returns True (show the skill) when prerequisites are met or not declared.
Returns False when the skill explicitly declares prerequisites that are missing.
"""
try:
from tools.skills_tool import _parse_frontmatter, check_skill_prerequisites
raw = skill_file.read_text(encoding="utf-8")[:2000]
frontmatter, _ = _parse_frontmatter(raw)
met, _ = check_skill_prerequisites(frontmatter)
return met
except Exception:
return True
def build_skills_system_prompt() -> str:
"""Build a compact skill index for the system prompt.
@ -207,9 +191,6 @@ def build_skills_system_prompt() -> str:
# Skip skills incompatible with the current OS platform
if not _skill_is_platform_compatible(skill_file):
continue
# Skip skills whose prerequisites (env vars, commands) are unmet
if not _skill_prerequisites_met(skill_file):
continue
rel_path = skill_file.relative_to(skills_dir)
parts = rel_path.parts
if len(parts) >= 2: