From b91033495c62c4b5b68d3048ce20ebcb59e0d29e Mon Sep 17 00:00:00 2001 From: yiling Date: Tue, 21 Jul 2026 10:42:01 +0800 Subject: [PATCH] fix(agent): include skill id in formatSkillsForPrompt --- packages/agent/src/index.test.ts | 1 + packages/agent/src/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/agent/src/index.test.ts b/packages/agent/src/index.test.ts index b7e47b8b..23287879 100644 --- a/packages/agent/src/index.test.ts +++ b/packages/agent/src/index.test.ts @@ -43,6 +43,7 @@ describe('formatSkillsForPrompt', () => { // Verify lines and XML elements expect(result).toContain('') expect(result).toContain('') + expect(result).toContain('skill-1') expect(result).toContain('Deploy & Test') expect(result).toContain( 'Deploys code <deploy> and "runs" tests.', diff --git a/packages/agent/src/index.ts b/packages/agent/src/index.ts index d300ba87..ca2364b8 100644 --- a/packages/agent/src/index.ts +++ b/packages/agent/src/index.ts @@ -373,6 +373,7 @@ export function formatSkillsForPrompt( for (const skill of skills) { const filePath = path.join(process.cwd(), '.pi', 'skills', skill.id, 'SKILL.md') lines.push(' ') + lines.push(` ${escapeXml(skill.id)}`) lines.push(` ${escapeXml(skill.name)}`) lines.push(` ${escapeXml(skill.description || 'No description')}`) lines.push(` ${escapeXml(filePath)}`)