fix(core): restore Skill tool as allow by default (#9924)

This commit is contained in:
Josh Holmer
2026-05-05 12:21:48 -04:00
committed by GitHub
parent 54b2c4dbd3
commit 914bbdfd05
3 changed files with 47 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@kilocode/cli": patch
---
Restore Skill tool access for Plan, Ask, Explore, and other non-system agents so skill workflows are available by default.
@@ -142,6 +142,7 @@ function askGuard(mcp: Record<string, "allow" | "ask" | "deny"> = {}) {
grep: "allow",
glob: "allow",
list: "allow",
skill: "allow",
question: "allow",
webfetch: "allow",
websearch: "allow",
@@ -160,6 +161,7 @@ function planGuard(mcp: Record<string, "allow" | "ask" | "deny"> = {}) {
"*": "deny",
question: "allow",
suggest: "allow",
skill: "allow",
plan_exit: "allow",
bash: readOnlyBash,
read: {
@@ -317,6 +319,7 @@ export function patchAgents(
glob: "allow",
list: "allow",
bash: "allow",
skill: "allow",
webfetch: "allow",
websearch: "allow",
codesearch: "allow",
@@ -371,6 +374,7 @@ export function patchAgents(
glob: "allow",
list: "allow",
question: "allow",
skill: "allow",
suggest: "allow", // kilocode_change
task: "allow",
todoread: "allow",
@@ -0,0 +1,38 @@
// kilocode_change - new file
import { afterEach, test, expect } from "bun:test"
import { tmpdir } from "../fixture/fixture"
import { Instance } from "../../src/project/instance"
import { Agent } from "../../src/agent/agent"
import { Permission } from "../../src/permission"
afterEach(async () => {
await Instance.disposeAll()
})
function action(name: string, ruleset: Permission.Ruleset) {
return Permission.evaluate("skill", name, ruleset).action
}
test("skill tool available for non-system native agents and denied for system agents", async () => {
await using tmp = await tmpdir()
await Instance.provide({
directory: tmp.path,
fn: async () => {
const allow = ["code", "plan", "debug", "orchestrator", "ask", "general", "explore"]
for (const name of allow) {
const agent = await Agent.get(name)
expect(agent).toBeDefined()
expect(action("using-superpowers", agent!.permission)).toBe("allow")
expect(Permission.disabled(["skill"], agent!.permission).has("skill")).toBe(false)
}
const deny = ["compaction", "title", "summary"]
for (const name of deny) {
const agent = await Agent.get(name)
expect(agent).toBeDefined()
expect(action("using-superpowers", agent!.permission)).toBe("deny")
expect(Permission.disabled(["skill"], agent!.permission).has("skill")).toBe(true)
}
},
})
})