From a298a2f06302dffbd01a373f6456de7fbf23294c Mon Sep 17 00:00:00 2001 From: itsmylife44 <34112129+itsmylife44@users.noreply.github.com> Date: Wed, 4 Feb 2026 17:27:39 +0100 Subject: [PATCH] fix(atlas): separate custom skills in Atlas buildSkillsSection() Atlas had its own buildSkillsSection() in atlas/utils.ts that rendered all skills in a flat table without distinguishing built-in from user-installed. Apply the same HIGH PRIORITY emphasis and CRITICAL warning pattern used in the shared prompt builder. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- src/agents/atlas/utils.ts | 55 +++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 5 deletions(-) diff --git a/src/agents/atlas/utils.ts b/src/agents/atlas/utils.ts index b13c99f3..9aa03513 100644 --- a/src/agents/atlas/utils.ts +++ b/src/agents/atlas/utils.ts @@ -56,21 +56,66 @@ export function buildSkillsSection(skills: AvailableSkill[]): string { return "" } - const skillRows = skills.map((s) => { + const builtinSkills = skills.filter((s) => s.location === "plugin") + const customSkills = skills.filter((s) => s.location !== "plugin") + + const builtinRows = builtinSkills.map((s) => { const shortDesc = s.description.split(".")[0] || s.description return `| \`${s.name}\` | ${shortDesc} |` }) + const customRows = customSkills.map((s) => { + const shortDesc = s.description.split(".")[0] || s.description + const source = s.location === "project" ? "project" : "user" + return `| \`${s.name}\` | ${shortDesc} | ${source} |` + }) + + const customSkillNames = customSkills.map((s) => `"${s.name}"`).join(", ") + + let skillsTable: string + + if (customSkills.length > 0 && builtinSkills.length > 0) { + skillsTable = `**Built-in Skills:** + +| Skill | When to Use | +|-------|-------------| +${builtinRows.join("\n")} + +**User-Installed Skills (HIGH PRIORITY):** + +The user installed these for their workflow. They MUST be evaluated for EVERY delegation. + +| Skill | When to Use | Source | +|-------|-------------|--------| +${customRows.join("\n")} + +> **CRITICAL**: The user installed ${customSkillNames} for a reason — USE THEM when the task overlaps with their domain. +> When in doubt, INCLUDE a user-installed skill rather than omit it.` + } else if (customSkills.length > 0) { + skillsTable = `**User-Installed Skills (HIGH PRIORITY):** + +The user installed these for their workflow. They MUST be evaluated for EVERY delegation. + +| Skill | When to Use | Source | +|-------|-------------|--------| +${customRows.join("\n")} + +> **CRITICAL**: The user installed ${customSkillNames} for a reason — USE THEM when the task overlaps with their domain. +> When in doubt, INCLUDE a user-installed skill rather than omit it.` + } else { + skillsTable = `| Skill | When to Use | +|-------|-------------| +${builtinRows.join("\n")}` + } + return ` #### 3.2.2: Skill Selection (PREPEND TO PROMPT) **Skills are specialized instructions that guide subagent behavior. Consider them alongside category selection.** -| Skill | When to Use | -|-------|-------------| -${skillRows.join("\n")} +${skillsTable} -**MANDATORY: Evaluate ALL skills for relevance to your task.** +**MANDATORY: Evaluate ALL skills (built-in AND user-installed) for relevance to your task.** Read each skill's description and ask: "Does this skill's domain overlap with my task?" - If YES: INCLUDE in load_skills=[...]