Repository navigation
feat(#568): lint:skill-calls CI guard for unqualified Skill() collisions - #590
Merged
admarble merged 2 commits intoMay 7, 2026
Merged
Conversation
Adds scripts/lint-skill-calls.ts which scans every **/SKILL.md under .claude/skills/, templates/skills/, and skills/ and flags any Skill(skill: "<name>", ...) call whose <name> matches an Anthropic top-level skill (loop, security-review, init, review, simplify, schedule, release) and is not qualified as sequant:<name>. Wired as a new "Lint skill calls" step in the existing validate-skills GitHub Actions job, and exposed locally via npm run lint:skill-calls. CLAUDE.md gains a brief Skills section pointing at the lint script. Pre-emptively guards the same silent-misroute pattern that #562 fixed for `loop`, before a future contributor or LLM agent reintroduces it under a different colliding name (notably security-review). Per #562 AC-3, no existing non-colliding bare-name calls are touched. Closes #568
3 tasks
Gap 1 (multi-line false negative): findViolations now runs the regex
against full file content rather than line-by-line, so the readable
multi-line form
Skill(
skill: "loop",
args: "x"
)
is detected. Line numbers are derived from the match index. Two new
test cases pin the multi-line behavior (one violation, one qualified-OK).
Gap 2 (markdown scope): walkSkillFiles broadened from `entry === "SKILL.md"`
to `entry.endsWith(".md")`. The harness loads referenced markdown
(references/*.md, prompt-templates.md, _shared/*.md) alongside SKILL.md
itself, and a Skill() call in any of them is equally runtime-dangerous.
Live scan now covers 100 .md files (up from 51); zero violations.
Gap 3 (names list drift): aligned ANTHROPIC_TOP_LEVEL_NAMES to the
current harness `available-skills` block. Removed `release` (Anthropic
no longer ships it as top-level; sequant does, so flagging bare calls
was over-defensive with broken advice). Added `claude-api`,
`update-config`, `keybindings-help`, `fewer-permission-prompts` so the
list mirrors all currently-registered Anthropic top-level names that
could collide with a future sequant skill.
Gap 4 (doc nit): script header no longer claims an "(or invalid args)"
exit-1 case — the script accepts no args.
Test count: 10 → 13. CI lint step still passes on the worktree
(0 violations, 100 files scanned).
admarble
deleted the
feature/568-bug-skills-potential-silent-misroute-when-unqu
branch
May 7, 2026 00:24
This was referenced May 7, 2026
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
Pre-emptive guard mirroring #562's fix for
loop. Addsscripts/lint-skill-calls.tswhich scans every**/SKILL.mdacross.claude/skills/,templates/skills/, andskills/and fails CI if it finds an unqualifiedSkill(skill: "<name>", ...)call where<name>matches an Anthropic top-level skill.scripts/lint-skill-calls.ts(~120 LOC) — exportsfindViolations()+lintSkillCalls(), plus a CLI wrapper that exits 1 on violations.scripts/lint-skill-calls.test.ts(10 vitest cases) — unit-tests the regex against synthetic fixtures and the FS walker against per-test temp directories.validate-skillsGitHub Actions job as a newLint skill callsstep.CLAUDE.mdgains a## Skillsparagraph pointing at the lint script.[Unreleased] / ### Addedentry referencing bug(fullsolve): unqualified Skill("loop") resolves to recurring-prompt skill, breaking quality loop #562.Approach
AC-1 is a choice (a doc-only / b lint check / c both). Implemented effectively (c) lint + a thin doc note, with the lint as the load-bearing guard:
Per #562 /
project_skill_namespace_collisionsmemory: no existingSkill()calls were modified — the onlysequant:-qualified calls in-tree remain the 6 infullsolve/SKILL.mdfrom #565.Names list
Hardcoded in
ANTHROPIC_TOP_LEVEL_NAMES:loop,security-review,init,review,simplify,schedule,releaseSourced from the session-start
available-skillsreminder (which is where the harness surfaces the harness-owned competing names) plus the prior memory note. New names can be added with a one-lineconstedit when Anthropic ships another colliding skill.AC coverage
scripts/lint-skill-calls.ts+ CLAUDE.md noteLint skill callsstep invalidate-skillsjob;npm run lint:skill-callsVerification
npx vitest run scripts/lint-skill-calls.test.ts→ 10/10 in 2.27s.npm run build(tsc) → clean.npm run lint(eslint src/ bin/) → clean.Test plan
validate-skillsjob runs the newLint skill callsstep and exits 0 on a clean tree.Skill(skill: "loop", args: "x")to any SKILL.md, runningnpm run lint:skill-calls, and observing exit 1 with afile:lineviolation report.Closes #568