Repository navigation
Report repo skill runs from coding agents - #680
Conversation
When Claude Code loads one of the repo's skills (the Skill tool, or the person typing /name), the hook queues a skill use in the activity outbox: the skill's name only, never the task, prompt or arguments. Only a skill the repo keeps in .claude/skills/<name>/ counts, once per run in a session, and only once the workspace has that skill. The PostToolUse matcher gains Skill; trail init updates it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🌱 graft blast radius2 areas changed → 3 areas can be affected. 8 dependent symbols, depth 2. flowchart TB
A0(("Pair Session Setup<br/>4 symbols"))
A1(("CLI Entry Point<br/>3 symbols"))
A2(("Trail Initialization<br/>1 symbol"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2 reached;
Who knows this code — 2 people across 5 areas
Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no All 8 dependent symbols, grouped by areaPair Session Setup — 4 symbols in 4 files
CLI Entry Point — 3 symbols in 1 file
Trail Initialization — 1 symbol in 1 file
Test signal per changed area — 2 ✓Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.
8 test suites also reference this code8 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
Claude Code loads repo skills on its own, so Trail never heard about those runs. On the Skills page, a skill the team uses every day said "Not used yet".
What changes
tool-savingsPostToolUse hook now also matchesSkill. When the agent loads a skill, the hook queues a skill use./name.trail initupdates the matcher on machines that already have Trail installed.skill. They're sent with the next sync and retried on failure, and nothing is sent unless the machine is connected.What counts as a use
.claude/skills/<name>/SKILL.md. Personal and plugin (plugin:name) skills don't count./nameand the agent then loading it isn't counted twice.Privacy: only the skill's name is sent. Never the task, the prompt or the arguments; the tests check this.
The server side is trailhq/trail-cloud#31 (merged).
Tested
test/trail-skill-use.test.ts: parsing, queueing once per run, only repo skills in workspace repos, and the send-only-after-sync rule.~/.claudehook shim fired on aSkillPostToolUse and on a/cut-a-release 4.3 for the Acme invoice fixprompt._trail-syncsent both uses, and the local server stored 2 coding-agent runs.🤖 Generated with Claude Code