fix(skills): ignore internal asset markdown during skill lookup - #37164
fix(skills): ignore internal asset markdown during skill lookup#37164westkite1201 wants to merge 1 commit into
Conversation
Legacy flat skill lookup scanned every matching markdown file under the skills root, including templates and references owned by another skill. That made valid skills such as productivity/notion look ambiguous when another skill shipped an internal notion.md asset. This keeps legacy flat lookup but skips markdown files whose ancestors already define a skill. Constraint: Preserve collision detection for real same-name skills across local and external skill dirs Constraint: Preserve legacy top-level <name>.md skill loading Rejected: Remove recursive legacy flat lookup entirely | broader compatibility break for old-style skills Confidence: high Scope-risk: narrow Tested: uv run --with pytest-timeout pytest tests/tools/test_skills_tool.py -q Tested: uv run ruff check tools/skills_tool.py tests/tools/test_skills_tool.py Tested: python3 -m py_compile tools/skills_tool.py tests/tools/test_skills_tool.py && git diff --check Tested: python3 scripts/check-windows-footguns.py --diff origin/main Not-tested: Full repository test suite
|
Verified this fix is correct. The bug: Strategy 3 in Fix validation: The new Edge case: The function returns |
Summary
<name>.mdskill lookup while skipping markdown files inside another skill directoryTesting
uv run --with pytest-timeout pytest tests/tools/test_skills_tool.py -quv run ruff check tools/skills_tool.py tests/tools/test_skills_tool.pypython3 -m py_compile tools/skills_tool.py tests/tools/test_skills_tool.py && git diff --checkpython3 scripts/check-windows-footguns.py --diff origin/mainNotes