Skip to content

feat(ox-core): add deterministic auto-loaded skills with matchers and role metadata - #981

Merged
hakula139 merged 1 commit into
mainfrom
feat/auto-loaded-skills
Dec 1, 2026
Merged

hakula139 merged 1 commit into
mainfrom
feat/auto-loaded-skills

Conversation

@hakula139

Copy link
Copy Markdown
Member

Summary

  • Extend SKILL.md frontmatter parsing in ox-core::skills with activation (on_demand default or always), on_files and on_tools comma-separated glob matchers, and optional agent role metadata (model, tools).
  • Expose pub(crate) fn glob_matches from ox-core::hooks and reuse it for deterministic skill file and tool matching.
  • Wire SkillRegistry into Agent via Agent::with_skills: inject activation: always skills into the system prompt at session start and inject matching on_files / on_tools skills at the PreToolUse stage, tracking loaded_skills so each skill is injected at most once per session.
  • Document the new frontmatter fields and auto-loading lifecycle in docs/reference/skills.md.

Test plan

  • nix develop -c run-hooks (all formatting, spelling, markdownlint, and clippy hooks passed)
  • nix develop -c cargo llvm-cov --workspace --show-missing-lines (skills.rs: 98.36% lines, agent.rs: 96.89% lines, workspace total: 94.84% lines)
  • nix develop -c cargo doc --no-deps

Related

@hakula139 hakula139 added this to the v0.2.0-plugins milestone Dec 1, 2026
@hakula139 hakula139 added enhancement New capability area: extensions Touches hooks, skills, packages, or MCP integration labels Dec 1, 2026
@hakula139 hakula139 self-assigned this Dec 1, 2026
@codecov

codecov Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 18 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/ox-core/src/agent.rs 94.23% 18 Missing ⚠️

📢 Thoughts on this report? Let us know!

@hakula139
hakula139 force-pushed the feat/auto-loaded-skills branch 2 times, most recently from 482e3bc to e0ceef6 Compare December 1, 2026 10:51
@hakula139
hakula139 force-pushed the feat/auto-loaded-skills branch from e0ceef6 to 526a1c2 Compare December 1, 2026 10:53
@hakula139
hakula139 merged commit b98ba78 into main Dec 1, 2026
7 checks passed
@hakula139
hakula139 deleted the feat/auto-loaded-skills branch December 1, 2026 11:10
@github-project-automation github-project-automation Bot moved this from Todo to Done in Oxide Code Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: extensions Touches hooks, skills, packages, or MCP integration enhancement New capability

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Deterministic auto-loaded skills with matchers and unified instruction and role model

1 participant