Skip to content

feat: SKILL.md support — tole reads and uses agent skills (+ first-party usage skill) #161

Closed

Description

@ajianaz

What (description of the change)

Skill support: tole can read and use SKILL.md files — the fleet-standard agent-skill format (YAML frontmatter name/description + markdown instructions) — via three layered mechanisms, plus ship a first-party usage skill in this repo.

New flag: --skill <path> (repeatable) — loads one SKILL.md into the system prompt (appended after the default prompt inside a clearly marked fenced section # Skill: <name>, with a 16 KiB per-skill cap). Deterministic, always-in-context.

New ReadOnly tool: load_skill — when a skills directory is available, the model sees a one-line skills index in the system prompt ("skills available: name — description") and calls load_skill { name } on demand; the full skill body is returned as tool output (same 32 KiB cap as other tool results, untrusted-content fencing applies). On-demand keeps large libraries from burning context.

Skill resolution order (first match wins, consistent with the CodeCora data convention validated against cora-code's data_dir.rs and uteke's ~/.codecora/uteke/):

  1. ./skills/<name>/SKILL.md — project-level (in the workspace)
  2. $CODECORA_HOME/tole/skills/<name>/SKILL.md → ~/.codecora/tole/skills/ (user-global; honors the CODECORA_HOME override exactly like cora-code)

Auto-discovery: at startup, if any skills directory exists and is non-empty, the system prompt gains the skills index line (same pattern as the cora MCP auto-preset: capability announced, model decides). --no-skills disables everything; no directories → byte-identical behavior.

First-party adoption skill: skills/tole-usage/SKILL.md lands in this repo — teaching other agents (Hermes, Claude Code, any SKILL.md reader) how to drive tole: run/chat/resume, serve + MCP, acp, trust presets, memory loop, sessions/recovery. Generated content is hand-written once and validated against the binary's --help in CI-lite fashion (a unit test greps the flags it documents).

Why (the problem you're solving)

Today the only instruction channel is --system/default prompt — there is no standard way to hand tole reusable procedural knowledge, and no standard artifact for OTHER agents to learn how to use tole. SKILL.md is the format the CodeCora fleet (and the wider agent ecosystem) already uses; adopting it makes tole both a skill CONSUMER and a skill PROVIDER, following the same convention cora-code and uteke established for data (~/.codecora/{product}/).

Testing (how you verified this works)

  • Unit: skill parsing (frontmatter required, name/dirname match), resolution order (project beats user, CODECORA_HOME honored), index rendering, 16 KiB cap, --no-skills short-circuit.
  • Integration: load_skill tool registered only when a skills dir exists; unknown name error lists available skills; empty-prompt-array style misuse rejected.
  • Live E2E: repo's own skills/tole-usage/ discovered at startup, model calls load_skill when asked "how do I resume a crashed session", answer matches the skill body.
  • Suites green both profiles; clippy -D warnings; cora review; no new deps.

Activity

  1. added
    enhancement
    tools
    on Oct 2, 2026
  2. ajianaz commented on Oct 2, 2026

    @ajianaz
    ContributorAuthor

    Shipped in #162 (merged f-sha): --skill files, skills discovery + load_skill tool (project /skills/ beats user ~/.codecora/tole/skills/, CODECORA_HOME honored), --no-skills, and the first-party skills/tole-usage/SKILL.md for adopters. Live E2E: load_skill answered from the skill body; --skill file landed in the system prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementtools

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions