Skip to content

Conversation

@ThanhNguyxn
Copy link
Contributor

@ThanhNguyxn ThanhNguyxn commented Jan 27, 2026

Summary

Fixes #1021

  • Added support for YAML array format in allowed-tools frontmatter field
  • Skills can now use either format:
    • Space-separated: allowed-tools: Read Write Edit Bash
    • YAML array: allowed-tools: [Read, Write, Edit, Bash]
    • Multi-line YAML array format also works

Changes

  • Updated parseAllowedTools() in loader.ts, async-loader.ts, and merger.ts to handle both string and string[] types
  • Updated SkillMetadata type to accept string | string[] for allowed-tools field
  • Added 4 new test cases covering all allowed-tools formats

Testing

  • All 62 skill-loader tests pass
  • Typecheck passes

Summary by cubic

Skills frontmatter now supports YAML array format for the allowed-tools field, alongside space-separated lists. This fixes parsing issues that hid some skills from the available list.

  • Bug Fixes
    • Supports "Read Write Edit Bash", "[Read, Write, Edit, Bash]", and multi-line YAML arrays.
    • Updated parseAllowedTools in loader.ts, async-loader.ts, and merger.ts; SkillMetadata accepts string | string[].
    • Added tests for all formats; existing skill-loader tests pass.

Written for commit f1ae52c. Summary will update on new commits.

Fixes code-yeongyu#1021

The allowed-tools field in skill frontmatter now supports both formats:
- Space-separated string: 'allowed-tools: Read Write Edit Bash'
- YAML array: 'allowed-tools: [Read, Write, Edit, Bash]'
- Multi-line YAML array format also works

Previously, skills using YAML array format would silently fail to parse,
causing them to not appear in the <available_skills> list.

Changes:
- Updated parseAllowedTools() in loader.ts, async-loader.ts, and merger.ts
  to handle both string and string[] types
- Updated SkillMetadata type to accept string | string[] for allowed-tools
- Added 4 test cases covering all allowed-tools formats
Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@code-yeongyu code-yeongyu merged commit 48f6c5e into code-yeongyu:dev Jan 28, 2026
3 checks passed
@code-yeongyu
Copy link
Owner

Thanks for adding YAML array support! This makes skill configuration more flexible and fixes the parsing issue. 👍

code-yeongyu pushed a commit that referenced this pull request Jan 28, 2026
Fixes #1021

The allowed-tools field in skill frontmatter now supports both formats:
- Space-separated string: 'allowed-tools: Read Write Edit Bash'
- YAML array: 'allowed-tools: [Read, Write, Edit, Bash]'
- Multi-line YAML array format also works

Previously, skills using YAML array format would silently fail to parse,
causing them to not appear in the <available_skills> list.

Changes:
- Updated parseAllowedTools() in loader.ts, async-loader.ts, and merger.ts
  to handle both string and string[] types
- Updated SkillMetadata type to accept string | string[] for allowed-tools
- Added 4 test cases covering all allowed-tools formats
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.

[Bug]: Skills with YAML array allowed-tools field not appearing in <available_skills> list

2 participants