Skip to content

feat: replace Python skills with Agent Skills standard#55

Merged
fazpu merged 1 commit intomainfrom
feat/agent-skills-standard
Apr 27, 2026
Merged

feat: replace Python skills with Agent Skills standard#55
fazpu merged 1 commit intomainfrom
feat/agent-skills-standard

Conversation

@fazpu
Copy link
Copy Markdown
Member

@fazpu fazpu commented Apr 27, 2026

Summary

Replaces the Python-based skills system with the Agent Skills standard — the same format used by Codex, Claude Code, Gemini CLI, Cursor, Copilot, and 30+ other tools.

What was removed

  • Python module loading (importlib-based .py skill files)
  • Skill dataclass with execute() and parameters_schema
  • SkillContext with read_file/write_file helpers
  • _make_skill_wrapper() and skills-as-tools registration in ToolRegistry
  • ~/.team-harness/skills/ and <cwd>/skills/ scan paths

What was added

  • SkillMetadata dataclass (name, description, path, skill_dir)
  • load_skill_metadata() — discovers SKILL.md files from .agents/skills/ directories
  • YAML frontmatter parsing via pyyaml (name + description)
  • BFS directory scan (max depth 6, max 2000 dirs per root, dotfiles skipped)
  • Parent directory walking from cwd upward (finds repo-root skills from nested dirs)
  • ~/.agents/skills/ for user-global skills (matches Codex convention)
  • _render_skills_section() in the coordinator system prompt
  • 21 test cases covering discovery, frontmatter parsing, validation, edge cases
  • pyyaml>=6.0 as explicit dependency

How it works

Discovery (startup): Scan .agents/skills/ in the cwd and parent directories, then ~/.agents/skills/. Parse only YAML frontmatter (name + description). Project skills override global skills of the same name.

System prompt: Skill names and descriptions are listed under a ## Skills heading with instructions for the coordinator to read the full SKILL.md via its read_file tool when relevant.

Activation: The coordinator decides when to read a skill's full instructions. No special activation machinery — progressive disclosure via the standard file tools.

Cross-tool compatibility: The .agents/skills/ path and SKILL.md format match Codex CLI, so skills are interoperable.

Breaking changes

  • Python .py skill files in ~/.team-harness/skills/ and <cwd>/skills/ are no longer loaded
  • build_system_prompt() skills parameter now expects list[SkillMetadata] (position unchanged)

Files changed (15)

File Change
pyproject.toml Added pyyaml>=6.0
src/team_harness/skills/loader.py Complete rewrite
src/team_harness/skills/__init__.py New exports
src/team_harness/config.py Path: ~/.agents/skills/
src/team_harness/coordinator/system_prompt.py New _render_skills_section()
src/team_harness/harness.py Removed old skills wiring
src/team_harness/cli.py Removed old skills wiring
src/tests/test_skills.py Complete rewrite (21 tests)
src/tests/test_system_prompt.py Updated for new format
src/tests/test_harness.py Updated mocks
src/tests/test_cli.py Updated mocks
src/tests/test_integration.py Updated mocks
src/tests/test_config.py Updated path assertion
README.md New "Agent Skills" section
uv.lock pyyaml lock entry

Test plan

  • 411 tests pass
  • Ruff clean
  • Pyright 0 errors
  • Manual: create .agents/skills/test-skill/SKILL.md and verify discovery in th repl

🤖 Generated with Claude Code

Remove the Python-based skills system (`.py` modules with `execute()`,
`parameters_schema`, `SkillContext`) and replace it with the Agent
Skills standard — SKILL.md files with YAML frontmatter + markdown
instructions that the coordinator reads on demand.

Removed:
- `SkillContext`, `Skill` dataclass, `_make_skill_wrapper()`
- Python module loading via `importlib`
- Skills as callable tools in the ToolRegistry

Added:
- `SkillMetadata` dataclass and `load_skill_metadata()` loader
- YAML frontmatter parsing (name, description) via pyyaml
- BFS discovery from `.agents/skills/` directories (max depth 6)
- Parent directory walking from cwd upward (finds repo-root skills)
- `~/.agents/skills/` for user-global skills
- `_render_skills_section()` in system prompt
- 21 tests covering discovery, parsing, validation, edge cases
- pyyaml>=6.0 as explicit dependency

The `.agents/skills/` path matches the Codex CLI convention, so skills
written for Codex work in team-harness without changes. Progressive
disclosure: only name+description are loaded at startup; the coordinator
reads full SKILL.md content via its read_file tool when needed.

Breaking change: the `skills` parameter of `build_system_prompt()` now
expects `list[SkillMetadata]` instead of a list of Python skill objects.
The parameter name and position are unchanged for backward compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fazpu fazpu merged commit b33fbc5 into main Apr 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant