Files
hapi/cli/src/modules/common/skillLookupInstruction.ts
T
af962fc61f fix(cli): stop prepending skill_lookup $name instruction onto user turns (#1096)
Cursor ACP (and other remotes) flagged the glued-on SKILL_LOOKUP_INSTRUCTION
as prompt injection. Keep discovery on the skill_lookup MCP tool description
and on system prompts (OpenCode/Grok); do not taint user messages.

Fixes #1095

Co-authored-by: Debian <heavygee@oos-linux.in.lockhouse>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-20 18:29:29 +01:00

12 lines
618 B
TypeScript

/**
* Discovery copy for agents that can host a durable system / instructions block
* (OpenCode, Grok). Do **not** prepend this to user turns — that path looks like
* prompt injection on Cursor ACP and similar remotes (tiann/hapi#1095).
*
* Cursor / Kimi / generic ACP rely on the `skill_lookup` MCP tool description
* (and Cursor's native `.cursor/mcp.json` overlay where session/new mcpServers
* are ignored) instead of a user-message prepend.
*/
export const SKILL_LOOKUP_INSTRUCTION =
'When a user message starts with "$name", call HAPI\'s skill_lookup tool with "name" (without "$") before acting.'