refactor(prompt): dedupe repeated skill guidance blocks

This commit is contained in:
Bo Li
2026-02-19 02:22:14 +08:00
parent d06f55325a
commit 652fc75b3d
3 changed files with 12 additions and 40 deletions
+1 -2
View File
@@ -167,7 +167,6 @@ export function formatCustomSkillsBlock(
customSkills: AvailableSkill[],
headerLevel: "####" | "**" = "####"
): string {
const customSkillNames = customSkills.map((s) => `"${s.name}"`).join(", ")
const header = headerLevel === "####"
? `#### User-Installed Skills (HIGH PRIORITY)`
: `**User-Installed Skills (HIGH PRIORITY):**`
@@ -180,7 +179,7 @@ Subagents are STATELESS — they lose all custom knowledge unless you pass these
${customRows.join("\n")}
> **CRITICAL**: Ignoring user-installed skills when they match the task domain is a failure.
> The user installed ${customSkillNames} for a reason — USE THEM when the task overlaps with their domain.`
> The user installed custom skills for a reason — USE THEM when the task overlaps with their domain.`
}
export function buildCategorySkillsDelegationGuide(categories: AvailableCategory[], skills: AvailableSkill[]): string {