fix(codebuddy): install SKILL.md in codebuddy install subcommand + fix README hook description

graphify codebuddy install was writing CODEBUDDY.md and settings.json
but not copying the SKILL.md. Added _copy_skill_file("codebuddy") call
to match the --platform codebuddy path. README hook description updated
from "Glob and Grep" to "Bash search and file reads" to match actual
hook matchers (Bash + Read|Glob).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Safi
2026-06-07 14:39:16 +01:00
parent 9e1ad425a9
commit 660d2d32cf
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -211,7 +211,7 @@ Run this once in your project after building a graph:
This writes a small config file that tells your assistant to consult the knowledge graph for codebase questions — preferring scoped queries like `graphify query "<question>"` over reading the full report or grepping raw files. On platforms that support payload-bearing hooks (Claude Code, Gemini CLI), a hook fires automatically before search-style tool calls (and, on Claude Code, before reading source files one by one via the Read/Glob tools) and nudges your assistant toward the graph path. On the others (Codex, OpenCode, Cursor, etc.), the persistent instruction files (`AGENTS.md`, `.cursor/rules/`, etc.) provide the same query-first guidance. `GRAPH_REPORT.md` is still available for broad architecture review.
**CodeBuddy** does the same two things as Claude Code: writes a `CODEBUDDY.md` section telling CodeBuddy to read `graphify-out/GRAPH_REPORT.md` before answering architecture questions, and installs a **PreToolUse hook** (`.codebuddy/settings.json`) that fires before every Glob and Grep call.
**CodeBuddy** does the same two things as Claude Code: writes a `CODEBUDDY.md` section telling CodeBuddy to read `graphify-out/GRAPH_REPORT.md` before answering architecture questions, and installs **PreToolUse hooks** (`.codebuddy/settings.json`) that fire before Bash search commands and file reads, nudging toward `graphify query` instead.
**Codex** writes to `AGENTS.md` and also installs a **PreToolUse hook** in `.codex/hooks.json` that fires before every Bash tool call — same always-on mechanism as Claude Code.
+2 -1
View File
@@ -1910,7 +1910,8 @@ def claude_uninstall(project_dir: Path | None = None, *, project: bool = False)
def codebuddy_install(project_dir: Path | None = None) -> None:
"""Write the graphify section to the local CODEBUDDY.md."""
"""Install the graphify skill and CODEBUDDY.md section for CodeBuddy."""
_copy_skill_file("codebuddy", project=bool(project_dir), project_dir=project_dir)
target = (project_dir or Path(".")) / "CODEBUDDY.md"
if target.exists():