Compare an extracted experience against existing skills to determine if it's new, an amendment, or a duplicate.
After detect-xp extracts a pattern, this skill compares it against all existing skills in the repository. The goal is to determine whether the experience creates a NEW skill, AMENDS an existing one, or is a DUPLICATE.
This comparison happens BEFORE anonymization so the developer sees the diff in their real context and can make an informed decision.
Read all SKILL.md files from the skills/ directory. Either:
skills/ directory (if running inside the d9-skills plugin)gh apiLaWebcapsule/d9-skillsFor each existing skill, compare:
DUPLICATE (similarity > 0.95)
This experience is already covered by: [skill-name]
Existing skill: [skill description]
Your experience: [extracted pattern]
Nothing new to add.
[OK, cancel] [No, it's different — force new]
AMENDMENT (similarity 0.7 - 0.95)
This looks like it improves: [skill-name] (v[version])
EXISTING SKILL:
✓ [existing action 1]
✓ [existing action 2]
✓ [existing error prevented]
YOUR EXPERIENCE ADDS:
+ [new action or detail]
+ [new error prevented]
+ [new trigger condition]
[Complete this skill] [It's a new skill] [Cancel]
NEW SKILL (similarity < 0.7)
No matching skill found. This will be contributed as a new skill.
Name suggestion: [auto-generated-name]
Category: [auto-detected domain]
[Continue] [Cancel]
Pass to anonymize-session:
verdict: "new" | "amendment"target_skill: skill name (only if amendment)target_version: skill version (only if amendment)extracted_pattern: the full extracted experienceadditions: what's new vs existing (only if amendment)