feat: add create_skill tool for spec-compliant skill scaffolding - #118
Merged
Conversation
- Add createSkillImpl to src/tools/skills.js with full Agent Skills spec validation - Register tool in src/tools/index.js gated by filesystem:write permission - Add createCreateSkillTool factory for runtime options binding - Create tests/unit/skills.test.js with 38 tests covering name/desc/permission validation, duplicate detection, directory creation, YAML frontmatter generation, scripts scaffolding, and registry registration - Tool creates skill directory, writes SKILL.md with validated YAML frontmatter, and optionally scaffolds scripts/ directory with README placeholder
…Skills spec - Add create_skill to Built-in Tools table (README, OVERVIEW) - Fix Skills Registry section: SKILL.md vs old skill.yaml/skill.json docs - Add create_skill to Permission Gating tables in README and OVERVIEW - Fix Directory Structure: src/skills/ not src/registry/ - Rewrite Extending Skills: document SKILL.md format + create_skill programmatic creation - Update OVERVIEW.md Registry/Skills section with correct SKILL.md discovery info - Update FLOWS.md: add create_skill to Tool Config Building, Permission Enforcement, File Dependencies - Fix FLOWS.md Skill Discovery: only SKILL.md (not skill.yaml/skill.json)
- Change registry/ → skills/ in Expected Project Layout - Add index.js to skills/ file listing - Expand tests/unit/ to mirror actual test file inventory
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.
Description
Add a
create_skillLangChain tool that creates Agent Skills spec-compliant skills from agent invocations. The tool validates all metadata against the spec (name constraints, description length, permission scopes), creates the skill directory structure withSKILL.md, and optionally scaffolds ascripts/directory. Agents can then usewrite_fileto populate instructions or create scripts.createSkillImpltosrc/tools/skills.jswith full Agent Skills spec validationsrc/tools/index.jsgated byfilesystem:writepermissioncreateCreateSkillToolfactory for runtime options bindingtests/unit/skills.test.jswith 38 tests covering name/desc/permission validation,duplicate detection, directory creation, YAML frontmatter generation, scripts scaffolding,
and registry registration
skill.yaml/skill.json— now fully documents SKILL.md formatsrc/registry/→src/skills/in README directory structure (actual source layout)create_skillto all Permission Gating and Tool Configuration tables across docsType of Change
Testing
Added
tests/unit/skills.test.jswith 38 tests covering:All 38 tests pass. Full test suite: 1054 tests pass.
Coverage
Checklist
npm run lintpasses