mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-10-26 23:15:04 +00:00
The negated-trigger check removed only the first "Do not use when …" clause before testing whether a positive trigger remained, because the replace used the non-global DESCRIPTION_TRIGGER_NEGATE. A description carrying two or more negated clauses and no positive trigger left a second "use when" substring behind, which DESCRIPTION_TRIGGER then matched, so the skill passed validation with no trigger at all. One negated clause was correctly rejected; two were accepted. Adds a global form of the pattern for the strip and keeps the non-global one for .test(), since a /g regex carries lastIndex across test() calls.