Skip to content

skills readme was getting junk files#967

Merged
aaronpowell merged 1 commit intostagedfrom
fixing-skills-readme
Mar 10, 2026
Merged

skills readme was getting junk files#967
aaronpowell merged 1 commit intostagedfrom
fixing-skills-readme

Conversation

@aaronpowell
Copy link
Contributor

@aaronpowell aaronpowell commented Mar 10, 2026

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, agent, skill, or workflow 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, agent, skill, or workflow with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.

Description


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • Update to existing instruction, prompt, agent, plugin, skill, or workflow.
  • Other (please specify):

Additional Notes


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

Copilot AI review requested due to automatic review settings March 10, 2026 23:44
@aaronpowell aaronpowell merged commit f12b83c into staged Mar 10, 2026
5 checks passed
@aaronpowell aaronpowell deleted the fixing-skills-readme branch March 10, 2026 23:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to prevent the generated Skills README from listing “junk”/overly-verbose bundled asset paths by changing how skill asset paths are discovered and then updating the generated docs/README.skills.md output accordingly.

Changes:

  • Restricts skill asset recursion in parseSkillMetadata() to specific top-level directories.
  • Updates the generated skills table to show some bundled assets as directory entries (e.g., templates, examples, scripts/cache-generator) instead of enumerating every file.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
eng/yaml-parser.mjs Changes skill asset enumeration logic (affects README generation and other consumers of assets).
docs/README.skills.md Regenerated skills README reflecting the new bundled-asset listing behavior.
Comments suppressed due to low confidence (1)

eng/yaml-parser.mjs:146

  • The inline comment says this lists "all files" and "recursing through subdirectories", but the updated logic only recurses into a small allowlist of directory names and may add directories themselves to the assets list. Please update the comment to match the new behavior so future readers don’t assume it’s a full recursive file walk.
      // List bundled assets (all files except SKILL.md), recursing through subdirectories
      const getAllFiles = (dirPath, arrayOfFiles = []) => {

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +148 to 155
const assetPaths = ['references', 'assets', 'scripts'];

files.forEach((file) => {
const filePath = path.join(dirPath, file);
if (fs.statSync(filePath).isDirectory()) {
if (fs.statSync(filePath).isDirectory() && assetPaths.includes(file)) {
arrayOfFiles = getAllFiles(filePath, arrayOfFiles);
} else {
const relativePath = path.relative(skillPath, filePath);
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing getAllFiles to only recurse into references/assets/scripts means metadata.assets can now include directory entries (e.g., templates, examples, scripts/cache-generator) instead of listing all files. Downstream consumers treat assets as files (e.g., validate-skills checks each asset path size via statSync), so directories will bypass per-file size validation and also skew asset counts in website metadata. Consider keeping parseSkillMetadata().assets as a full file list (and collapse/group only when rendering the README), or update the validation/consumers to recurse into directories when an asset entry is a folder.

This issue also appears on line 145 of the same file.

See below for a potential fix:


        files.forEach((file) => {
          const filePath = path.join(dirPath, file);
          const stat = fs.statSync(filePath);
          if (stat.isDirectory()) {

Copilot uses AI. Check for mistakes.
// List bundled assets (all files except SKILL.md), recursing through subdirectories
const getAllFiles = (dirPath, arrayOfFiles = []) => {
const files = fs.readdirSync(dirPath);
const assetPaths = ['references', 'assets', 'scripts'];
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quote style is inconsistent with the rest of this file (which primarily uses double quotes). To keep formatting consistent and avoid lint/prettier churn, consider switching ['references', 'assets', 'scripts'] to use double-quoted strings.

Suggested change
const assetPaths = ['references', 'assets', 'scripts'];
const assetPaths = ["references", "assets", "scripts"];

Copilot uses AI. Check for mistakes.
rbgmulmb pushed a commit to rbgmulmb/awesome-copilot that referenced this pull request Mar 11, 2026
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.

2 participants