Skip to content

feat: add built-in update-config skill - #433

Merged
liruifengv merged 2 commits into
mainfrom
feat/update-config-skill
Jun 4, 2026
Merged

feat: add built-in update-config skill#433
liruifengv merged 2 commits into
mainfrom
feat/update-config-skill

Conversation

@liruifengv

Copy link
Copy Markdown
Collaborator

Related Issue

No linked issue — the problem is explained below.

Problem

Editing kimi-code's own configuration (config.toml and tui.toml) by hand is error-prone: a malformed TOML file silently disables every setting in it, and rewriting a file from scratch can drop existing entries, comments, or formatting. There was no guided, safe path for letting Kimi edit its own config.

What changed

Adds a built-in, inline update-config skill so a user can ask Kimi to inspect or edit its own config files. The skill:

  • Treats the official config docs as the single source of truth (fetched via FetchURL) and reads the target file before any change.
  • Edits a copy (cp to a *-new candidate, then Edit) instead of rewriting from scratch, so existing sections, entries, and comments are preserved.
  • Validates the candidate with kimi doctor before overwriting, takes a timestamped backup, then swaps it in.
  • Tells the user which reload command applies (/reload for config.toml, /reload-tui for tui.toml).

Also documents tui.toml on the config files page (en + zh).

Note: the validation step uses the kimi doctor command, which lands in a separate change — merge order should ensure kimi doctor is available before this skill ships.

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked a related issue, or explained the problem above.
  • I have added tests that prove my feature works.
  • Ran gen-changesets skill, or this PR needs no changeset.
  • Ran gen-docs skill, or this PR needs no doc update.

Inline, model-invocable skill to inspect and safely edit kimi-code's own config.toml and tui.toml (copy to a candidate, Edit, validate with kimi doctor, timestamped backup, then overwrite). Also documents tui.toml on the config files page (en + zh).
@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5904cc7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@moonshot-ai/agent-core Minor
@moonshot-ai/kimi-code Minor
@moonshot-ai/acp-adapter Patch
@moonshot-ai/migration-legacy Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 4, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@5904cc7
npx https://pkg.pr.new/@moonshot-ai/kimi-code@5904cc7

commit: 5904cc7

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c36f6d37d5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/agent-core/src/skill/builtin/update-config.md
Comment thread packages/agent-core/src/skill/builtin/update-config.md
Comment thread packages/agent-core/src/skill/builtin/update-config.md
Comment thread packages/agent-core/src/skill/builtin/update-config.md
@liruifengv
liruifengv merged commit 85338e9 into main Jun 4, 2026
8 checks passed
@liruifengv
liruifengv deleted the feat/update-config-skill branch June 4, 2026 13:41
@github-actions github-actions Bot mentioned this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant