fix(cli): keep built-in skill examples inert - #12926
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge lgtm Files Reviewed (3 files)
Reviewed by kimi-k3 · Input: 69.1K · Output: 9.4K · Cached: 585.7K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
August 6, 2026 07:11
chrarnoldus
approved these changes
Aug 6, 2026
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
fix(cli): keep built-in skill examples inert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Built-in skills can contain documentation examples using the shell placeholder syntax
!cmd``. Loading the built-inkilo-configskill incorrectly treated the documented placeholder as a live shell command and requested permission to run `cmd`.The failure was especially confusing with auto-approve enabled because genuine model-triggered skill shell commands intentionally require an interactive human approval. The permission card was caused by a false-positive command match, not by the PR workflow prompt or a broken auto-approve setting.
Reproduction
In a fresh Agent Manager session, send:
Before this change, loading the skill displayed:
Approving the request then produced:
Cause
The existing skill-shell protection correctly recognizes Markdown fenced blocks and inline code spans for filesystem-backed
SKILL.mdfiles. The built-inkilo-config.mdfile was imported through Bun's default Markdown loader, which converted it to HTML before shell-placeholder scanning. The inert Markdown delimiters were therefore gone, while the placeholder text remained, so the scanner sawcmdas executable.The prior regression coverage used raw filesystem Markdown and did not exercise the built-in import representation.
Fix
Import the built-in skill as raw text so it reaches the existing inert-range scanner as Markdown. The scanner can then preserve both fenced examples and inline examples while continuing to execute genuine live
!command`` placeholders under the existing human approval policy.The built-in skill integration test now verifies that the literal example remains unchanged, no shell failure is inserted, and loading the skill requests only the normal skill permission, never bash permission.
User-visible result
The reproduction prompt now completes with:
No shell permission card is shown and
cmdis not executed.