MoonshotAI / MoonshotAI/kimi-cli
Feature Request: Allow project-level custom system prompt
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 11.4k
- Forks
- 1.3k
- Avg merge
- 9h 47m
- Merged PRs (30d)
- 2
Description
What feature would you like to see?
Allow users to define a custom \system_prompt.md\ at the project level. If the file exists and is valid, it would override the default system prompt.
Suggested behavior:
- Scan for \system_prompt.md\ in the following locations (from project root to current working directory, leaf-most wins):
- .kimi/system_prompt.md\
- .agent/system_prompt.md\
- .claude/system_prompt.md\
- If found, load it through the existing Jinja2 template pipeline so built-in variables like \\ and \\ still work.
- Apply basic validation: non-empty, size limit (e.g. 64 KiB), valid template syntax.
- Existing sessions should continue using their persisted system prompt (from context) to avoid disruption.
Additional information
Kimi models are becoming increasingly capable and can handle a wide range of tasks beyond coding—such as writing lesson plans, financial reports, and creative content. However, the current built-in system prompt is strongly coding-oriented, which limits the CLI's usefulness for these other scenarios.
This would let users tailor the agent's personality and instructions to their specific domain without needing to maintain a full custom agent spec YAML.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing system prompt loading and Jinja2 template pipeline, including how persisted prompts are read from context. Then inspect the project-root locations for .kimi/system_prompt.md, .agent/system_prompt.md, and .claude/system_prompt.md; done means the leaf-most valid file overrides the default while existing sessions retain their persisted prompt.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100