Skip to content

fix(hook): tag skills invoked via slash commands#20

Open
milanagm wants to merge 2 commits into
langfuse:mainfrom
milanagm:feature/lfe-10759-claude-code-hook-skill-tags-miss-slash-command-invoked
Open

fix(hook): tag skills invoked via slash commands#20
milanagm wants to merge 2 commits into
langfuse:mainfrom
milanagm:feature/lfe-10759-claude-code-hook-skill-tags-miss-slash-command-invoked

Conversation

@milanagm

@milanagm milanagm commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes LFE-10759. Fixes #15.

Skills leave two transcript trails: a Skill tool_use block when Claude
invokes the skill itself, and a top-level attributionSkill field on the
assistant rows when the user invokes it as a slash command, which never
produces a tool_use block. collect_skill_tags only read the first trail,
so slash-command skill runs shipped without their skill:<name> tag and
were invisible to tag filtering in Langfuse.

This PR collects both trails, deduped (same skill via both paths tags once).
This PR makes sure to also collect skill tags from subagent JSONL files.

Testing

  • added 4 new tests in tests/unit/test_skill_tags.py
    covering both invocation paths, both combined, and dedup
  • Reproduced with a fresh transcript (Claude Code 2.1.201): a skill invoked
    via /slash-command produces attributionSkill rows and zero Skill
    tool_use blocks
  • Live-verified in Langfuse with the same transcript: before
    tags=['claude-code'], after tags=['claude-code', 'skill:greeting-style']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skill tags missing for slash-command-invoked skills

1 participant