瀏覽代碼

Inject skill tool paths via SessionStart hook

The SessionStart hook now tells Claude the exact paths to find-skills
and skill-run tools. Since hooks have CLAUDE_PLUGIN_ROOT expanded,
the actual paths are injected into Claude's context.

This solves the problem of CLAUDE_PLUGIN_ROOT not being available
as a bash environment variable.
Jesse Vincent 11 月之前
父節點
當前提交
0cc9c52a78
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hooks/session-start.sh

+ 1 - 1
hooks/session-start.sh

@@ -31,7 +31,7 @@ cat <<EOF
 {
   "hookSpecificOutput": {
     "hookEventName": "SessionStart",
-    "additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**RIGHT NOW, go read**: @${CLAUDE_PLUGIN_ROOT}/skills/getting-started/SKILL.md${github_recommendation}\n</EXTREMELY_IMPORTANT>"
+    "additionalContext": "<EXTREMELY_IMPORTANT>\nYou have superpowers.\n\n**Skill tools are at:**\n- find-skills: ${CLAUDE_PLUGIN_ROOT}/scripts/find-skills\n- skill-run: ${CLAUDE_PLUGIN_ROOT}/scripts/skill-run\n\n**RIGHT NOW, go read**: @${CLAUDE_PLUGIN_ROOT}/skills/getting-started/SKILL.md${github_recommendation}\n</EXTREMELY_IMPORTANT>"
   }
 }
 EOF