Skip to content

Commit a9ffa4d

Browse files
committed
Revert "Give skill instructions in system prompt"
This reverts commit b2d7921.
1 parent e43512c commit a9ffa4d

File tree

5 files changed

+1
-34
lines changed

5 files changed

+1
-34
lines changed

agents/base2/base2.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export function createBase2(
6363
'propose_write_file',
6464
!noAskUser && 'ask_user',
6565
'set_output',
66-
'skill',
6766
),
6867
spawnableAgents: buildArray(
6968
!isMax && 'file-picker',
@@ -233,7 +232,6 @@ ${isDefault || isMax
233232
234233
${PLACEHOLDER.FILE_TREE_PROMPT_SMALL}
235234
${PLACEHOLDER.KNOWLEDGE_FILES_CONTENTS}
236-
${PLACEHOLDER.SKILLS_PROMPT}
237235
${PLACEHOLDER.SYSTEM_INFO_PROMPT}
238236
239237
# Initial Git Changes

agents/types/secret-agent-definition.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export type AllToolNames =
77
| 'add_subgoal'
88
| 'browser_logs'
99
| 'create_plan'
10-
| 'skill'
1110
| 'spawn_agent_inline'
1211
| 'update_subgoal'
1312

@@ -32,7 +31,6 @@ const placeholderNames = [
3231
'KNOWLEDGE_FILES_CONTENTS',
3332
'PROJECT_ROOT',
3433
'REMAINING_STEPS',
35-
'SKILLS_PROMPT',
3634
'SYSTEM_INFO_PROMPT',
3735
'TOOLS_PROMPT',
3836
'USER_CWD',

common/src/util/skills.ts

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { SkillsMap } from '../types/skill'
33
/**
44
* Escapes special XML characters in a string.
55
*/
6-
export function escapeXml(str: string): string {
6+
function escapeXml(str: string): string {
77
return str
88
.replace(/&/g, '&')
99
.replace(/</g, '&lt;')
@@ -30,29 +30,3 @@ export function formatAvailableSkillsXml(skills: SkillsMap): string {
3030

3131
return `<available_skills>\n${skillsXml}\n</available_skills>`
3232
}
33-
34-
/**
35-
* Formats skills as a system prompt section for injection into agent prompts.
36-
* Returns a markdown section with available skills and instructions on using the skill tool.
37-
* Returns empty string if no skills are available.
38-
*/
39-
export function formatSkillsSystemPrompt(skills: SkillsMap | undefined): string {
40-
if (!skills) {
41-
return ''
42-
}
43-
44-
const skillEntries = Object.values(skills)
45-
if (skillEntries.length === 0) {
46-
return ''
47-
}
48-
49-
const skillsXml = formatAvailableSkillsXml(skills)
50-
51-
return `# Available Skills
52-
53-
The following skills are available to help you complete tasks. Each skill provides specialized instructions and behaviors.
54-
55-
${skillsXml}
56-
57-
Use the \`skill\` tool to load a skill's full instructions when relevant to the current task. Skills are loaded on-demand - only load them when you need their specific guidance. Always load any relevant skills immediately: You should bias toward loading too many skills as early as possible.`
58-
}

packages/agent-runtime/src/templates/strings.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { KNOWLEDGE_FILE_NAMES_LOWERCASE } from '@codebuff/common/constants/knowledge'
2-
import { formatSkillsSystemPrompt } from '@codebuff/common/util/skills'
32
import { escapeString } from '@codebuff/common/util/string'
43
import { z } from 'zod/v4'
54

@@ -132,7 +131,6 @@ export async function formatPrompt(
132131
return `\`\`\`${path}\n${content.trim()}\n\`\`\``
133132
})
134133
.join('\n\n'),
135-
[PLACEHOLDER.SKILLS_PROMPT]: () => formatSkillsSystemPrompt(fileContext.skills),
136134
}
137135

138136
for (const varName of placeholderValues) {

packages/agent-runtime/src/templates/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const placeholderNames = [
2121
'KNOWLEDGE_FILES_CONTENTS',
2222
'PROJECT_ROOT',
2323
'REMAINING_STEPS',
24-
'SKILLS_PROMPT',
2524
'SYSTEM_INFO_PROMPT',
2625
'USER_CWD',
2726
'USER_INPUT_PROMPT',

0 commit comments

Comments
 (0)