Skip to content

fix(cli): keep built-in skill examples inert - #12926

Merged
marius-kilocode merged 1 commit into
mainfrom
encouraging-pantydraco
Aug 6, 2026
Merged

fix(cli): keep built-in skill examples inert#12926
marius-kilocode merged 1 commit into
mainfrom
encouraging-pantydraco

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Problem

Built-in skills can contain documentation examples using the shell placeholder syntax !cmd``. Loading the built-in kilo-config skill 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:

Load the built-in kilo-config skill, then reply with exactly LOADED. Do not use any other tools.

Before this change, loading the skill displayed:

Run shell commands from skill "kilo-config"?
cmd

Approving the request then produced:

zsh:1: command not found: cmd

Cause

The existing skill-shell protection correctly recognizes Markdown fenced blocks and inline code spans for filesystem-backed SKILL.md files. The built-in kilo-config.md file 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 saw cmd as 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:

Skill kilo-config
LOADED

No shell permission card is shown and cmd is not executed.

@kilo-code-bot

kilo-code-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

lgtm

Files Reviewed (3 files)
  • .changeset/calm-skill-examples.md
  • packages/opencode/src/kilocode/skills/builtin.ts
  • packages/opencode/test/tool/skill.test.ts

Reviewed by kimi-k3 · Input: 69.1K · Output: 9.4K · Cached: 585.7K

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit 6bb2a24 into main Aug 6, 2026
31 checks passed
@marius-kilocode
marius-kilocode deleted the encouraging-pantydraco branch August 6, 2026 08:01
t7tran pushed a commit to t7tran/kilocode that referenced this pull request Aug 14, 2026
fix(cli): keep built-in skill examples inert
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.

2 participants