Repository navigation
Flag skills whose descriptions are near-identical to a sibling's - #625
Merged
Merged
Conversation
chrisknvidia
requested review from
mosheabr,
rmalani-nv and
rng1995
as code owners
November 16, 2026 07:35
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
chrisknvidia
force-pushed
the
devin/1794813679-lookalike-skills
branch
from
November 16, 2026 07:56
957590f to
5c7ee14
Compare
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Collaborator
Author
|
Review follow-up on The existing Unicode-tokenization finding is still reproducible: real The commits since the initial review merge main only; the feature range-diff is unchanged. I rechecked the delta and repeated the current-head CLI cases plus the changed Hermes test (1 passed). CI was still pending at the refreshed snapshot. |
The lookalike check only kept ASCII letters and digits, so identical non-Latin descriptions had no words and were never flagged, and mixed descriptions lost the non-Latin words that told them apart. Tokenize on Unicode letters, digits and combining marks after NFKC and casefold, and compare Han, kana, Thai and Lao runs as character pairs since those scripts have no spaces between words. ASCII input tokenizes the same as before. Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
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.
Summary
If two installed skills have nearly the same description, the model can't tell which one a request is for. With two Claude Code 2.1.316 skills that had identical descriptions, an HR headcount request went to the right skill 3/6 times, to the wrong skill alone 2/6 times, and to both 1/6 times. With distinct descriptions it went to the right skill 6/6 times. Today the only check for this is Tier 2 similarity, which needs an embedding key.
This change adds a keyless check, with no model and no network. The harness catalog, meaning the skills installed in the same folder, already collects each skill's name. Now it also keeps each description:
Catalog.lookalikescompares lowercase content words, ignoring a short stop-word list, by Jaccard overlap. Skills with fewer than 4 content words are skipped, and so are same-named copies, which*-DUP-NAMEalready covers.lookalike_namesfact feeds an advisory*-LOOKALIKErule in all six profiles: "<name>in the same folder has a near-identical description, so the model may pick the wrong skill."The threshold is 0.95, chosen against 15,925 public skills in multi-skill folders:
From 0.75 to 0.9 the check also catches templated pairs that differ in one key word (
dbos-golangvsdbos-typescript, MySQL vs PostgreSQL SDKs). The canary doesn't show those being confused, so they aren't flagged. At 0.95 it flags copies published under two names, such astesting-patterns/code-showcase-testing-patterns, andbrand-guidelines-anthropic/brand-guidelines-community.The rule's confidence is
mediumbecause the routing evidence comes from one harness and one model.Verification
test_lookalike_descriptions_are_flagged(an identical pair is flagged, a distinct HR/sales pair isn't)make lintmake test(tests/harness: 122 passed)make buildRelease Impact
CHANGELOG.md