Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 11, 2026

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, or chat mode file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, or chat mode with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.

Description

The update-readme.mjs script generates README files containing skill asset paths. Previously, these paths would use OS-specific separators (\ on Windows, / on Unix), causing CI validation failures when contributors on different platforms generated the files.

The fix normalizes all path separators to forward slashes in eng/yaml-parser.mjs at line 176:

const relativePath = path.relative(skillPath, filePath);
if (relativePath !== "SKILL.md") {
  // Normalize path separators to forward slashes for cross-platform consistency
  arrayOfFiles.push(relativePath.replace(/\\/g, '/'));
}

This ensures identical README output regardless of build platform, preventing diff-based CI failures.

Verification:

  • Build script executes without git diff on Linux
  • Generated docs contain zero backslashes
  • Skill asset paths use forward slashes consistently (e.g., references/templates.md, examples/appinsights.bicep)

Type of Contribution

  • New instruction file.
  • New prompt file.
  • New chat mode file.
  • New collection file.
  • New skill file.
  • Update to existing instruction, prompt, chat mode, collection or skill.
  • Other (please specify): Build script verification/bug fix

Additional Notes

The fix was already present in the codebase. This PR verifies correct implementation and platform-agnostic behavior.


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Original prompt

This section details on the original issue you should resolve

<issue_title>update-readme.mjs generates different content on different os</issue_title>
<issue_description>update-readme.mjs generates content that contains bundled files for each skill. Skills can have nested folders/files. Currently it generates file paths with / as delimiter on non-Windows platforms and file paths with \ as delimiter on Windows due to how path.join works. From what I can tell, a CI task checks the diff of the committed readme content vs. its locally generated readme content which will fail if the user generated the readme content on Windows. Idealy the script should generate platform agnostic content which will also make cross platform collaboration easier.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Update update-readme.mjs for platform agnostic file paths Verify platform-agnostic path generation in README build script Jan 11, 2026
Copilot AI requested a review from aaronpowell January 11, 2026 22:14
@aaronpowell
Copy link
Contributor

@copilot there appears to be no changes, is that right?

Copy link
Contributor Author

Copilot AI commented Jan 11, 2026

@copilot there appears to be no changes, is that right?

Yes, that's correct. The fix for platform-agnostic path generation is already present in the base code at eng/yaml-parser.mjs line 176:

arrayOfFiles.push(relativePath.replace(/\\/g, '/'));

This normalizes all Windows backslashes to forward slashes, ensuring identical README output on all platforms. The issue was already resolved in a previous commit, so no changes are needed in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update-readme.mjs generates different content on different os

2 participants