feat(skills): support multi-part inline skills with asset files#22
Merged
Conversation
## Intent Inline skills defined in `ade.extensions.mjs` were limited to a single `body` (SKILL.md content). The agentskills.io progressive disclosure pattern calls for additional asset files (references/, scripts/, etc.) that agents load only when needed. This change enables that pattern for inline skills. Also fixes a bug where `writeInlineSkills` had inverted change-detection logic (marking a skill as modified when unchanged, and silently skipping the write when content differed). Fixes a YAML frontmatter quoting bug that caused agentskills to reject SKILL.md files whose description contained colon-space sequences. ## Key changes - `InlineSkill` gains an optional `assets?: Record<string, string>` field. Keys are relative paths (e.g. `references/folder-structure.md`); values are file contents. The path-as-type convention maps 1:1 to the output structure under `.ade/skills/<name>/`. - `writeInlineSkills` now writes asset files alongside SKILL.md, creating subdirectories as needed, and tracks the skill as modified only when any file content actually changes (idempotent on re-run). - `formatYamlValue` helper added: wraps YAML scalar values in double-quotes when they contain characters a YAML parser would misinterpret (colon-space, hash, leading indicator chars such as `@`). Used for the description field in generated SKILL.md frontmatter.
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.
Intent
Inline skills defined in
ade.extensions.mjswere limited to a singlebody(SKILL.md content). The agentskills.io progressive disclosure pattern calls for additional asset files (references/, scripts/, etc.) that agents load only when needed. This change enables that pattern for inline skills.Also fixes a bug where
writeInlineSkillshad inverted change-detection logic (marking a skill as modified when unchanged, and silently skipping the write when content differed). Fixes a YAML frontmatter quoting bug that caused agentskills to reject SKILL.md files whose description contained colon-space sequences.Key changes
InlineSkillgains an optionalassets?: Record<string, string>field. Keys are relative paths (e.g.references/folder-structure.md); values are file contents. The path-as-type convention maps 1:1 to the output structure under.ade/skills/<name>/.writeInlineSkillsnow writes asset files alongside SKILL.md, creating subdirectories as needed, and tracks the skill as modified only when any file content actually changes (idempotent on re-run).formatYamlValuehelper added: wraps YAML scalar values in double-quotes when they contain characters a YAML parser would misinterpret (colon-space, hash, leading indicator chars such as@). Used for the description field in generated SKILL.md frontmatter.