{"_id":"@402md/skillmd","_rev":"6-4a2c0c2ad29033fbb7870a7b59ee6ab7","name":"@402md/skillmd","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@402md/skillmd","version":"0.1.0","keywords":["skillmd","skill.md","x402","402","ai-agents","payment","protocol","parser","validator"],"license":"MIT","_id":"@402md/skillmd@0.1.0","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"homepage":"https://github.com/402md/skillmd#readme","bugs":{"url":"https://github.com/402md/skillmd/issues"},"dist":{"shasum":"47bec0f2078aaabe1f3b82440346d643f52c1f47","tarball":"https://registry.npmjs.org/@402md/skillmd/-/skillmd-0.1.0.tgz","fileCount":8,"integrity":"sha512-VPN2l+uyK0HjPfR77ZJh6baMNNL9Bf8q9avqjAbOlXh9xfTHW1ukVDjS1bkFOEEWQk65hvh71hgnGNo3fMatfA==","signatures":[{"sig":"MEUCIQCAhCUFwjagKnDuPPdEfZNtGjp/kEkjTlgS03w+lfyMYQIgKSyOxgR/PNW8CUVJrR0E3l8M43YmT2UU4PyuHye8PFM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":155472},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"a700e31085123a2b4d07db26b2f340e1bfd57751","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup","format":"prettier --write 'src/**/*.ts' '__tests__/**/*.ts'","prepare":"husky","lint:fix":"eslint src/ --fix","test:cov":"vitest run --coverage","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check 'src/**/*.ts' '__tests__/**/*.ts'","prepublishOnly":"npm run build"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"repository":{"url":"git+https://github.com/402md/skillmd.git","type":"git"},"_npmVersion":"11.2.0","description":"Parser, validator, and generator for SKILL.md — the spec-as-code for paid AI agent skills","directories":{},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"_nodeVersion":"22.13.1","dependencies":{"yaml":"^2.7.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","husky":"^9.1.7","eslint":"^9.28.0","vitest":"^3.2.1","globals":"^16.1.0","prettier":"^3.5.3","@eslint/js":"^9.28.0","typescript":"^5.8.3","@types/node":"^22.15.21","lint-staged":"^16.1.0","typescript-eslint":"^8.34.0","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/skillmd_0.1.0_1773436577870_0.36110662380052627","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@402md/skillmd","version":"0.1.1","keywords":["skillmd","skill.md","x402","402","ai-agents","payment","protocol","parser","validator"],"license":"MIT","_id":"@402md/skillmd@0.1.1","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"homepage":"https://github.com/402md/skillmd#readme","bugs":{"url":"https://github.com/402md/skillmd/issues"},"dist":{"shasum":"7a45b7fda209ad7c97d38cf7dbd9bd2cf276cc9b","tarball":"https://registry.npmjs.org/@402md/skillmd/-/skillmd-0.1.1.tgz","fileCount":8,"integrity":"sha512-tqDaqnHrk1VWeBjeMo8+2YnnWBJ53yjQ0bZAQA4f6p398uU5fHxZ2WWvv50xZHwHNzsvu6MWDIYxI33UeTVBHg==","signatures":[{"sig":"MEUCIQCHJmo3ul8lkmHIefV/ALLWC39TNzeL8gbduL8AYdNHmAIgd0geQwRzt3eeyOhKHnMFXu8lG9ksR459NGLNbEcUBtA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":155472},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"a700e31085123a2b4d07db26b2f340e1bfd57751","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup","format":"prettier --write 'src/**/*.ts' '__tests__/**/*.ts'","prepare":"husky","lint:fix":"eslint src/ --fix","test:cov":"vitest run --coverage","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check 'src/**/*.ts' '__tests__/**/*.ts'","prepublishOnly":"npm run build"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"repository":{"url":"git+https://github.com/402md/skillmd.git","type":"git"},"_npmVersion":"11.2.0","description":"Parser, validator, and generator for SKILL.md — the spec-as-code for paid AI agent skills","directories":{},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"_nodeVersion":"22.13.1","dependencies":{"yaml":"^2.7.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","husky":"^9.1.7","eslint":"^9.28.0","vitest":"^3.2.1","globals":"^16.1.0","prettier":"^3.5.3","@eslint/js":"^9.28.0","typescript":"^5.8.3","@types/node":"^22.15.21","lint-staged":"^16.1.0","typescript-eslint":"^8.34.0","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/skillmd_0.1.1_1773436910680_0.2918540929510831","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@402md/skillmd","version":"0.1.2","keywords":["skillmd","skill.md","x402","402","ai-agents","payment","protocol","parser","validator"],"license":"MIT","_id":"@402md/skillmd@0.1.2","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"homepage":"https://github.com/402md/skillmd#readme","bugs":{"url":"https://github.com/402md/skillmd/issues"},"dist":{"shasum":"32149cc2b784412a878133e4f55e5974dd6ca9c1","tarball":"https://registry.npmjs.org/@402md/skillmd/-/skillmd-0.1.2.tgz","fileCount":8,"integrity":"sha512-Rgb1cdvTZdkm9y4urotseymDYE7lWPs7zXfCWUI9L0OnQThoRMbOhFcEXKuNo0pGQSQU8TYF/3KWOMSuoGNTwQ==","signatures":[{"sig":"MEUCIE2NJMOqMp8zIe+WBhmF+3VjSsHqv3Z9pZpl/YvZHUTGAiEA5yFt3sHcCeYmR45oQCEPM3GCuOMMofwidjK+jheQFYU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":185603},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"95d97fcbcc4a998ae66c825d1c28d1693fe23fcb","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup","format":"prettier --write 'src/**/*.ts' '__tests__/**/*.ts'","prepare":"husky","lint:fix":"eslint src/ --fix","test:cov":"vitest run --coverage","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check 'src/**/*.ts' '__tests__/**/*.ts'","prepublishOnly":"npm run build"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"repository":{"url":"git+https://github.com/402md/skillmd.git","type":"git"},"_npmVersion":"11.2.0","description":"Parser, validator, and generator for SKILL.md — the spec-as-code for paid AI agent skills","directories":{},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"_nodeVersion":"22.13.1","dependencies":{"yaml":"^2.7.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","husky":"^9.1.7","eslint":"^9.28.0","vitest":"^3.2.1","globals":"^16.1.0","prettier":"^3.5.3","@eslint/js":"^9.28.0","typescript":"^5.8.3","@types/node":"^22.15.21","lint-staged":"^16.1.0","typescript-eslint":"^8.34.0","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/skillmd_0.1.2_1773537977606_0.6696968956186158","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@402md/skillmd","version":"0.1.3","keywords":["skillmd","skill.md","x402","402","ai-agents","payment","protocol","parser","validator"],"license":"MIT","_id":"@402md/skillmd@0.1.3","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"homepage":"https://github.com/402md/skillmd#readme","bugs":{"url":"https://github.com/402md/skillmd/issues"},"dist":{"shasum":"4bb63546c14aee5dba4d0874806bbe5d31b1252a","tarball":"https://registry.npmjs.org/@402md/skillmd/-/skillmd-0.1.3.tgz","fileCount":8,"integrity":"sha512-5AWzkADE8/M//8lThDI2iZWXErZgdgfchYXRv7MUJuVvX44dx9MOSau923RybdvuYL+zV2T0LqMn5L8KNrwmUw==","signatures":[{"sig":"MEUCIQDVmGYGsPi6I5WqyMEPqPSawal/KLbAv0YSDRg04LFxmgIgGyhZB+YNrQ0R+mvQKcOTRmq2ZNBfFp7v9zMDqJ/h0zU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187757},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"079987df84b8304c2275a17d7596a9cceb8140b0","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup","format":"prettier --write 'src/**/*.ts' '__tests__/**/*.ts'","prepare":"husky","lint:fix":"eslint src/ --fix","test:cov":"vitest run --coverage","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check 'src/**/*.ts' '__tests__/**/*.ts'","prepublishOnly":"npm run build"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"repository":{"url":"git+https://github.com/402md/skillmd.git","type":"git"},"_npmVersion":"11.2.0","description":"Parser, validator, and generator for SKILL.md — the spec-as-code for paid AI agent skills","directories":{},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"_nodeVersion":"22.13.1","dependencies":{"yaml":"^2.7.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","husky":"^9.1.7","eslint":"^9.28.0","vitest":"^3.2.1","globals":"^16.1.0","prettier":"^3.5.3","@eslint/js":"^9.28.0","typescript":"^5.8.3","@types/node":"^22.15.21","lint-staged":"^16.1.0","typescript-eslint":"^8.34.0","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/skillmd_0.1.3_1773538882447_0.3996347483990428","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@402md/skillmd","version":"0.1.4","keywords":["skillmd","skill.md","x402","402","ai-agents","payment","protocol","parser","validator"],"license":"MIT","_id":"@402md/skillmd@0.1.4","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"homepage":"https://github.com/402md/skillmd#readme","bugs":{"url":"https://github.com/402md/skillmd/issues"},"dist":{"shasum":"3fc5554108f473dd02915f06e3b5eb625fb14f74","tarball":"https://registry.npmjs.org/@402md/skillmd/-/skillmd-0.1.4.tgz","fileCount":8,"integrity":"sha512-veUm0UGlqyT2OWOAB3BrkVKuUD8tAiPT1Lyyneulp4+Y/FUkxsYHtIawyPVMiXaGwlhDxNHOtIhU6SY6JR/BWQ==","signatures":[{"sig":"MEQCIFA4Ie6JByyj8tHrIoRMbTWLLgnD2URrSOyH6OoZ0zrBAiBF4m0JDffK5SoVWdPQ5FUOZp++Y0Shoz5U8Tbd/vlwkw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":232811},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"gitHead":"b512b6aa1410196139223b555783c30c4728fc22","scripts":{"dev":"tsup --watch","lint":"eslint src/","test":"vitest run","build":"tsup","format":"prettier --write 'src/**/*.ts' '__tests__/**/*.ts'","prepare":"husky","lint:fix":"eslint src/ --fix","test:cov":"vitest run --coverage","typecheck":"tsc --noEmit","test:watch":"vitest","format:check":"prettier --check 'src/**/*.ts' '__tests__/**/*.ts'","prepublishOnly":"npm run build"},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"repository":{"url":"git+https://github.com/402md/skillmd.git","type":"git"},"_npmVersion":"11.2.0","description":"Parser, validator, and generator for SKILL.md — the spec-as-code for paid AI agent skills","directories":{},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"_nodeVersion":"22.13.1","dependencies":{"yaml":"^2.7.1"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","husky":"^9.1.7","eslint":"^9.28.0","vitest":"^3.2.1","globals":"^16.1.0","prettier":"^3.5.3","@eslint/js":"^9.28.0","typescript":"^5.8.3","@types/node":"^22.15.21","lint-staged":"^16.1.0","typescript-eslint":"^8.34.0","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/skillmd_0.1.4_1773962890411_0.535722064083888","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@402md/skillmd","version":"0.1.5","description":"Parser, validator, and generator for SKILL.md — the spec-as-code for paid AI agent skills","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"build":"tsup","dev":"tsup --watch","lint":"eslint src/","lint:fix":"eslint src/ --fix","format":"prettier --write 'src/**/*.ts' '__tests__/**/*.ts'","format:check":"prettier --check 'src/**/*.ts' '__tests__/**/*.ts'","typecheck":"tsc --noEmit","test":"vitest run","test:watch":"vitest","test:cov":"vitest run --coverage","prepublishOnly":"npm run build","prepare":"husky"},"dependencies":{"yaml":"^2.7.1"},"devDependencies":{"@eslint/js":"^9.28.0","@types/node":"^22.15.21","eslint":"^9.28.0","eslint-config-prettier":"^10.1.5","eslint-plugin-prettier":"^5.4.0","globals":"^16.1.0","husky":"^9.1.7","lint-staged":"^16.1.0","prettier":"^3.5.3","tsup":"^8.5.0","typescript":"^5.8.3","typescript-eslint":"^8.34.0","vitest":"^3.2.1"},"lint-staged":{"*.ts":["eslint --fix","prettier --write"]},"keywords":["skillmd","skill.md","x402","402","ai-agents","payment","protocol","parser","validator"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/402md/skillmd.git"},"engines":{"node":">=18"},"_id":"@402md/skillmd@0.1.5","gitHead":"000db94621b7bb5a1717e994a7d2514a38909448","bugs":{"url":"https://github.com/402md/skillmd/issues"},"homepage":"https://github.com/402md/skillmd#readme","_nodeVersion":"22.13.1","_npmVersion":"11.2.0","dist":{"integrity":"sha512-NXU/qY8+17Bzj7qDQOpAAHBDNQVRBoqqmHzWmMb13A7c6uvu8b7T8ETz03kbDN7ACyFkma/zECsYFClMzcwrgA==","shasum":"655674751f9f3e417c62b6a91ca98cd86ed2e3a6","tarball":"https://registry.npmjs.org/@402md/skillmd/-/skillmd-0.1.5.tgz","fileCount":8,"unpackedSize":233917,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDI8OSI9yOr/TWCzOE1C6ic3auT7MW3SEsAktTh4QoMUwIhAII51CQmm5VApv9Gbx78z/aED676Y1aH9SNAtmlwmgxv"}]},"_npmUser":{"name":"henriquebreim","email":"developers@402.md"},"directories":{},"maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/skillmd_0.1.5_1773965270685_0.9748013709907921"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-13T21:16:17.771Z","modified":"2026-03-20T00:07:51.002Z","0.1.0":"2026-03-13T21:16:18.038Z","0.1.1":"2026-03-13T21:21:50.894Z","0.1.2":"2026-03-15T01:26:17.766Z","0.1.3":"2026-03-15T01:41:22.597Z","0.1.4":"2026-03-19T23:28:10.562Z","0.1.5":"2026-03-20T00:07:50.900Z"},"bugs":{"url":"https://github.com/402md/skillmd/issues"},"license":"MIT","homepage":"https://github.com/402md/skillmd#readme","keywords":["skillmd","skill.md","x402","402","ai-agents","payment","protocol","parser","validator"],"repository":{"type":"git","url":"git+https://github.com/402md/skillmd.git"},"description":"Parser, validator, and generator for SKILL.md — the spec-as-code for paid AI agent skills","maintainers":[{"name":"henriquebreim","email":"developers@402.md"}],"readme":"# @402md/skillmd\n\n[![npm version](https://img.shields.io/npm/v/@402md/skillmd)](https://www.npmjs.com/package/@402md/skillmd)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178C6)](https://www.typescriptlang.org)\n[![x402](https://img.shields.io/badge/x402-compatible-green)](https://x402.org)\n[![A2A](https://img.shields.io/badge/A2A-v0.3.0-00C853)](https://google.github.io/A2A/)\n[![MCP](https://img.shields.io/badge/MCP-compatible-purple)](https://modelcontextprotocol.io)\n\n**The universal descriptor for AI agent capabilities.**\n\nSKILL.md is an open format for describing what a service does, how much it costs, and how agents can use it — in a single markdown file readable by both humans and machines.\n\nThis package is the **reference implementation** of the [SKILL.md Specification v2.1](./SPEC.md). One dependency (`yaml`). Works in Node, browsers, and edge runtimes.\n\n```bash\nnpm install @402md/skillmd\n```\n\n## The Specification\n\nThe full [SKILL.md Specification](./SPEC.md) defines the format, validation rules, compatibility guarantees, and conversion targets. The spec is designed around three principles:\n\n1. **Superset of Anthropic Claude Code skills** — Any valid Claude Code skill is a valid SKILL.md. The format extends (never conflicts with) the Anthropic frontmatter convention.\n2. **Payment-native** — First-class support for per-call pricing, multi-chain settlement (Stellar, Base), and non-custodial payment via [x402](https://www.x402.org/).\n3. **Framework-agnostic** — Converts to MCP tools, A2A Agent Cards, and OpenAPI specs.\n\n## Skill Profiles\n\nSKILL.md supports three profiles depending on what you're describing:\n\n### Paid API — Endpoints with pricing\n\n```yaml\n---\nname: weather-api\ndescription: Real-time weather data\nbase_url: https://api.weatherco.com\ntype: API\npayment:\n  asset: USDC\n  networks:\n    - network: stellar\n      payTo: GABC...XYZ\n    - network: base\n      payTo: 0xabc...def\nendpoints:\n  - path: /v1/current\n    method: POST\n    description: Get current weather\n    priceUsdc: \"0.001\"\n---\n\n# Weather API\n```\n\n### Agent Skill — Instructions for AI agents (Anthropic-compatible)\n\n```yaml\n---\nname: code-reviewer\ndescription: >-\n  This skill should be used when the user asks to \"review code\",\n  \"check for bugs\", or mentions code quality.\nversion: 1.0.0\nallowed-tools: [Read, Grep, Glob]\n---\n\n# Code Reviewer\n\nWhen reviewing code, check for security vulnerabilities first.\n```\n\nNo `base_url`, `payment`, or `endpoints` needed. This is a valid Claude Code skill AND a valid SKILL.md.\n\n### Hybrid — Paid API with agent instructions\n\n```yaml\n---\nname: web-scraper\ndescription: >-\n  This skill should be used when the user asks to \"scrape a website\"\n  or \"extract web content\". High-performance scraping API.\nbase_url: https://api.scraper.pro\ntype: API\nallowed-tools: [Read, Bash]\npayment:\n  asset: USDC\n  networks:\n    - network: stellar\n      payTo: GABC...XYZ\nendpoints:\n  - path: /v1/scrape\n    method: POST\n    description: Scrape a URL\n    priceUsdc: \"0.005\"\n---\n\n# Web Scraper\n\nWhen the user asks to scrape, call /v1/scrape with the target URL.\nAlways confirm the $0.005 cost before making paid calls.\n```\n\n## Quick Start\n\n### Parse\n\n```typescript\nimport { parseSkillMd } from '@402md/skillmd'\n\nconst manifest = parseSkillMd(`---\nname: weather-api\ndescription: Real-time weather data\nbase_url: https://api.weatherco.com\ntype: API\npayment:\n  asset: USDC\n  networks:\n    - network: stellar\n      payTo: GABC...XYZ\n    - network: base\n      payTo: 0xabc...def\nendpoints:\n  - path: /v1/current\n    method: POST\n    description: Get current weather\n    priceUsdc: \"0.001\"\n---\n\n# Weather API\n`)\n\nmanifest.name                          // 'weather-api'\nmanifest.type                          // 'API'\nmanifest.payment.networks[0].network   // 'stellar'\nmanifest.payment.networks[0].payTo     // 'GABC...XYZ'\nmanifest.endpoints[0].path             // '/v1/current'\n```\n\nAnthropic-style skills work too:\n\n```typescript\nconst skill = parseSkillMd(`---\nname: my-helper\ndescription: Helps with things\nallowed-tools: Bash\n---\n\nDo the thing.\n`)\n\nskill.type                   // 'SKILL' (auto-inferred, no endpoints)\nskill.allowedTools           // ['Bash']\n```\n\nFrom a file:\n\n```typescript\nimport { readFileSync } from 'node:fs'\nimport { parseSkillMd } from '@402md/skillmd'\n\nconst manifest = parseSkillMd(readFileSync('./SKILL.md', 'utf-8'))\n```\n\n### Validate\n\n```typescript\nimport { validateSkillMd } from '@402md/skillmd'\n\nconst result = validateSkillMd(content)\n\nif (!result.valid) {\n  result.errors.forEach(e => console.error(`${e.field}: ${e.message}`))\n}\nresult.warnings.forEach(w => console.warn(`${w.field}: ${w.message}`))\n```\n\nFor `type: SKILL`, validation skips `base_url`, `payment`, and `endpoints` — only `name` and `description` are required.\n\n### Generate\n\n```typescript\nimport { generateSkillMd } from '@402md/skillmd'\n\n// Paid API\nconst apiSkill = generateSkillMd({\n  name: 'my-api',\n  description: 'Does cool things',\n  base_url: 'https://api.example.com',\n  payment: {\n    asset: 'USDC',\n    networks: [\n      { network: 'stellar', payTo: 'GABC...XYZ' }\n    ]\n  },\n  endpoints: [\n    { path: '/v1/run', method: 'POST', description: 'Run the thing', priceUsdc: '0.001' }\n  ]\n})\n\n// Agent skill (Anthropic-compatible)\nconst agentSkill = generateSkillMd({\n  name: 'my-helper',\n  description: 'This skill should be used when the user asks to do things.',\n  type: 'SKILL',\n  allowedTools: ['Read', 'Bash'],\n  body: '# My Helper\\n\\nDo the thing step by step.'\n})\n```\n\n### Convert to MCP Tools\n\n```typescript\nimport { parseSkillMd, toMcpToolDefinitions } from '@402md/skillmd'\n\nconst tools = toMcpToolDefinitions(parseSkillMd(content))\n// [{ name: 'weather-api_v1_current', description: 'Get current weather (0.001 USDC via stellar)', inputSchema: ... }]\n```\n\n### Convert to A2A Agent Card\n\n```typescript\nimport { parseSkillMd, toAgentCard } from '@402md/skillmd'\n\nconst card = toAgentCard(parseSkillMd(content))\n// Serves at /.well-known/agent-card.json via @402md/a2a\n```\n\n### OpenAPI Interop\n\n```typescript\nimport { generateFromOpenAPI, toOpenAPI } from '@402md/skillmd'\n\n// OpenAPI → SKILL.md\nconst manifest = generateFromOpenAPI(openApiSpec, {\n  asset: 'USDC',\n  networks: [{ network: 'base', payTo: '0xabc...def' }]\n}, {\n  pricing: { 'GET /pets': '0.001', '*': '0.005' }\n})\n\n// SKILL.md → OpenAPI\nconst spec = toOpenAPI(manifest)\n```\n\n## Anthropic Compatibility\n\nSKILL.md v2 is a **superset** of [Anthropic Claude Code skills](https://docs.anthropic.com/en/docs/claude-code). The compatibility guarantee:\n\n| Feature | Anthropic Skills | SKILL.md v2 | Status |\n|---------|-----------------|-------------|--------|\n| `name` | Required | Required | Compatible |\n| `description` | Required (trigger phrases) | Required (any format) | Superset |\n| `version` | Optional | Optional | Compatible |\n| `license` | Optional | Optional | Compatible |\n| `allowed-tools` | Optional | Optional | Compatible |\n| `references/` directory | Supported | Supported | Compatible |\n| `scripts/` directory | Supported | Supported | Compatible |\n| `assets/` directory | Supported | Supported | Compatible |\n| `payment` | N/A | Optional | Extension |\n| `endpoints` | N/A | Optional | Extension |\n| `base_url` | N/A | Conditional | Extension |\n\n**Any valid Anthropic skill parses and validates without modification.** Additional fields like `payment` and `endpoints` are extensions — they never conflict with the Anthropic schema.\n\nThe parser accepts both `allowed-tools` (Anthropic's kebab-case) and `allowedTools` (camelCase).\n\n## SKILL.md Format (v2)\n\nFull format with all fields:\n\n```yaml\n---\nname: weather-api\ndisplayName: Weather API\ndescription: Real-time weather data for any location worldwide\nversion: 1.0.0\nauthor: weatherco\nlicense: MIT\nbase_url: https://api.weatherco.com\ntype: API\n\npayment:\n  asset: USDC\n  networks:\n    - network: stellar\n      payTo: GABC...XYZ\n      facilitator: https://x402.org/facilitator\n    - network: base\n      payTo: \"0xabc...def\"\n      facilitator: https://x402.org/facilitator\n\nendpoints:\n  - path: /v1/current\n    method: POST\n    description: Get current weather for a location\n    priceUsdc: \"0.001\"\n    inputSchema:\n      type: object\n      properties:\n        location:\n          type: string\n      required: [location]\n    outputSchema:\n      type: object\n      properties:\n        temperature:\n          type: number\n\ntags: [weather, geolocation]\ncategory: data\nsla: \"99.9%\"\nrateLimit: 1000/hour\nsandbox: https://sandbox.weatherco.com\nallowed-tools: [Read, Bash]\n---\n\n# Weather API\n\nReal-time weather data for any location worldwide.\n```\n\n### Required fields\n\nFor `type: API` (or any type with endpoints):\n\n| Field | Description |\n|-------|-------------|\n| `name` | Unique identifier (kebab-case) |\n| `description` | What the skill does |\n| `base_url` | Base URL of the API |\n| `payment.networks[].network` | Payment chain (`stellar`, `base`, `base-sepolia`, `stellar-testnet`) |\n| `payment.networks[].payTo` | Recipient wallet address for the network |\n| `endpoints[].path` | Endpoint path (starts with `/`) |\n| `endpoints[].method` | HTTP method |\n| `endpoints[].description` | What the endpoint does |\n| `endpoints[].priceUsdc` | Price per call in USDC (e.g. `\"0.001\"`) |\n\nFor `type: SKILL` (agent instructions only):\n\n| Field | Description |\n|-------|-------------|\n| `name` | Unique identifier (kebab-case) |\n| `description` | What the skill does / when to trigger |\n\n### Optional fields\n\n| Field | Description |\n|-------|-------------|\n| `displayName` | Human-readable name |\n| `version` | Semver version |\n| `author` | Author name |\n| `license` | License identifier (`MIT`, `proprietary`, etc.) |\n| `type` | `API` \\| `SAAS` \\| `PRODUCT` \\| `SERVICE` \\| `SUBSCRIPTION` \\| `CONTENT` \\| `SKILL` |\n| `payment.asset` | Payment asset (default: `USDC`) |\n| `payment.networks[].facilitator` | Facilitator URL for the network |\n| `endpoints[].inputSchema` | JSON Schema for request body |\n| `endpoints[].outputSchema` | JSON Schema for response |\n| `tags` | Discovery tags (max 20) |\n| `category` | Skill category |\n| `sla` | Uptime guarantee |\n| `rateLimit` | Rate limit |\n| `sandbox` | Free test endpoint URL |\n| `allowed-tools` | Tools the skill can use (Anthropic compat) |\n\n## API Reference\n\n### Parse\n\n| Function | Description |\n|----------|-------------|\n| `parseSkillMd(content)` | Parse a SKILL.md string into a `SkillManifest` |\n| `parseFrontmatter(md)` | Extract raw frontmatter (lower-level, v1-compat) |\n\n### Validate\n\n| Function | Description |\n|----------|-------------|\n| `validateSkill(manifest)` | Validate a `SkillManifest` object |\n| `validateSkillMd(content)` | Parse + validate a raw SKILL.md string |\n\n### Generate & Convert\n\n| Function | Description |\n|----------|-------------|\n| `generateSkillMd(config)` | Generate a SKILL.md string from a `SkillConfig` |\n| `generateFromOpenAPI(spec, payment, options?)` | OpenAPI spec to `SkillManifest` |\n| `toOpenAPI(manifest)` | `SkillManifest` to OpenAPI 3.0 spec |\n| `toMcpToolDefinitions(manifest)` | `SkillManifest` to MCP tool definitions |\n| `toAgentCard(manifest)` | `SkillManifest` to A2A Agent Card |\n\n### Schema & Constants\n\n| Export | Description |\n|--------|-------------|\n| `SKILLMD_JSON_SCHEMA` | JSON Schema (Draft 2020-12) for external validators |\n| `SKILL_TYPES` | Valid skill types |\n| `HTTP_METHODS` | Valid HTTP methods |\n| `PAYMENT_NETWORKS` | Valid payment networks |\n\n## Ecosystem\n\nSKILL.md is the foundation of the 402md ecosystem:\n\n| Package | Role |\n|---------|------|\n| [`@402md/skillmd`](https://github.com/402-md/skillmd) | Parser, validator, generator (this package) |\n| [`@402md/x402`](https://github.com/402-md/x402) | x402 payment protocol (client + server) |\n| [`@402md/mcp`](https://github.com/402-md/mcp) | MCP server — agents discover and pay for skills |\n| [`@402md/a2a`](https://github.com/402-md/a2a) | A2A Agent Card serving from SKILL.md |\n\n## Legacy v1 Support\n\nThe parser handles v1 SKILL.md files (without the `payment` block). The `price` field on endpoints is mapped to `priceUsdc`, and payment defaults to `{ networks: [{ network: 'base', payTo: '' }], asset: 'USDC' }`. The parser also converts the legacy v2.0 flat format (top-level `payTo`/`payToEvm`/`facilitator`) to the per-network `NetworkConfig[]` structure automatically.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}