Skip to content

feat(domain): exclude skills by name via glob patterns - #9

Open
walcz-de wants to merge 1 commit into
mudler:mainfrom
walcz-de:upstream-pr/exclude-skills-by-name
Open

walcz-de wants to merge 1 commit into
mudler:mainfrom
walcz-de:upstream-pr/exclude-skills-by-name

Conversation

@walcz-de

@walcz-de walcz-de commented Oct 2, 2026

Copy link
Copy Markdown

What

Adds an opt-in exclusion list so that a synced repository can be used while a single skill in it stays hidden.

Patterns use path.Match and are matched against the skill name (skill or repoName/skillName). A * does not cross /, so superpowers/* hides a whole repository and */using-* hides matching skills in any repository.

Excluded skills are skipped by ListSkills, and so by the search index and by any system prompt built from the list. They are also skipped by SearchSkills, ReadSkill and the resource methods. Files on disk are not touched, so git pulls keep working.

Why

Git-synced skills are read-only, and deleting files in the clone breaks the next pull. So there was no way to drop one skill and keep the rest of the repository. Our case: a meta-skill that tells the model to invoke a skill before every answer distracted smaller local models in an agent with all skills enabled.

Configuration

  • library: NewFileSystemManager(dir, repos, WithExcludedSkills(...)). Without the option it reads SKILLSERVER_EXCLUDE_SKILLS, so embedders pick up the variable without code changes.
  • CLI: --exclude-skills flag or the SKILLSERVER_EXCLUDE_SKILLS env var (comma-separated).
  • Invalid patterns are rejected at construction. NewFileSystemManager stays source-compatible (variadic options).

README documents the flag and has a new "Excluding Skills" section.

Tests

8 new specs in pkg/domain/exclude_test.go:

  • an excluded skill is not listed, not found by search, and cannot be read;
  • a sibling skill in the same repo still works;
  • files stay on disk;
  • glob patterns work;
  • the default is unchanged;
  • the exclusion survives an index rebuild;
  • invalid patterns are rejected.

With the filter switched off, 5 of them fail. go test ./... passes.

Synced repositories may ship skills that should not be exposed, e.g. a
meta-skill instructing the model to invoke a skill before every answer.
Git skills are read-only and deleting files in the clone breaks the next
pull, so there was no way to drop a single skill while keeping the rest
of the repository.

Add an opt-in exclusion list of path.Match patterns matched against the
skill name (`skill` or `repoName/skillName`). Excluded skills are skipped
by ListSkills (and therefore the search index), SearchSkills, ReadSkill
and the resource methods; files on disk stay untouched.

Configuration:
- library: NewFileSystemManager(dir, repos, WithExcludedSkills(...));
  without the option it reads SKILLSERVER_EXCLUDE_SKILLS, so embedders
  honour the variable without code changes
- CLI: --exclude-skills flag / SKILLSERVER_EXCLUDE_SKILLS env var

NewFileSystemManager stays source-compatible (variadic options); invalid
patterns are rejected at construction.

Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de>
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
walcz-de added a commit to walcz-de/LocalAI that referenced this pull request Oct 2, 2026
cogito d96c205: integration branch fix/walcz-pin-2026-09-28 plus the forced-pick wording fix (mudler/cogito#78).
skillserver f1c4ac8: searcher double-close fix (mudler/skillserver#8) plus exclude skills by name (mudler/skillserver#9).

Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de>
@walcz-de

Copy link
Copy Markdown
Author

Friendly ping on this one. We use SKILLSERVER_EXCLUDE_SKILLS to hide a meta-skill that distracts smaller local models, without disabling the whole repository. If the glob-based approach is not what you want, I can change it to an explicit list.

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