Skip to content

fix(skill): ignore stray markdown in plugins container during skill discovery#2514

Open
nitishagar wants to merge 1 commit into
MoonshotAI:mainfrom
nitishagar:fix/2491-plugin-skill-discovery
Open

fix(skill): ignore stray markdown in plugins container during skill discovery#2514
nitishagar wants to merge 1 commit into
MoonshotAI:mainfrom
nitishagar:fix/2491-plugin-skill-discovery

Conversation

@nitishagar

@nitishagar nitishagar commented Jul 19, 2026

Copy link
Copy Markdown

Summary

  • Plugins are documented (customization/plugins.md) as independent subdirectories — each containing a plugin.json and its tool scripts — not as a flat-.md skills directory. Flat-.md skill discovery is a generic-skills-root feature documented separately in customization/skills.md for ~/.kimi/skills and the like.
  • However, the generic flat-.md discovery pass was also applied to the plugins container (~/.kimi/plugins/), so any stray markdown (a packaging-artifact CHANGELOG.md or README.md dropped at the container level) was discovered as a skill and appeared in /skill autocomplete.
  • This adds 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.

Reproduction

A stray CHANGELOG.md placed directly in ~/.kimi/plugins/ (as a sibling of plugin subdirectories) was discovered as a flat skill named CHANGELOG. After this fix it is ignored, while <plugin>/SKILL.md continues to be discovered.

Notes on the reporter's environment

The reporter (CLI 0.23.5) saw CHANGELOG in /skill autocomplete after installing kimi-datasource. The current install_plugin path places CHANGELOG.md inside 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


Open in Devin Review

…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

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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.

Bug: kimi-datasource CHANGELOG.md incorrectly listed as a skill

1 participant