{"id":39002464,"url":"https://github.com/onmax/npm-agentskills","last_synced_at":"2026-01-17T17:13:05.032Z","repository":{"id":331855854,"uuid":"1132112420","full_name":"onmax/npm-agentskills","owner":"onmax","description":"Framework-agnostic skill discovery and export for AI coding agents","archived":false,"fork":false,"pushed_at":"2026-01-11T12:35:07.000Z","size":149,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T15:55:28.115Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/agentskills/agentskills/issues/81","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onmax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-11T10:57:18.000Z","updated_at":"2026-01-11T15:14:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/onmax/npm-agentskills","commit_stats":null,"previous_names":["onmax/npm-agentskills"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/onmax/npm-agentskills","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Fnpm-agentskills","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Fnpm-agentskills/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Fnpm-agentskills/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Fnpm-agentskills/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onmax","download_url":"https://codeload.github.com/onmax/npm-agentskills/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2Fnpm-agentskills/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28512061,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T17:13:04.485Z","updated_at":"2026-01-17T17:13:04.990Z","avatar_url":"https://github.com/onmax.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# npm-agentskills\n\nBundle agent skills with your npm packages to help AI assistants understand your library.\n\n## What Are Agent Skills?\n\nAgent Skills provide contextual documentation that AI coding assistants load automatically. When developers use your library, their AI agent reads your skill to deliver accurate guidance on your API, patterns, and best practices.\n\nSkills follow the [agentskills](https://agentskills.io) open format, supported by Claude Code, GitHub Copilot, Cursor, and other AI coding tools.\n\nThis package enables library authors to bundle skills with their npm packages. When users install your package, their AI agent discovers and exports the skills to the appropriate location.\n\n## Installation\n\n```bash\nnpm install npm-agentskills\n```\n\n## For Library Authors: Bundling Skills\n\nAdd an `agents` field to your `package.json` that points to skill directories:\n\n```json\n{\n  \"name\": \"my-awesome-library\",\n  \"agents\": {\n    \"skills\": [\n      { \"name\": \"my-skill\", \"path\": \"./skills/my-skill\" }\n    ]\n  }\n}\n```\n\nCreate skill directories with a `SKILL.md` file:\n\n```\nskills/my-skill/\n├── SKILL.md           # Required: entry point with frontmatter\n└── references/        # Optional: additional documentation files\n    └── api.md\n```\n\n**Learn how to write skills:** See the [agentskills.io specification](https://agentskills.io/specification) for the complete guide on creating effective agent skills.\n\n## For End Users: Installing Skills\n\n### Nuxt Applications (Automatic)\n\nAdd the module to your Nuxt config. The module automatically discovers skills from `node_modules` and exports them when you run `nuxi prepare` or `nuxi dev`:\n\n```ts [nuxt.config.ts]\nexport default defineNuxtConfig({\n  modules: ['npm-agentskills/nuxt'],\n  agents: {\n    targets: ['claude', 'cursor'],\n  },\n})\n```\n\nThe module scans your dependencies for packages with `agents` fields and exports their skills to project-local directories.\n\n### Other Frameworks (CLI)\n\nRun the CLI after installing packages that contain skills:\n\n```bash\n# Export skills to Claude Code\nnpx agents export --target claude\n\n# Export to multiple agents\nnpx agents export --target cursor\nnpx agents export --target codex\n\n# List all discovered skills\nnpx agents list\n```\n\nAdd this to your `postinstall` script for automatic exports:\n\n```json [package.json]\n{\n  \"scripts\": {\n    \"postinstall\": \"agents export --target claude\"\n  }\n}\n```\n\n## Supported Agents\n\nAll paths are project-local, keeping skills scoped to your project rather than polluting global configuration.\n\n| Agent      | Directory            | Documentation |\n|------------|----------------------|---------------|\n| Claude     | `.claude/skills/`    | [docs](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/skills) |\n| Copilot    | `.github/skills/`    | [docs](https://docs.github.com/en/copilot/concepts/agents/about-agent-skills) |\n| Cursor     | `.cursor/skills/`    | [docs](https://cursor.com/docs/context/skills) |\n| Codex      | `.codex/skills/`     | [docs](https://developers.openai.com/codex/skills) |\n| OpenCode   | `.opencode/skill/`   | [docs](https://opencode.ai/docs/skills) |\n| Amp        | `.agents/skills/`    | [docs](https://ampcode.com/news/agent-skills) |\n| Goose      | `.goose/skills/`     | [docs](https://block.github.io/goose/docs/guides/context-engineering/using-skills) |\n\n### Cross-Agent Compatibility\n\nMany agents read from multiple directories for compatibility:\n\n- **Goose** also reads `.claude/skills/` and `.agents/skills/`\n- **OpenCode** also reads `.claude/skills/`\n- **Amp** uses the portable `.agents/skills/` convention\n\nIf you target `claude`, your skills will work with Goose and OpenCode automatically.\n\n## Programmatic API\n\nUse the core functions directly in build tools or custom integrations:\n\n```ts\nimport {\n  exportToTargets,\n  generateManifest,\n  resolveSkills,\n  scanForSkillPackages,\n  scanLocalPackage,\n} from 'npm-agentskills'\n\n// Scan node_modules for packages with agents field\nconst packageSkills = await scanForSkillPackages('./node_modules')\n\n// Scan local package.json for skills defined in this project\nconst localSkills = await scanLocalPackage('./')\n\n// Resolve and deduplicate skills\nconst skills = await resolveSkills(packageSkills, localSkills)\n\n// Export to agent directories\nawait exportToTargets(skills, ['claude', 'cursor'], './')\n\n// Generate manifest for debugging\nconst manifest = generateManifest(skills)\n```\n\n## CLI Reference\n\n```bash\n# List all discovered skills with their sources\nagents list\nagents list --json          # Output as JSON\n\n# Export skills to agent directory\nagents export --target claude\nagents export --target cursor\nagents export --dest ./custom-path  # Custom destination\n\n# Options\n--cwd \u003cdir\u003e      # Project root (default: current directory)\n--dir \u003cdir\u003e      # Skills directory (default: node_modules/.cache/agentskills)\n```\n\n## How It Works\n\n1. **Discovery**: Scans `node_modules` for packages with an `agents` field in their `package.json`\n2. **Resolution**: Reads each skill's `SKILL.md` file and parses the frontmatter metadata\n3. **Export**: Copies skill directories to the appropriate agent location\n4. **Manifest**: Generates a `manifest.json` file listing all discovered skills\n\nFor Nuxt, the module handles this automatically during `nuxi prepare`. For other frameworks, you run the CLI manually or via npm scripts.\n\n## Testing Your Skills\n\nVerify the tool discovers your skills correctly:\n\n```bash\n# List discovered skills\nnpx agents list\n\n# Export to agent directory\nnpx agents export --target claude\n\n# Verify files exist\nls -la .claude/skills/your-skill/\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmax%2Fnpm-agentskills","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonmax%2Fnpm-agentskills","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmax%2Fnpm-agentskills/lists"}