Skip to content

feat: add create_skill tool for spec-compliant skill scaffolding - #118

Merged
avoidwork merged 3 commits into
mainfrom
feat/create-skill-tool
Jun 6, 2026
Merged

feat: add create_skill tool for spec-compliant skill scaffolding#118
avoidwork merged 3 commits into
mainfrom
feat/create-skill-tool

Conversation

@avoidwork

@avoidwork avoidwork commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Description

Add a create_skill LangChain 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 with SKILL.md, and optionally scaffolds a scripts/ directory. Agents can then use write_file to populate instructions or create scripts.

  • 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
  • Fix outdated docs referencing skill.yaml/skill.json — now fully documents SKILL.md format
  • Update README.md Extending Skills section with spec-compliant manual and programmatic creation guides
  • Fix src/registry/src/skills/ in README directory structure (actual source layout)
  • Add create_skill to all Permission Gating and Tool Configuration tables across docs

Type of Change

  • New feature (non-breaking change which adds functionality)

Testing

Added tests/unit/skills.test.js with 38 tests covering:

  • Tool registration (exports, type, name)
  • Name validation (uppercase, leading/trailing hyphens, consecutive hyphens, underscores, empty, numeric+alpha)
  • Description validation (empty, whitespace-only, over 1024 chars, valid, minimal)
  • Permission validation (valid, invalid, mixed valid/invalid, empty array, undefined)
  • Duplicate detection (rejects when already registered in registry)
  • Skill directory creation (directory + SKILL.md creation, valid YAML frontmatter, optional license/compatibility/metadata fields, registry registration, warnings)
  • Scripts scaffolding (creates with scaffoldScripts=true, skips with false/default)
  • Return value structure (paths array on success, errors array on failure)
  • Catalog prompt generation (empty/skill entries formatting)

All 38 tests pass. Full test suite: 1054 tests pass.

Coverage

  • 100% line coverage maintained

Checklist

  • npm run lint passes
  • Tests pass with 100% line coverage
  • No forbidden patterns used
  • Conventional Commit style applied

- 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
@avoidwork avoidwork self-assigned this Jun 6, 2026
avoidwork added 2 commits June 6, 2026 17:05
…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
@avoidwork
avoidwork merged commit b649ac5 into main Jun 6, 2026
2 checks passed
@avoidwork
avoidwork deleted the feat/create-skill-tool branch June 6, 2026 21:19
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.

1 participant