{"_id":"@9d9/openclaw-utils","name":"@9d9/openclaw-utils","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@9d9/openclaw-utils","version":"0.1.0","description":"Utility functions for OpenClaw plugin and skill development","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"}}},"keywords":["openclaw","agent","automation","skill","plugin","9d9"],"license":"MIT","repository":{"type":"git","url":"git+https://github.com/9d9ten/openclaw-utils.git"},"scripts":{"build":"tsup","test":"vitest run","prepublishOnly":"npm run build"},"devDependencies":{"tsup":"^8.0.0","typescript":"^5.5.0","vitest":"^2.0.0"},"gitHead":"d55a640204fc089953a1b7ec0d291c3e3e46b1a4","_id":"@9d9/openclaw-utils@0.1.0","bugs":{"url":"https://github.com/9d9ten/openclaw-utils/issues"},"homepage":"https://github.com/9d9ten/openclaw-utils#readme","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-MApYB6E3qUKpKud2iM7uJF5D+WFY9bMCoZVFjVPN4d1u440FjT+/lZtIJO9KNLW8ImKW1Y21UWLA4h/2PbtY7w==","shasum":"eb397c477fa28f1837c0e4cff2c89a7410366a6f","tarball":"https://registry.npmjs.org/@9d9/openclaw-utils/-/openclaw-utils-0.1.0.tgz","fileCount":9,"unpackedSize":19513,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFGhUn0pZZshPIdAN3xHh01u22VwBNgEHQU3EYeNtyamAiARYOiRwxC9xenZKJRWBGw7daf8pLay1zNGUv0sFdlPsA=="}]},"_npmUser":{"name":"oku.yasu","email":"Service@9d9.co.jp"},"directories":{},"maintainers":[{"name":"oku.yasu","email":"Service@9d9.co.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openclaw-utils_0.1.0_1775860369359_0.9983303101320868"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-10T22:32:49.282Z","0.1.0":"2026-04-10T22:32:49.496Z","modified":"2026-04-10T22:32:50.032Z"},"maintainers":[{"name":"oku.yasu","email":"Service@9d9.co.jp"}],"description":"Utility functions for OpenClaw plugin and skill development","homepage":"https://github.com/9d9ten/openclaw-utils#readme","keywords":["openclaw","agent","automation","skill","plugin","9d9"],"repository":{"type":"git","url":"git+https://github.com/9d9ten/openclaw-utils.git"},"bugs":{"url":"https://github.com/9d9ten/openclaw-utils/issues"},"license":"MIT","readme":"# @9d9/openclaw-utils\n\nUtility functions for [OpenClaw](https://github.com/openclaw/openclaw) plugin and skill development.\n\n## Install\n\n```bash\nnpm install @9d9/openclaw-utils\n```\n\n## Usage\n\n```ts\nimport {\n  createSkillManifest,\n  extractFrontMatter,\n  slugify,\n  formatDate,\n  truncate,\n  toJST,\n} from \"@9d9/openclaw-utils\";\n\n// Skill manifest builder\nconst skill = createSkillManifest(\"my-skill\", \"1.0.0\", \"Does cool stuff\");\n\n// Front matter extraction\nconst fm = extractFrontMatter(\"---\\ntitle: Hello\\n---\\nContent\");\n// => { title: \"Hello\" }\n\n// String utilities\nslugify(\"Hello World!\"); // => \"hello-world\"\ntruncate(\"Long text here\", 8); // => \"Long...\"\n\n// Date formatting\nformatDate(new Date(), \"YYYY-MM-DD HH:mm\");\ntoJST(new Date());\n```\n\n## API\n\n### Skill Management\n- `createSkillManifest(name, version, description)` — Build skill metadata\n\n### Parsing\n- `parseAgentId(raw)` — Parse pipe-delimited agent config\n- `extractFrontMatter(content)` — Extract YAML front matter from markdown\n\n### Messages\n- `createUserMessage(content)` / `createAssistantMessage(content)` — Create session messages\n\n### String Utilities\n- `truncate(str, maxLen)` — Truncate with ellipsis\n- `slugify(text)` — URL-safe slug\n\n### Date Utilities\n- `formatDate(date, format)` — Custom date formatting (YYYY, MM, DD, HH, mm, ss)\n- `toJST(date)` — Convert to JST string\n\n## License\n\nMIT © [9d9 LLC](https://github.com/9d9ten)\n","readmeFilename":"README.md","_rev":"1-215c97a10ec4539c58a504a630ebe98e"}