MoonshotAI / MoonshotAI/kimi-cli

Agent ignores available skills and falls back to raw shell commands due to missing auto-trigger mechanism

Open
#2,399 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
11.4k
Forks
1.3k
Avg merge
9h 47m
Merged PRs (30d)
2

Description

What version of Kimi Code CLI is running?

kimi, version 1.46.0

Which open platform/subscription were you using?

kimi code

Which model were you using?

kimi-for-coding

What platform is your computer?

Linux 6.19.11-100.fc42.x86_64 x86_64 unknown

What issue are you seeing?

The LLM agent systematically bypasses installed skills and executes raw shell commands directly, even when a dedicated skill exists for the exact task. Specifically, the recoll-search skill (which provides a wrapper script recoll_query.py for searching local Recoll-indexed documents and email) is never utilized. Instead, the agent opens the Shell tool and runs low-level recollq CLI commands manually, processing raw output instead of using the skill's structured wrapper.

This is a framework-level tool-selection failure. The agent fails to recognize that a higher-level abstraction (skill) is available and defaults to primitive shell execution.

What steps can reproduce the bug?
  1. Ensure recoll-search skill is installed at ~/.kimi/skills/recoll-search/.
  2. User asks a query that clearly falls within the skill's domain, e.g.:
    "Has anyone written to me about X?" (implying search in local mail/documents).
  3. Observe that the agent does not invoke the recoll-search skill or its recoll_query.py script.
  4. The agent instead executes:
    which recollq && recollq -m "..." directly via the Shell tool.
  5. The agent manually parses raw recollq output instead of using the skill's formatted output, --dump capability, or other skills for processing documents.

Session context: The skill's SKILL.md contains a whenToUse description, but no machine-parseable triggers field. The LLM must voluntarily discover and load the skill from passive context, which it fails to do.

What is the expected behavior?

When a user query semantically matches a skill's domain (e.g., searching local mail, documents, or archives), the framework should automatically activate the relevant skill before invoking the LLM planning step. This ensures the agent uses the skill's optimized tools (e.g., recoll_query.py) instead of falling back to raw shell commands.

Specifically:

  • The framework should parse SKILL.md frontmatter for trigger keywords.
  • On keyword match, the skill should be pre-loaded into the active context (or its tools filtered to the top of the registry).
  • The agent should then use proper tool with proper flags rather than manual recollq invocation.
Additional information

The current architecture relies entirely on the LLM to voluntarily discover and use skills from passive context. This fails due to:

  1. Cognitive context overload: With many tools available, the LLM ignores passive skill descriptions
  2. No auto-trigger mechanism: Unlike Hermes Agent's proposed triggers field in SKILL.md, Kimi CLI has no keyword-based pre-loading. The SKILL.md only contains human-readable whenToUse text, not machine-parseable triggers.

Proposed Fix
Add a triggers field to SKILL.md

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how installed skills and their SKILL.md metadata are discovered and loaded before the LLM planning step. Compare the recoll-search SKILL.md and its recoll_query.py wrapper with the current Shell-tool path. Done means matching queries activate the skill automatically and avoid direct recollq execution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.