Skip to content

feat(skills): add disable-model-invocation flag to omit user-only skills from the agent#309

Open
pedrobruning wants to merge 5 commits into
huggingface:mainfrom
pedrobruning:feat/skill-disable-model-invocation
Open

feat(skills): add disable-model-invocation flag to omit user-only skills from the agent#309
pedrobruning wants to merge 5 commits into
huggingface:mainfrom
pedrobruning:feat/skill-disable-model-invocation

Conversation

@pedrobruning

Copy link
Copy Markdown

Motivation

Every loaded skill is currently advertised to the model in the system prompt's
<available_skills> block, so the model may proactively read and apply any
skill. Some skills should be user-only — invocable explicitly via
/skill:<name> but never surfaced to (or auto-triggered by) the model. This is
important for skills with side effects (releases, deployments, messaging) or
workflows that should only run when the user asks for them.

Changes

  • Add a disable_model_invocation field to the Skill dataclass, parsed from a
    disable-model-invocation: true frontmatter key in SKILL.md
    (src/tau_coding/skills.py).
  • Filter skills with the flag out of format_skills_for_prompt() so they never
    appear in the system prompt (src/tau_coding/system_prompt.py), and out of
    build_skill_index() for consistency.
  • User invocation is unchanged: expand_skill_command() looks skills up from the
    full loaded set, so /skill:<name> still expands a disabled skill.
  • Document the new frontmatter key with an example under
    website/content/guides/skills-and-prompts.md.

Behavior

Skill frontmatter Listed in system prompt /skill:<name> works
(none) yes yes
disable-model-invocation: true no yes
disable-model-invocation: false yes yes

A skills directory containing only disabled skills yields no <available_skills>
block at all.

Tests / checks

Built TDD-first (red → green) with atomic commits. Added focused tests in
tests/test_skills.py (frontmatter parsing, /skill: still expands disabled
skills, index omission) and tests/test_system_prompt.py (prompt exclusion,
all-disabled → no section).

  • uv run pytest — 710 passed
  • uv run ruff check . — passed
  • uv run ruff format --check . — passed
  • uv run mypy — no issues

Compatibility

Backward compatible. The new field defaults to False, so existing skills with
no frontmatter key behave exactly as before.

@pedrobruning
pedrobruning force-pushed the feat/skill-disable-model-invocation branch from eb1d233 to 086740b Compare July 8, 2026 14:46
  Skills marked with `disable-model-invocation: true` remain loadable and
  user-invocable via /skill:name, but are omitted from the model-facing
  skill index.
   Skills with disable-model-invocation set are filtered out of the
   <available_skills> block so the model never auto-triggers them.
@pedrobruning
pedrobruning force-pushed the feat/skill-disable-model-invocation branch from 086740b to eba02c8 Compare July 9, 2026 12:43
@pedrobruning pedrobruning changed the title feat(skills): add disable-model-invocation frontmatter flag feat(skills): add disable-model-invocation flag to omit user-only skills from the agent Jul 9, 2026
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