fix(cli): stop inline skill-shell doc examples from triggering permission prompts - #12802
Merged
Merged
Conversation
| }), | ||
| ) | ||
|
|
||
| unix("does not let distant unrelated inline code spans merge into one inert range", () => |
Collaborator
There was a problem hiding this comment.
What about windows? Is this a unix only fix?
Collaborator
Author
There was a problem hiding this comment.
The underlying fix is cross-platform. Only the tests that also exercise real process spawning (such as the one above) are unix-only.
marius-kilocode
approved these changes
Aug 3, 2026
Contributor
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Resolved since last review
Files Reviewed (2 files)
Fix these issues in Kilo Cloud Previous Review Summary (commit 5bd420a)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 5bd420a)Status: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (3 files)
Reviewed by claude-opus-5 · Input: 30 · Output: 11.9K · Cached: 812.3K Review guidance: REVIEW.md from base branch |
bagatao-anaconda
enabled auto-merge
August 3, 2026 11:15
…rg/kilocode into fix/skill-shell-inline-code-spans
This was referenced Aug 5, 2026
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
…e-code-spans fix(cli): stop inline skill-shell doc examples from triggering permission prompts
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.
Issue
No tracked issue; found and fixed while testing skill-shell command execution.
Context
Loading a skill whose
SKILL.mddocuments the!cmdplaceholder syntax inline (e.g.!cmd``, the standardCommonMarkway to show a literal single backtick) triggered a real bash permission prompt for that documentation text. `SkillInject.render` only treated fenced code blocks as inert; it had no concept of inline code spans, so the built-in `kilo-config` skill's own docs false-positived on every load.Implementation
Extended the inert-range check to also cover inline code spans of 2+ backticks: a single-backtick span can never contain a backtick, so a single-backtick pair nested inside a longer run is always documentation, never a live placeholder.
Pairing is scoped to one blank-line-delimited paragraph at a time (
CommonMarkspans can't cross a blank line) using a single-pass map, with a binary-searched fence lookup.Both issues were caught in local review, reproduced, and fixed before this PR; regression tests cover each.
Screenshots / Video
N/A — no UI change (CLI-only classification logic).
How to Test
Manual/local verification
!cmdplaceholder alongside an inline!cmd`` doc example; confirmed only the live command prompted/executed and the example stayed literal text.Reviewer test steps
packages/opencode/, runbun test ./test/kilocode/skills/inject.test.ts ./test/tool/skill.test.ts— 22 tests pass, including the inline-example, cross-paragraph, and quadratic-scaling regressions.bun run typecheck— clean.kilo-configskill and confirm noBashpermission card appears.