MoonshotAI / MoonshotAI/kimi-code

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

Open
#243 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Motivation

Many developers use both Claude Code and Kimi Code 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 Code 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 the project config discovery logic 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 the config loading logic (previously kimi_cli/soul/agent.py::load_agents_md() in the old repo). In the new codebase, the equivalent discovery loop should be extended:

# 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 Code.
  • No breaking changes: existing AGENTS.md-only projects behave exactly the same.
  • Low effort, high compatibility value.

I have already tested a similar patch on the legacy kimi-cli package by editing the installed source, and it worked as expected — CLAUDE.md content was correctly injected into the system prompt alongside AGENTS.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

Search the current codebase for the AGENTS.md discovery loop and its related tests or logging. Extend that existing path to cover the listed CLAUDE.md locations while preserving uppercase-over-lowercase precedence and coexistence with AGENTS.md. Done means the relevant tests pass and both configuration sources are merged in the expected order.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.