Skip to content

feat(skill): add hidden frontmatter field to skills#29193

Open
phalla-doll wants to merge 2 commits into
anomalyco:devfrom
phalla-doll:feat/skill-hidden-field
Open

feat(skill): add hidden frontmatter field to skills#29193
phalla-doll wants to merge 2 commits into
anomalyco:devfrom
phalla-doll:feat/skill-hidden-field

Conversation

@phalla-doll
Copy link
Copy Markdown

@phalla-doll phalla-doll commented May 25, 2026

Issue for this PR

Closes #29189

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a hidden boolean field to skill frontmatter, mirroring the existing AgentConfig.hidden field for agents.

Users with many project skills see all of them surfaced in the LLM tool description (<available_skills>) on every turn. This clutters context and wastes tokens for skills that should only be invoked manually. hidden: true keeps the skill registered and loadable by name, just not proactively suggested.

Changes in packages/opencode/src/skill/index.ts:

  1. Info schema — added hidden: Schema.optional(Schema.Boolean)
  2. isSkillFrontmatter guard — accepts hidden?: boolean
  3. add() function — stores hidden from parsed frontmatter
  4. available() method — filters out skills where hidden === true

How did you verify your code works?

Verified manually by reviewing the code paths:

  • skill.available() (used by tool description) now filters hidden skills
  • skill.all() (used by /skills dialog and server API) remains unchanged — hidden skills are still browseable
  • skill.require() (used by skill tool) remains unchanged — hidden skills are still loadable by name
  • TUI / autocomplete already skips skills (unrelated to this change)

Full typecheck requires the project tsgo toolchain which is not available outside the CI environment.

Screenshots / recordings

N/A — no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Add a hidden boolean field to skill frontmatter, mirroring the existing
AgentConfig.hidden field. Skills with hidden: true are excluded from the
LLM tool description (available_skills) but remain accessible via the
/skills dialog and the skill tool for manual invocation.

Closes anomalyco#29189
@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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.

[FEATURE]: Add hidden frontmatter field to skills (like agents have)

1 participant