kimi-cli icon indicating copy to clipboard operation
kimi-cli copied to clipboard

Feature Request: Support loading CLAUDE.md alongside AGENTS.md for Claude Code compatibility

Open JIRBOY opened this issue 6 months ago • 0 comments

Motivation

Many developers use both Claude Code and Kimi Code CLI in their workflow. Projects that have been working with Claude Code often already contain a CLAUDE.md file (or .claude/CLAUDE.md) with project-specific instructions, coding styles, and context.

Currently, Kimi CLI only discovers AGENTS.md files. This means users must either:

  • Duplicate their CLAUDE.md content into AGENTS.md, or
  • Maintain two separate config files that can easily drift out of sync.

Request

Please extend load_agents_md() in kimi_cli/soul/agent.py to also discover and merge CLAUDE.md files, using the same discovery logic as AGENTS.md:

Priority Path
1 .claude/CLAUDE.md
2 CLAUDE.md
3 claude.md

Within a single directory, CLAUDE.md and claude.md should be mutually exclusive (uppercase wins), and co-exist with any AGENTS.md in the same directory. This ensures Kimi-native configs always take precedence while still picking up existing Claude configs.

Proposed Implementation

The change is localized to kimi_cli/soul/agent.py::load_agents_md():

# Inside the directory loop, after collecting AGENTS.md candidates:
claude_dir_path = d / ".claude" / "CLAUDE.md"
claude_candidates = [d / "CLAUDE.md", d / "claude.md"]

if await claude_dir_path.is_file():
    candidates.append(claude_dir_path)
for cc in claude_candidates:
    if await cc.is_file():
        candidates.append(cc)
        break

And update the docstring + log messages accordingly.

Benefits

  • Zero-friction migration from Claude Code to Kimi CLI.
  • No breaking changes: existing AGENTS.md-only projects behave exactly the same.
  • Low effort, high compatibility value.

I have already tested this patch locally by editing the installed package, and it works as expected — CLAUDE.md content is correctly injected into the system prompt alongside AGENTS.md.

JIRBOY avatar May 30 '26 09:05 JIRBOY