feat(skill): config option to control which default skill directories are scanned#1540
Open
juev wants to merge 1 commit into
Open
feat(skill): config option to control which default skill directories are scanned#1540juev wants to merge 1 commit into
juev wants to merge 1 commit into
Conversation
…directories MiMo-Code scans ~/.claude, ~/.agents, ~/.codex and ~/.opencode (plus their project-local counterparts) for skills. When several agent tools are installed side by side, same-name skills collide and which copy wins is effectively random from the user's point of view. The only way to turn a source off was an environment variable, and .agents had no switch at all. Add an optional skills.sources map to the config schema with one boolean per source: builtin, compose, claude, agents, codex, opencode. Every key defaults to true, so existing setups are unaffected. Disabling a source skips both its global and project-local directories. The existing MIMOCODE_DISABLE_* environment variables keep working and take precedence over the config. Also document the .codex skill locations that were already scanned but missing from the skills docs.
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.
Issue for this PR
Fixes #1561
Type of change
What does this PR do?
On startup MiMo-Code scans the skill directories of other agent tools:
~/.claude,~/.agents,~/.codexand~/.opencode, plus their project-local counterparts. That is convenient, but on a machine where several of these tools are installed side by side it causes a real problem: two tools often ship a skill with the same name, and which copy wins depends on scan order. The duplicate only shows up as a log warning, so from the user's point of view the result looks random. Today the only way to turn a source off is an environment variable, and the.agentsdirectory has no switch at all.This PR adds a
skills.sourcessection to the config, one boolean per source:{ "skills": { "sources": { "claude": false, "codex": false } } }Available keys are
builtin,compose,claude,agents,codexandopencode. Every key defaults totrue, so nothing changes for existing setups — you only list the sources you want off. Disabling a source skips both its home-directory and project-local variants, because a half-disabled source would still produce the same name collisions. The existingMIMOCODE_DISABLE_*environment variables keep working and win over the config: they could only ever disable things, so an env-disabled source stays off no matter what the config says. Adding custom directories was already possible throughskills.paths, so this PR deliberately does not duplicate that.The docs page for skills got a new "Control skill sources" section, and while writing it I noticed the
.codexlocations were scanned by the code but missing from the docs, so they are listed now too.One thing I intentionally left out: regenerating the JS SDK types. Running the SDK build script on a clean
mainalready produces ~700 lines of unrelated churn (the checked-in generated file is behind the current OpenAPI output), and I did not want to bury a small feature in that. If you'd rather have the regen included here, say the word.How did you verify your code works?
Followed TDD: added five tests to the skill test suite first (disable
.claude,.codex,.agentsat project level, disable.claudeat the global home level, and one making sure an unrelatedsourcesentry does not affect other sources), watched four of them fail, then implemented the change and watched all of them pass. Full skill suite (18 tests), the config test suite andbun typecheckacross all packages pass. Also verified manually that with nosourcessection behavior is byte-for-byte the old one, since every check defaults to enabled.Screenshots / recordings
Not a UI change.
Checklist