Problem
Skills Graph currently captures skill usage when the runtime emits normal tool events that expose a SKILL.md read. For example, when a skill reads another skill file through the Read tool, Claude Code emits PostToolUse, agent-context-graph normalizes it, and skills-graph records the USED_SKILL relationship.
Pure skill activation can be different. Claude Code can inject the selected skill content through its Skill tool without emitting a PreToolUse / PostToolUse payload that includes the skill content or skill path. In that case the connector has no event to inspect, so skills such as caveman are not recorded even though they were used.
Observed behavior
- Reading
SKILL.md via Read tool works and records usage.
- Skills that read multiple other
SKILL.md files are captured as separate file-read events.
- Pure Skill tool injection does not record usage because no relevant hook event is emitted.
- This is distinct from Codex sandbox/Memgraph reachability problems: Codex appears to expose skill file reads, but hook persistence can still fail if the sandbox blocks loopback access to Memgraph.
Desired behavior
Agent Context Graph should have a reliable path to record Skill tool usage from Claude Code into Skills Graph.
Proposed paths
- Preferred: Claude Code emits
PreToolUse / PostToolUse for Skill tool usage, including at least skill name/path and ideally injected content.
- Short-term workaround: add an opt-in Claude Code Stop-hook transcript scan in
agent-context-graph that reads transcript_path, extracts skill invocations or injected skill content, and emits normalized Event Protocol events for skills-graph.
Notes
Keep runtime-specific transcript parsing in agent-context-graph, not skills-graph. Skills Graph should continue consuming normalized events and deciding whether those events represent Skill Usage.
Acceptance criteria
- Claude Code activation of a pure injected skill such as
caveman records a USED_SKILL relationship.
- Multi-file skill reads continue to record each valid
SKILL.md read.
- Transcript scanning, if implemented, is opt-in and documented.
- Tests cover Skill tool injection/transcript-derived events separately from normal
Read tool SKILL.md capture.
Problem
Skills Graph currently captures skill usage when the runtime emits normal tool events that expose a
SKILL.mdread. For example, when a skill reads another skill file through the Read tool, Claude Code emitsPostToolUse, agent-context-graph normalizes it, and skills-graph records theUSED_SKILLrelationship.Pure skill activation can be different. Claude Code can inject the selected skill content through its Skill tool without emitting a
PreToolUse/PostToolUsepayload that includes the skill content or skill path. In that case the connector has no event to inspect, so skills such ascavemanare not recorded even though they were used.Observed behavior
SKILL.mdvia Read tool works and records usage.SKILL.mdfiles are captured as separate file-read events.Desired behavior
Agent Context Graph should have a reliable path to record Skill tool usage from Claude Code into Skills Graph.
Proposed paths
PreToolUse/PostToolUsefor Skill tool usage, including at least skill name/path and ideally injected content.agent-context-graphthat readstranscript_path, extracts skill invocations or injected skill content, and emits normalized Event Protocol events forskills-graph.Notes
Keep runtime-specific transcript parsing in
agent-context-graph, notskills-graph. Skills Graph should continue consuming normalized events and deciding whether those events represent Skill Usage.Acceptance criteria
cavemanrecords aUSED_SKILLrelationship.SKILL.mdread.ReadtoolSKILL.mdcapture.