fix(skill): ignore stray markdown in plugins container during skill discovery#2514
Open
nitishagar wants to merge 1 commit into
Open
fix(skill): ignore stray markdown in plugins container during skill discovery#2514nitishagar wants to merge 1 commit into
nitishagar wants to merge 1 commit into
Conversation
…iscovery Plugins are documented (customization/plugins.md) as independent subdirectories containing plugin.json + scripts, but the generic flat-.md discovery pass was applied to the plugins container too, leaking stray packaging markdown (CHANGELOG.md, README.md) at ~/.kimi/plugins/ as skills. Add a per-root skip_flat_md flag, set True only for the plugins origin, so only the subdirectory form (<plugin>/SKILL.md) is honored there. Non-plugin roots keep flat-.md support. Closes MoonshotAI#2491
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
plugin.jsonand its tool scripts — not as a flat-.mdskills directory. Flat-.mdskill discovery is a generic-skills-root feature documented separately in customization/skills.md for~/.kimi/skillsand the like..mddiscovery pass was also applied to the plugins container (~/.kimi/plugins/), so any stray markdown (a packaging-artifactCHANGELOG.mdorREADME.mddropped at the container level) was discovered as a skill and appeared in/skillautocomplete.skip_flat_mdflag (setTrueonly for the plugins origin) so only the subdirectory form (<plugin>/SKILL.md) is honored there. Non-plugin roots keep flat-.mdsupport.Reproduction
A stray
CHANGELOG.mdplaced directly in~/.kimi/plugins/(as a sibling of plugin subdirectories) was discovered as a flat skill namedCHANGELOG. After this fix it is ignored, while<plugin>/SKILL.mdcontinues to be discovered.Notes on the reporter's environment
The reporter (CLI 0.23.5) saw
CHANGELOGin/skillautocomplete after installingkimi-datasource. The currentinstall_pluginpath placesCHANGELOG.mdinside the plugin subdir (where the non-recursive scan never sees it), so the reporter's exact trigger was likely a manual unzip, an older install path, or a different plugin whose zip extracts flat. This fix is defensive hardening of the plugins origin so that only plugin subdirectories (each an independent unit per plugins.md) contribute skills, regardless of how stray markdown reaches the container level.Closes #2491