MoonshotAI / MoonshotAI/kimi-code
Skill descriptions are truncated mid-sentence in the system prompt
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
What version of Kimi Code is running?
Observed in source at main branch (latest commit at time of report).
Which open platform/subscription were you using?
N/A — issue identified through source-code inspection.
Which model were you using?
N/A.
What platform is your computer?
N/A.
What issue are you seeing?
Built-in skill descriptions are hard-truncated at 250 characters in the model-facing skill listing (${skills} in the system prompt). For example, check-kimi-code-docs renders as:
- check-kimi-code-docs: Answer questions about the Kimi Code product using the official documentation — CLI usage, configuration, slash commands, features, membership and quota, API onboarding, third-party tool setup, and error codes. Use when the user asks how Kimi Code...
The description is cut off mid-sentence, leaving the model without the full usage guidance the skill author intended.
What steps can reproduce the bug?
- Start a session with a default profile.
- Inspect the rendered system prompt (e.g. via
kimi visor~/.kimi-code/sessions/<id>/agents/main/wire.jsonl). - Look at the
# Skills/## Available skillssection. - Note that long descriptions end with
...at exactly 250 characters.
What is the expected behavior?
Skill descriptions should be shown in full, or at least truncated at a higher limit so that built-in skills are not sliced mid-sentence.
Additional information
The truncation happens in packages/agent-core-v2/src/features/skill/catalog/registry.ts:
const LISTING_DESC_MAX = 250;
...
const lines = [`- ${skill.name}: ${truncate(skill.description, LISTING_DESC_MAX)}`];
The test file packages/agent-core-v2/test/features/skill/catalog/registry.test.ts currently encodes the 250-character behavior.
I have a branch ready that raises the limit to 512 and updates the tests.
Contribution
- I am willing to submit a PR for this bug fix myself (please wait for maintainer approval in this issue first)
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 in packages/agent-core-v2/src/features/skill/catalog/registry.ts, where LISTING_DESC_MAX is used to truncate skill descriptions. Review the related expectations in packages/agent-core-v2/test/features/skill/catalog/registry.test.ts and update them for the intended higher limit. Done means long built-in skill descriptions no longer end mid-sentence and the catalog tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100