Conversation
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
collect_skill_tagscovers two skill trails: aSkilltool_use block, andattributionSkillon assistant rows (slash commands). There is a third trail it misses: dependency sub-skills loaded by reading theirSKILL.mddirectly with theReadtool, which is how a skill referenced from another skill's body ("REQUIRED SUB-SKILL: …", "See skills/foo/SKILL.md") typically gets loaded.Measured on my local transcripts over 4 weeks: a commit-workflow skill that marks a shell-quoting sub-skill as required was invoked 33 times, while the sub-skill collected 0
skill:tags — it was only ever loaded viaRead. A sibling Codex setup that counts rawSKILL.mdreads saw the same sub-skill in 32 sessions over the same period. Tag-based usage analytics therefore undercount exactly the skills that only ever run as dependencies, and "which skills can I safely disable?" queries give a false zero for them.Change
add_skill_tags_from_rowsnow recognizes the third trail: aReadtool_use whosefile_pathmatches(^|/)skills/<name>/SKILL.md$adds the sameskill:<name>tag.SKILL.mdfilename, so reads ofskills/<name>/references/*.mdor other files inside a skill directory do not tag.subagent-skill:namespace picks the trail up as well.CC_LANGFUSE_SKILL_TAGSoption; no new configuration.Verification
Three new unit tests in
tests/unit/test_skill_tags.py:test_skill_loaded_via_read_of_skill_md_is_taggedtest_read_of_non_skill_file_is_not_taggedreferences/*reads stay untaggedtest_read_and_invoke_of_same_skill_dedupesFull suite: 223 passed.
End to end: a headless
claude -psession instructed to onlyReada skill'sSKILL.md(no Skill invoke) produced a trace tagged['claude-code', 'skill:goal-first'], confirmed through the metrics API on thetagsdimension against a live Langfuse project.