Tip
This proposal complements the filesystem discussions in #63 and #27 by providing a distribution mechanism for the JavaScript ecosystem.
Context & Problem
The current Agent Skills specification defines the format of SKILL.md files but does not standardize how these skills are distributed to developers.
Currently, there is no standard way to:
Bundle skills alongside the code they document.
Auto-discover skills installed via package managers.
Ensure skills stay version-locked with the library code.
Related: #27 , #63 , #9
Proposal
Add an optional agentskills field to package.json. This allows library authors to declare the skills contained within their npm packages.
Schema Definition
{
"name" : " my-library" ,
"agentskills" : {
"skills" : [
{ "name" : " my-skill" , "path" : " ./skills/my-skill" }
]
},
"files" : [" dist" , " skills" ]
}
name : Lowercase, hyphenated unique identifier for the skill.
path : Relative path from package root to directory containing SKILL.md.
Benefits
Version Locking: Skills are versioned with the code. Install v2.0.0 of a library, get v2.0.0 skills.
Single Install: npm install my-library installs both the code and the agent instructions.
Infrastructure: Leverages existing npm caching, distribution, and security scanning.
Auto-Discovery: Agents can scan node_modules to find all available capabilities.
Reference Implementation
I have built a working implementation: npm-agentskills .
Features:
Scans node_modules for the agentskills field
Exports skills to agent-specific directories
CLI: agentskills list and agentskills export --target <agent>
Nuxt module for automatic export on nuxi prepare
Programmatic API for custom integrations
Real-world Example:
onmax/nuxt-better-auth#58
Related
Supported Targets
Agent
Target Path
Claude
.claude/skills/
GitHub Copilot
.github/skills/
Cursor
.cursor/skills/
Codex
.codex/skills/
OpenCode
.opencode/skill/
Amp
.agents/skills/
Goose
.goose/skills/
Ecosystem & Compatibility
Future Scope
While this proposal focuses on npm/package.json, the pattern is applicable to other ecosystems:
Rust: Cargo.toml metadata
Python: pyproject.toml metadata
Deno/Bun: Compatible with package.json usage
Tip
This proposal complements the filesystem discussions in #63 and #27 by providing a distribution mechanism for the JavaScript ecosystem.
Context & Problem
The current Agent Skills specification defines the format of
SKILL.mdfiles but does not standardize how these skills are distributed to developers.Currently, there is no standard way to:
Related: #27, #63, #9
Proposal
Add an optional
agentskillsfield topackage.json. This allows library authors to declare the skills contained within their npm packages.Schema Definition
{ "name": "my-library", "agentskills": { "skills": [ { "name": "my-skill", "path": "./skills/my-skill" } ] }, "files": ["dist", "skills"] }name: Lowercase, hyphenated unique identifier for the skill.path: Relative path from package root to directory containingSKILL.md.Benefits
v2.0.0of a library, getv2.0.0skills.npm install my-libraryinstalls both the code and the agent instructions.node_modulesto find all available capabilities.Reference Implementation
I have built a working implementation:
npm-agentskills.Features:
node_modulesfor theagentskillsfieldagentskills listandagentskills export --target <agent>nuxi prepareReal-world Example:
onmax/nuxt-better-auth#58
Related
Supported Targets
.claude/skills/.github/skills/.cursor/skills/.codex/skills/.opencode/skill/.agents/skills/.goose/skills/Ecosystem & Compatibility
Future Scope
While this proposal focuses on
npm/package.json, the pattern is applicable to other ecosystems:Cargo.tomlmetadatapyproject.tomlmetadatapackage.jsonusage