{"name":"rosie-skills","version":"0.8.0","author":{"name":"Matthew Phillips"},"license":"BSD-3-Clause","_id":"rosie-skills@0.8.0","maintainers":[{"name":"matthewp","email":"matthew@matthewphillips.info"}],"homepage":"https://github.com/withastro/rosie","bugs":{"url":"https://github.com/withastro/rosie/issues"},"bin":{"rosie-skills":"dist/bin.js"},"dist":{"shasum":"52d887a56c19251b5c9709684b559c9b32e0fc2d","tarball":"http://registry-npm.ywwl.com/rosie-skills/download/rosie-skills-0.8.0.tgz","fileCount":82,"integrity":"sha512-sE5rWaoazn7eo2QdDXQJq5Q5fgeX2o+40nIbFGvgrUtRhFfN+7kDhWrBTyAK5fgJ5gdfiezs3AlfdRSn6USvQw==","signatures":[{"sig":"MEUCIQC9mlpnC0cIVrwkLnzmEgybdPl+rUt8dEmSXF0s5eg3QwIgV8djRoggG+XF/U/dVeZWGrqowwZAwVBLfgh9B2vAEGM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/rosie-skills@0.8.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":332143,"size":69681,"noattachment":false,"key":"/rosie-skills/-/rosie-skills-0.8.0.tgz"},"type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"4cd135919c633efa753be50ed02a339ff162e9cc","scripts":{"build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:9ae7c2b6-858a-46b7-a83f-259057c410b3"}},"repository":{"url":"git+https://github.com/withastro/rosie.git","type":"git"},"_npmVersion":"11.13.0","description":"A fast, cross-platform package manager for AI agent skills","directories":{},"_nodeVersion":"24.16.0","dependencies":{"diff":"^7.0.0","modern-tar":"^0.7.6"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.4.0","@types/diff":"^7.0.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rosie-skills_0.8.0_1780141173661_0.377158961161727","host":"s3://npm-registry-packages-npm-production"},"readme":"# rosie-skills\n\nA fast, cross-platform package manager for AI agent skills. Use as a CLI or as\na typed JS library — same binary either way, via a native build on supported\nplatforms or WebAssembly everywhere else.\n\n## CLI\n\n```bash\nnpm install -g rosie-skills\nrosie-skills install anthropics/skills\n```\n\nOr one-shot via npx:\n\n```bash\nnpx rosie-skills install anthropics/skills\n```\n\n## JavaScript API\n\nThe package is ESM-only. Use a namespace import:\n\n```js\nimport * as rosie from 'rosie-skills';\n\nawait rosie.install('anthropics/skills');\n\nconst skills = await rosie.list();\n//   [{ name: 'pdf', source: 'anthropics/skills', ref: 'main', sha: '...', isReference: false }, ...]\n\nconst agents = await rosie.agents();\n//   [{ name: 'claude', display: 'Claude Code', detected: true, installPath: '/home/.../skills' }, ...]\n```\n\nAll functions return Promises. Failures throw `Error` with a descriptive message.\n\n### Install result\n\n`install`, `installFromLockfile`, and `update` return an `InstallResult`:\n\n```ts\ninterface InstallResult {\n  skills: Array<{\n    name: string;\n    kind: \"skill\" | \"reference\";\n    installedAgents: string[];     // e.g. [\"claude\", \"cursor\"]\n    failedAgents: string[];        // agents the symlink couldn't reach\n  }>;\n  installedAgents: string[];       // deduped union across all skills\n  failedAgents: string[];          // deduped union across all skills\n  installedInstruction:            // file rosie wrote the references block to\n    | \"AGENTS.md\"\n    | \"CLAUDE.md\"\n    | \"GEMINI.md\"\n    | \".github/copilot-instructions.md\"\n    | null;                         // null for pure-skill installs\n  audit: {                         // structured audit of every change + findings\n    schemaVersion: 1;\n    command: \"install\" | \"update\";\n    findings: Array<{              // rosie's own warnings, e.g. tag_rewritten\n      severity: \"high\";\n      kind: \"tag_rewritten\" | string;\n      skill: string;\n      ref: string;\n      oldSha: string;\n      newSha: string;\n    }>;\n    changes: Array<{\n      name: string;\n      kind: \"skill\" | \"reference\";\n      source: string;\n      ref: string;\n      sha: string;\n      operation: \"install\" | \"update\";\n      content: string | null;      // full sanitized body, first-install only\n      diff: string | null;         // unified diff, updates only\n    }>;\n  };\n}\n```\n\n```js\nconst result = await rosie.install('anthropics/skills');\nif (result.failedAgents.length > 0) {\n  console.warn(`couldn't symlink into: ${result.failedAgents.join(', ')}`);\n}\n```\n\n`failedAgents` is non-fatal: rosie tries every detected agent and reports the\nmisses. The canonical install at `.agents/skills/<name>/` still lands and the\nlockfile entry is still recorded, so a subsequent run after fixing\npermissions will retry the failed agents.\n\n`remove()` returns `void`.\n\n### Targeted install\n\n```js\nawait rosie.install('vercel-labs/agent-skills', {\n  agent: ['claude', 'cursor'],\n  ref: false,\n});\n```\n\n### As a reference, not a skill\n\n```js\nawait rosie.install('vercel/next.js', { ref: true });\n```\n\n### Observe progress\n\nThe library is silent by default. Pass `onLog` to receive log events:\n\n```js\nawait rosie.install('anthropics/skills', {\n  onLog: ({ level, message }) => {\n    if (level === 'error') console.error(message);\n    else if (level === 'info') console.log(message);\n    // 'warn' and 'debug' levels also available\n  },\n});\n```\n\n### Remove / update\n\n```js\nawait rosie.remove('pdf');\nawait rosie.update();           // update everything in rosie.lock\nawait rosie.update('pdf');      // update just one\n```\n\n### Security defenses\n\nEvery install applies content sanitization and structured auditing by\ndefault; see [docs/security](https://rosie.astro.build/docs/security/) for the full\nthreat model. Each defense can be disabled per call via `InstallOptions`:\n\n```js\nawait rosie.install('anthropics/skills', {\n  stripComments: false,      // keep markdown comments in reference installs\n  stripInvisible: false,     // keep zero-width / bidi / tag-block codepoints\n  retagDetect: false,        // skip the tag-rewrite check on `rosie update`\n  forceAudit: true,          // print audit on stdout regardless of context\n  suppressAudit: true,       // never print audit on stdout (still in result)\n});\n```\n\n`forceAudit` and `suppressAudit` are mutually exclusive; passing both throws.\nThe `audit` field on the result is always populated regardless of the\nemission flags — those flags only control whether the wrapped text is\nwritten to stdout by the CLI / bin.ts launcher.\n\n### Working directory\n\nEvery function accepts a `cwd` option — equivalent to `cd`'ing into that\ndirectory before running. `process.cwd()` is restored on exit:\n\n```js\nawait rosie.install('owner/repo', { cwd: '/path/to/project' });\n```\n\nMirrors the CLI's `--cwd` flag.\n\n### Skip the lockfile\n\nFor ad-hoc installs that shouldn't be recorded in `.agents/rosie.lock`:\n\n```js\nawait rosie.install('anthropics/skills', { lockfile: false });\n```\n\nMirrors the CLI's `--no-lockfile` flag. Available on `install`, `remove`,\nand `update`.\n\n### Reinstall from lockfile\n\n```js\nawait rosie.installFromLockfile();\n```\n\n## How it works\n\nThis package is pure JavaScript. The CLI and the JS API run the same\nTypeScript implementation in-process — no native binary, no WebAssembly. It\nworks anywhere Node 18+ runs. The only runtime dependency is `modern-tar`\n(tarball extraction).\n\n## Standalone binary\n\nA standalone, self-contained `rosie` binary (built from the Rust\nimplementation) is distributed separately through OS package managers, for\nusers who want the CLI without a Node runtime:\n\n- Homebrew (macOS / Linux): `brew tap withastro/rosie && brew install rosie`\n- Arch Linux: `yay -S rosie`\n- Debian/Ubuntu: see <https://github.com/withastro/rosie>\n- Source: clone the repo and run `cargo build --release`\n\n## License\n\nBSD-3-Clause\n","publish_time":1780141173835,"_cnpm_publish_time":1780141173835,"dist-tags":{"latest":"0.8.5"}}