Skip to content

Support disable-model-invocation in skill frontmatter - #592

Merged
alejandro-ao merged 3 commits into
huggingface:mainfrom
rian-dolphin:skill-disable-model-invocation
Aug 17, 2026
Merged

Support disable-model-invocation in skill frontmatter#592
alejandro-ao merged 3 commits into
huggingface:mainfrom
rian-dolphin:skill-disable-model-invocation

Conversation

@rian-dolphin

@rian-dolphin rian-dolphin commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Add support for disable-model-invocation: true in SKILL.md frontmatter. This behavior matches Pi's disableModelInvocation option.

Tau excludes a skill with this flag from the system prompt. The model cannot see the skill or invoke it by itself. The skill stays loaded, and the user can still access it through:

  • explicit /skill:<name> invocation
  • the /skills picker
  • TUI autocomplete

This option is useful for workflows that the user must start. Examples include report generators and release checklists.

---
description: Generate the weekly status report.
disable-model-invocation: true
---

Implementation

  • Add disable_model_invocation: bool = False to Skill.
  • Parse the flag when Tau loads SKILL.md.
  • Accept true without regard to letter case. Treat all other values as false. This behavior matches Pi's strict boolean check without a YAML dependency.
  • Exclude user-only skills in format_skills_for_prompt and build_skill_index.
  • Keep user-only skills available to explicit invocation, resource lists, autocomplete, and reload diagnostics.
  • Include the flag in reload signatures. A flag change now rebuilds the system prompt.
  • Include the flag in the TUI sidebar fingerprint. A flag change now refreshes the skill token estimate.
  • Show a solid bullet () for model-visible skills and a hollow bullet () for user-only skills in the sidebar.

Testing

  • uv run pytest tests/test_tui_app.py — 368 passed.
  • uv run pytest tests/test_skills.py tests/test_system_prompt.py — 29 passed.
  • uv run ruff check src/tau_coding/tui/widgets.py tests/test_tui_app.py — passed.
  • uv run ruff format --check src/tau_coding/tui/widgets.py tests/test_tui_app.py — passed.

Tests cover:

  • flag parsing for set, unset, false, invalid, and mixed-case values
  • prompt filtering with mixed skill visibility
  • explicit invocation of a user-only skill
  • reload detection after a flag change
  • sidebar token refresh after a flag change
  • solid and hollow sidebar bullet indicators

Documentation

  • Update website/content/guides/skills-and-prompts.md with user-only skill instructions.
  • Update src/tau_coding/data/docs/skills.md with the frontmatter option.
  • Update website/content/guides/tui.md with the sidebar bullet meanings.

Relationship to #309

PR #309 by @pedrobruning proposed the same core feature first and deserves credit for the initial implementation. It appears stale, with no review since July. This PR also adds the reload signature fix, packaged documentation, parser edge-case tests, sidebar token refresh, and sidebar visibility indicators.

@rian-dolphin

Copy link
Copy Markdown
Contributor Author

Note on the related PR #309

PR #309 came first and adds the same feature. Credit goes to @pedrobruning for the initial implementation.

That PR did not get a review, and it looks stale. This PR includes the same core changes. It also includes items that PR #309 does not have:

  1. A fix for /reload. The reload signatures in session.py do not include the new flag in PR feat(skills): add disable-model-invocation flag to omit user-only skills from the agent #309. Because of this, a change to disable-model-invocation in SKILL.md does not cause a rebuild of the system prompt. This PR adds the flag to _skill_signatures and _system_prompt_resource_signatures. A regression test shows the correct behavior.
  2. An update to the packaged docs. This PR updates src/tau_coding/data/docs/skills.md. Tau uses this file as its self-knowledge documentation.
  3. More tests for the parser. The tests include an invalid value (yes), an explicit false, and a case-insensitive True.

If the maintainers prefer to continue with PR #309, that is not a problem. The reload fix is small. I can supply it there as a review comment instead.

@rian-dolphin
rian-dolphin force-pushed the skill-disable-model-invocation branch from 917e572 to 23c60a0 Compare August 17, 2026 08:40
Skills with disable-model-invocation: true in SKILL.md frontmatter are
excluded from the system prompt's <available_skills> block, so the model
cannot invoke them on its own. They stay loaded and remain available via
explicit /skill:<name> invocation, the /skills picker, and autocomplete.

Ports Pi's disableModelInvocation behavior. Reload signatures include the
new flag so toggling it in frontmatter triggers a system prompt rebuild.
@rian-dolphin
rian-dolphin force-pushed the skill-disable-model-invocation branch from 23c60a0 to 4bd6d73 Compare August 17, 2026 15:01

@alejandro-ao alejandro-ao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've been meaning to do this for a long time. thanks!

@alejandro-ao
alejandro-ao merged commit aec16bb into huggingface:main Aug 17, 2026
2 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.

2 participants