Skip to content

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

@dmorsin

Description

@dmorsin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions