feat(config): mcp.publish_skills flag gating the skill catalogue#289
Open
dripsmvcp wants to merge 1 commit into
Open
feat(config): mcp.publish_skills flag gating the skill catalogue#289dripsmvcp wants to merge 1 commit into
dripsmvcp wants to merge 1 commit into
Conversation
ships kb.list_skills / kb.get_skill — agents enumerate the claude code slash-command and SKILL.md catalogue visible at <kb_root>/.claude/ and ~/.claude/ over mcp, then fetch one body by name (project-local entries override user-global on collision). registered across mcp, jsonl, and the cli (vouch list-skills / vouch get-skill), and in capabilities.METHODS so test_capabilities keeps the surfaces in lockstep. adds the mcp.publish_skills config flag (default true) so existing kbs keep the catalogue. flipping it to false — "company-brain" mode where the catalogue itself is sensitive — makes list_skills return an empty list and get_skill raise permission_denied. the flag is read fresh from config.yaml on every call, so toggling it hides the catalogue without restarting the server, and is surfaced on kb.capabilities.mcp so clients can detect the gate. a kb with no mcp: block stays default-on. closes vouchdev#235
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mcp.publish_skillsconfig flag (defaulttrue) that gates theClaude Code skill / slash-command catalogue over MCP, per feat(config):
mcp.publish_skills: true|false#235.kb.list_skills/kb.get_skill—across MCP, JSONL, and the CLI, since the methods the issue assumes ("just
shipped") were not yet on
test.Root Cause / Context
#235 asks for a gbrain-style
mcp.publish_skillsflag so a "company-brain"deployment can hide the slash-command catalogue, which is itself sensitive.
The flag had nothing to gate on
testyet, so this change brings thediscovery surface and the gate together as one self-contained feature.
Fix
src/vouch/skills.py— discovery of<kb_root>/.claude/and~/.claude/skills/*/SKILL.md+commands/*.md(project overrides user on collision).publish_skills_enabled()readsmcp.publish_skillsfromconfig.yamlfresh on every call; only an explicit
falsedisables.list_skillsreturns
[]when off;get_skillraisesSkillsDisabledError.server.py,jsonl_server.py,capabilities.METHODS,cli.py) sotest_capabilitiesstays in lockstep.SkillsDisabledError->permission_denied; the flag is surfacedon
kb.capabilities.mcp.publish_skills.config.yamlshipsmcp.publish_skills: true; a KB with nomcp:block stays default-on.
Test Plan
tests/test_skills.py(gate on/off, togglewithout restart, jsonl
permission_denied, capabilities reflects flag)pytest tests/ --ignore=tests/embeddings— green (rc=0, UTF-8 locale)ruff check src tests— cleanmypy src— cleanCloses #235