Fix skill.md detection on Windows (path separator in filter) - #11
Open
Iammcqwory wants to merge 1 commit into
Open
Fix skill.md detection on Windows (path separator in filter)#11Iammcqwory wants to merge 1 commit into
Iammcqwory wants to merge 1 commit into
Conversation
walkDir() builds file paths with node:path join(), which uses backslashes on Windows. The skill-file filter in skill-md.js split paths on '/' only, so the extracted filename was the entire path (e.g. 'docs\skill.md') and never matched skill.md / skills.md / skill-*. As a result the Capability Signaling check always scored 0/10 on Windows even when skill files were present. Split on both separators so the basename is extracted correctly on all platforms. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Problem
On Windows, the Capability Signaling (
skill-md) check always scores 0/10, even when the project contains a validskill.md.walkDir()insrc/utils.jsbuilds paths withjoin()fromnode:path, which produces backslash-separated paths on Windows (e.g.docs\skill.md). The skill-file filter insrc/checkers/skill-md.jsthen does:Since the path contains no forward slashes on Windows,
split('/')returns the whole path as a single element, sonameends up as e.g.docs\skill.mdand never equalsskill.md/skills.mdor starts withskill-. Every skill file is filtered out and the checker reports "No skill.md files found."Reproduction (Windows)
npx agentic-seo audit <dir>against any project containing askill.md(or against this repo's own test fixturetest/fixtures/good-site).No skill.md files found.and scores 0/10, while the same command on macOS/Linux finds the file and scores normally.The existing test
skill-md checker > should pass for good-site with skill.mdalso fails when the suite is run on Windows.Fix
Split on both separators when extracting the basename:
I audited the rest of
src/for the same pattern — this is the only place a filesystem path is split on'/'(othersplit()usages operate on robots.txt content, CLI flags, and message strings, andrelativePath()correctly usespath.relative).Verification
Full test suite passes on Windows 11 after the fix: 42/42 tests pass, including the previously failing skill-md checker test.
🤖 Generated with Claude Code