Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9e25261
refactor: replace fetch_instructions tool with built-in skills
hannesrudolph Jan 23, 2026
528e37b
fix: address skill tool UI/typing and built-in skill location issues
hannesrudolph Jan 24, 2026
e9afa8b
fix: add missing diffEnabled parameter to SYSTEM_PROMPT calls after r…
hannesrudolph Jan 24, 2026
0771875
chore: add missing skill translations for 17 locales
hannesrudolph Jan 24, 2026
e2795be
feat(skills): add build-time generation for built-in skills from SKIL…
hannesrudolph Jan 28, 2026
bd58603
fix: run prettier during skill generation to ensure stable output
hannesrudolph Jan 28, 2026
1590022
refactor: rename mcp-builder to create-mcp-server with original content
hannesrudolph Jan 28, 2026
5d63889
fix: auto-approve skill tool (no user confirmation required)
hannesrudolph Jan 28, 2026
2445e1f
refactor: remove approval flow from skill tool
hannesrudolph Jan 28, 2026
d24b480
Revert "refactor: remove approval flow from skill tool"
hannesrudolph Jan 28, 2026
7e61549
fix: update CLI tool renderer to recognize skill tool and add auto-ap…
hannesrudolph Jan 28, 2026
bb5edf9
fix: remove remaining fetchInstructions references in CLI utils
hannesrudolph Jan 29, 2026
609f3ab
Remove all diffEnabled references per review request
roomote Jan 29, 2026
42e113b
fix: make skills generation deterministic by removing timestamp
hannesrudolph Jan 29, 2026
4d63fd4
fix: add 'built-in' to SkillMetadata source type
hannesrudolph Jan 29, 2026
a0ca389
fix: add 'built-in' to WebviewMessage source type for skill operations
hannesrudolph Jan 29, 2026
1a9fafc
fix: add validation for built-in skills in message handlers
hannesrudolph Jan 29, 2026
410a3f6
i18n: add translations for built-in skill error messages
hannesrudolph Jan 29, 2026
cdc2dca
fix: align skill tool TypeScript types with JSON schema
hannesrudolph Jan 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions apps/cli/src/ui/components/tools/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,7 @@ export type ToolCategory =
| "other"

export function getToolCategory(toolName: string): ToolCategory {
const fileReadTools = [
"readFile",
"read_file",
"fetchInstructions",
"fetch_instructions",
"listFilesTopLevel",
"listFilesRecursive",
"list_files",
]
const fileReadTools = ["readFile", "read_file", "skill", "listFilesTopLevel", "listFilesRecursive", "list_files"]

const fileWriteTools = [
"editedExistingFile",
Expand Down
6 changes: 2 additions & 4 deletions apps/cli/src/ui/components/tools/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ export function getToolDisplayName(toolName: string): string {
// File read operations
readFile: "Read",
read_file: "Read",
fetchInstructions: "Fetch Instructions",
fetch_instructions: "Fetch Instructions",
skill: "Load Skill",
listFilesTopLevel: "List Files",
listFilesRecursive: "List Files (Recursive)",
list_files: "List Files",
Expand Down Expand Up @@ -107,8 +106,7 @@ export function getToolIconName(toolName: string): IconName {
// File read operations
readFile: "file",
read_file: "file",
fetchInstructions: "file",
fetch_instructions: "file",
skill: "file",
listFilesTopLevel: "folder",
listFilesRecursive: "folder",
list_files: "folder",
Expand Down
1 change: 0 additions & 1 deletion packages/types/src/global-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ export const globalSettingsSchema = z.object({
telemetrySetting: telemetrySettingsSchema.optional(),

mcpEnabled: z.boolean().optional(),
enableMcpServerCreation: z.boolean().optional(),

mode: z.string().optional(),
modeApiConfigs: z.record(z.string(), z.string()).optional(),
Expand Down
4 changes: 2 additions & 2 deletions packages/types/src/skills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
export interface SkillMetadata {
name: string // Required: skill identifier
description: string // Required: when to use this skill
path: string // Absolute path to SKILL.md
source: "global" | "project" // Where the skill was discovered
path: string // Absolute path to SKILL.md (or "<built-in:name>" for built-in skills)
source: "global" | "project" | "built-in" // Where the skill was discovered
mode?: string // If set, skill is only available in this mode
}

Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export const toolNames = [
"attempt_completion",
"switch_mode",
"new_task",
"fetch_instructions",
"codebase_search",
"update_todo_list",
"run_slash_command",
"skill",
"generate_image",
"custom_tool",
] as const
Expand Down
8 changes: 4 additions & 4 deletions packages/types/src/vscode-extension-host.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ export type ExtensionState = Pick<
experiments: Experiments // Map of experiment IDs to their enabled state

mcpEnabled: boolean
enableMcpServerCreation: boolean

mode: string
customModes: ModeConfig[]
Expand Down Expand Up @@ -502,7 +501,6 @@ export interface WebviewMessage {
| "deleteMessageConfirm"
| "submitEditedMessage"
| "editMessageConfirm"
| "enableMcpServerCreation"
| "remoteControlEnabled"
| "taskSyncEnabled"
| "searchCommits"
Expand Down Expand Up @@ -643,7 +641,7 @@ export interface WebviewMessage {
modeConfig?: ModeConfig
timeout?: number
payload?: WebViewMessagePayload
source?: "global" | "project"
source?: "global" | "project" | "built-in"
skillName?: string // For skill operations (createSkill, deleteSkill, openSkillFile)
skillMode?: string // For skill operations (mode restriction)
skillDescription?: string // For createSkill (skill description)
Expand Down Expand Up @@ -790,7 +788,6 @@ export interface ClineSayTool {
| "codebaseSearch"
| "readFile"
| "readCommandOutput"
| "fetchInstructions"
| "listFilesTopLevel"
| "listFilesRecursive"
| "searchFiles"
Expand All @@ -801,6 +798,7 @@ export interface ClineSayTool {
| "imageGenerated"
| "runSlashCommand"
| "updateTodoList"
| "skill"
path?: string
// For readCommandOutput
readStart?: number
Expand Down Expand Up @@ -847,6 +845,8 @@ export interface ClineSayTool {
args?: string
source?: string
description?: string
// Properties for skill tool
skill?: string
}

// Must keep in sync with system prompt.
Expand Down
34 changes: 18 additions & 16 deletions src/core/assistant-message/NativeToolCallParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,6 @@ export class NativeToolCallParser {
}
break

case "fetch_instructions":
if (partialArgs.task !== undefined) {
nativeArgs = {
task: partialArgs.task,
}
}
break

case "generate_image":
if (partialArgs.prompt !== undefined || partialArgs.path !== undefined) {
nativeArgs = {
Expand All @@ -476,6 +468,15 @@ export class NativeToolCallParser {
}
break

case "skill":
if (partialArgs.skill !== undefined) {
nativeArgs = {
skill: partialArgs.skill,
args: partialArgs.args,
}
}
break

case "search_files":
if (partialArgs.path !== undefined || partialArgs.regex !== undefined) {
nativeArgs = {
Expand Down Expand Up @@ -736,14 +737,6 @@ export class NativeToolCallParser {
}
break

case "fetch_instructions":
if (args.task !== undefined) {
nativeArgs = {
task: args.task,
} as NativeArgsFor<TName>
}
break

case "generate_image":
if (args.prompt !== undefined && args.path !== undefined) {
nativeArgs = {
Expand All @@ -763,6 +756,15 @@ export class NativeToolCallParser {
}
break

case "skill":
if (args.skill !== undefined) {
nativeArgs = {
skill: args.skill,
args: args.args,
} as NativeArgsFor<TName>
}
break

case "search_files":
if (args.path !== undefined && args.regex !== undefined) {
nativeArgs = {
Expand Down
21 changes: 10 additions & 11 deletions src/core/assistant-message/presentAssistantMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import type { ToolParamName, ToolResponse, ToolUse, McpToolUse } from "../../sha
import { AskIgnoredError } from "../task/AskIgnoredError"
import { Task } from "../task/Task"

import { fetchInstructionsTool } from "../tools/FetchInstructionsTool"
import { listFilesTool } from "../tools/ListFilesTool"
import { readFileTool } from "../tools/ReadFileTool"
import { readCommandOutputTool } from "../tools/ReadCommandOutputTool"
Expand All @@ -34,6 +33,7 @@ import { attemptCompletionTool, AttemptCompletionCallbacks } from "../tools/Atte
import { newTaskTool } from "../tools/NewTaskTool"
import { updateTodoListTool } from "../tools/UpdateTodoListTool"
import { runSlashCommandTool } from "../tools/RunSlashCommandTool"
import { skillTool } from "../tools/SkillTool"
import { generateImageTool } from "../tools/GenerateImageTool"
import { applyDiffTool as applyDiffToolClass } from "../tools/ApplyDiffTool"
import { isValidToolName, validateToolUse } from "../tools/validateToolUse"
Expand Down Expand Up @@ -347,8 +347,6 @@ export async function presentAssistantMessage(cline: Task) {
return readFileTool.getReadFileToolDescription(block.name, block.nativeArgs)
}
return readFileTool.getReadFileToolDescription(block.name, block.params)
case "fetch_instructions":
return `[${block.name} for '${block.params.task}']`
case "write_to_file":
return `[${block.name} for '${block.params.path}']`
case "apply_diff":
Expand Down Expand Up @@ -394,6 +392,8 @@ export async function presentAssistantMessage(cline: Task) {
}
case "run_slash_command":
return `[${block.name} for '${block.params.command}'${block.params.args ? ` with args: ${block.params.args}` : ""}]`
case "skill":
return `[${block.name} for '${block.params.skill}'${block.params.args ? ` with args: ${block.params.args}` : ""}]`
case "generate_image":
return `[${block.name} for '${block.params.path}']`
default:
Expand Down Expand Up @@ -760,13 +760,6 @@ export async function presentAssistantMessage(cline: Task) {
pushToolResult,
})
break
case "fetch_instructions":
await fetchInstructionsTool.handle(cline, block as ToolUse<"fetch_instructions">, {
askApproval,
handleError,
pushToolResult,
})
break
case "list_files":
await listFilesTool.handle(cline, block as ToolUse<"list_files">, {
askApproval,
Expand Down Expand Up @@ -870,6 +863,13 @@ export async function presentAssistantMessage(cline: Task) {
pushToolResult,
})
break
case "skill":
await skillTool.handle(cline, block as ToolUse<"skill">, {
askApproval,
handleError,
pushToolResult,
})
break
case "generate_image":
await checkpointSaveAndMark(cline)
await generateImageTool.handle(cline, block as ToolUse<"generate_image">, {
Expand Down Expand Up @@ -1049,7 +1049,6 @@ function containsXmlToolMarkup(text: string): boolean {
"codebase_search",
"edit_file",
"execute_command",
"fetch_instructions",
"generate_image",
"list_files",
"new_task",
Expand Down
13 changes: 5 additions & 8 deletions src/core/auto-approval/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,11 @@ export async function checkAutoApproval({
return { decision: "approve" }
}

if (tool?.tool === "fetchInstructions") {
if (tool.content === "create_mode") {
return state.alwaysAllowModeSwitch === true ? { decision: "approve" } : { decision: "ask" }
}

if (tool.content === "create_mcp_server") {
return state.alwaysAllowMcp === true ? { decision: "approve" } : { decision: "ask" }
}
// The skill tool only loads pre-defined instructions from built-in, global, or project skills.
// It does not read arbitrary files - skills must be explicitly installed/defined by the user.
// Auto-approval is intentional to provide a seamless experience when loading task instructions.
if (tool.tool === "skill") {
return { decision: "approve" }
}

if (tool?.tool === "switchMode") {
Expand Down
4 changes: 0 additions & 4 deletions src/core/prompts/__tests__/add-custom-instructions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ describe("addCustomInstructions", () => {
undefined, // customModes
undefined, // globalCustomInstructions
undefined, // experiments
true, // enableMcpServerCreation
undefined, // language
undefined, // rooIgnoreInstructions
undefined, // partialReadsEnabled
Expand All @@ -233,7 +232,6 @@ describe("addCustomInstructions", () => {
undefined, // customModes
undefined, // globalCustomInstructions
undefined, // experiments
true, // enableMcpServerCreation
undefined, // language
undefined, // rooIgnoreInstructions
undefined, // partialReadsEnabled
Expand All @@ -257,7 +255,6 @@ describe("addCustomInstructions", () => {
undefined, // customModes,
undefined, // globalCustomInstructions
undefined, // experiments
false, // enableMcpServerCreation
undefined, // language
undefined, // rooIgnoreInstructions
undefined, // partialReadsEnabled
Expand All @@ -280,7 +277,6 @@ describe("addCustomInstructions", () => {
undefined, // customModes,
undefined, // globalCustomInstructions
undefined, // experiments
true, // enableMcpServerCreation
undefined, // language
undefined, // rooIgnoreInstructions
true, // partialReadsEnabled
Expand Down
3 changes: 0 additions & 3 deletions src/core/prompts/__tests__/custom-system-prompt.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ describe("File-Based Custom System Prompt", () => {
undefined, // customModes
undefined, // globalCustomInstructions
undefined, // experiments
true, // enableMcpServerCreation
undefined, // language
undefined, // rooIgnoreInstructions
undefined, // partialReadsEnabled
Expand Down Expand Up @@ -142,7 +141,6 @@ describe("File-Based Custom System Prompt", () => {
undefined, // customModes
undefined, // globalCustomInstructions
undefined, // experiments
true, // enableMcpServerCreation
undefined, // language
undefined, // rooIgnoreInstructions
undefined, // partialReadsEnabled
Expand Down Expand Up @@ -187,7 +185,6 @@ describe("File-Based Custom System Prompt", () => {
undefined, // customModes
undefined, // globalCustomInstructions
undefined, // experiments
true, // enableMcpServerCreation
undefined, // language
undefined, // rooIgnoreInstructions
undefined, // partialReadsEnabled
Expand Down
Loading
Loading