File tree Expand file tree Collapse file tree 5 files changed +1
-34
lines changed
packages/agent-runtime/src/templates Expand file tree Collapse file tree 5 files changed +1
-34
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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' ,
Original file line number Diff line number Diff 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, '<' )
@@ -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- }
Original file line number Diff line number Diff line change 11import { KNOWLEDGE_FILE_NAMES_LOWERCASE } from '@codebuff/common/constants/knowledge'
2- import { formatSkillsSystemPrompt } from '@codebuff/common/util/skills'
32import { escapeString } from '@codebuff/common/util/string'
43import { 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 ) {
Original file line number Diff line number Diff 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' ,
You can’t perform that action at this time.
0 commit comments