@openskillmd/osm 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
3
+ import{a as y}from"./chunk-IZJHFL7T.js";import{b as x,c as m,e as S,f as v}from"./chunk-5CDG6OB7.js";import"./chunk-YAZPI4SK.js";import{a as p,b as w,c as $,d as l,e as d,f}from"./chunk-ONVELHE6.js";import{f as u,j as g,k as a,l as s,n as b}from"./chunk-OVTYCRA4.js";async function F(e){let o=y({text:`Fetching info for "${e}"...`,spinner:b,color:!1}).start();try{let r=await S(e);o.stop(),U(r);return}catch(r){if(!(r instanceof m&&r.statusCode===404)){o.fail("Failed to fetch info"),process.stderr.write(f(r instanceof Error?r.message:"Unknown error")+`
4
+ `);return}}try{let r=await v(e);o.stop(),await O(r);return}catch(r){o.stop(),r instanceof m&&r.statusCode===404?process.stderr.write(f(`"${e}" not found.`,`Try ${g("osm search <query>")} to find it.`)+`
5
+ `):process.stderr.write(f(r instanceof Error?r.message:"Unknown error")+`
6
+ `)}}function U(e){process.stdout.write(`
7
+ `),process.stdout.write(` ${u.bold(e.name)}${p(e.publisher)} ${s("(skill)")}
8
+ `),process.stdout.write(s(` ${e.slug}`)+`
9
+
10
+ `),e.description&&process.stdout.write(` ${a(e.description)}
11
+
12
+ `);let o=[];e.domain&&o.push(`${s("Domain:")} ${e.domain}`),e.subcategory&&o.push(`${s("Category:")} ${e.subcategory}`),e.downloads!=null&&o.push(`${s("Downloads:")} ${l(e.downloads)}`),e.license&&o.push(`${s("License:")} ${e.license}`),e.publisher&&o.push(`${s("Publisher:")} ${e.publisher.name}`),e.githubOwner&&e.githubRepo&&o.push(`${s("Repository:")} github.com/${e.githubOwner}/${e.githubRepo}`),e.sourceUrl&&o.push(`${s("Source:")} ${e.sourceUrl}`);for(let n of o)process.stdout.write(` ${n}
13
+ `);let r=R(e.content,"when to use");if(r){process.stderr.write(d("When to Use")+`
14
+ `);for(let n of r.split(`
15
+ `))process.stdout.write(` ${a(n)}
16
+ `);process.stdout.write(`
17
+ `)}if(e.scoreOverall!=null){process.stderr.write(d("Score Breakdown")+`
18
+ `);let n=[{label:"Format",score:e.scoreFormat??0,max:25},{label:"Structure",score:e.scoreStructure??0,max:25},{label:"Security",score:e.scoreSecurity??0,max:25},{label:"Specificity",score:e.scoreSpecificity??0,max:25}];for(let t of n)process.stdout.write(` ${t.label.padEnd(14)} ${$(t.score,t.max)} ${w(t.score,t.max)}/${t.max}
19
+ `);process.stdout.write(`
20
+ `),process.stdout.write(` ${"Overall".padEnd(14)} ${$(e.scoreOverall,100)} ${w(e.scoreOverall,100)}/100
21
+ `)}process.stderr.write(`
22
+ `),e.githubOwner&&e.githubRepo?process.stderr.write(s(` Install: ${u(`osm add ${e.githubOwner}/${e.githubRepo}`)}`)+`
23
+
24
+ `):e.sourceUrl&&process.stderr.write(s(` Source: ${e.sourceUrl}`)+`
25
+
26
+ `)}async function O(e){process.stdout.write(`
27
+ `),process.stdout.write(` ${u.bold(e.name)}${p(e.publisher)} ${s("(blueprint)")}
28
+ `),process.stdout.write(s(` ${e.slug}`)+`
29
+
30
+ `),e.description&&process.stdout.write(` ${a(e.description)}
31
+
32
+ `);let o=[];e.category&&o.push(`${s("Category:")} ${e.category}`),e.downloads!=null&&o.push(`${s("Downloads:")} ${l(e.downloads)}`),e.publisher&&o.push(`${s("Publisher:")} ${e.publisher.name}`);for(let t of o)process.stdout.write(` ${t}
33
+ `);let r=[{field:e.constraints,label:"Constraints"},{field:e.commonFailures,label:"Common Failures"},{field:e.verificationRules,label:"Verification Rules"},{field:e.recoveryGuidance,label:"Recovery Guidance"}];for(let t of r)if(t.field){process.stderr.write(d(t.label)+`
34
+ `);for(let i of t.field.split(`
35
+ `))process.stdout.write(` ${a(i)}
36
+ `);process.stdout.write(`
37
+ `)}if(!r.some(t=>t.field)){let t=R(e.content,"when to use");if(t){process.stderr.write(d("When to Use")+`
38
+ `);for(let i of t.split(`
39
+ `))process.stdout.write(` ${a(i)}
40
+ `);process.stdout.write(`
41
+ `)}}process.stderr.write(`
42
+ `);let n=await x();process.stderr.write(s(` View: ${u(`${n}/blueprints/${e.slug}`)}`)+`
43
+
44
+ `)}function R(e,o){if(!e)return null;let r=e.split(`
45
+ `),n=new RegExp(`^##\\s+.*${o}`,"i"),t=r.findIndex(c=>n.test(c));if(t===-1)return null;let i=r.length;for(let c=t+1;c<r.length;c++)if(/^##\s+/.test(r[c])){i=c;break}let h=r.slice(t+1,i).join(`
46
+ `).trim();return h.length===0?null:h}export{F as infoCommand};
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
3
+ import{a as l,b as p}from"./chunk-AXKAVWKJ.js";import{a as c}from"./chunk-MWJMJUS4.js";import"./chunk-YAZPI4SK.js";import{f as g,g as d}from"./chunk-ONVELHE6.js";import{f,j as u,l as a}from"./chunk-OVTYCRA4.js";import n from"fs";import h from"path";async function R(e){if(e!=="skill"&&e!=="blueprint"){console.error(g(`Unknown type "${e}".`,`Use ${u("osm init skill")} or ${u("osm init blueprint")}`));return}e==="skill"?await y():await w()}async function y(){let e=await c.prompt([{type:"input",name:"name",message:"Skill name (slug):",validate:t=>{try{return l(t.trim()),!0}catch(o){return o instanceof Error?o.message:"Invalid slug"}}},{type:"input",name:"description",message:"Short description:",validate:t=>t.trim().length>0||"Required"},{type:"input",name:"version",message:"Version:",default:"1.0.0"}]),r=l(e.name.trim()),m=`---
4
+ name: ${r}
5
+ description: ${e.description}
6
+ version: ${e.version}
7
+ ---
8
+
9
+ # ${r}
10
+
11
+ ${e.description}
12
+
13
+ ## When to Use
14
+
15
+ Describe when an AI agent should use this skill.
16
+
17
+ ## Workflow
18
+
19
+ 1. Step one
20
+ 2. Step two
21
+ 3. Step three
22
+
23
+ ## Rules & Guidelines
24
+
25
+ - Always do X
26
+ - Never do Y
27
+ - Avoid Z
28
+
29
+ ## Examples
30
+
31
+ \`\`\`
32
+ Example usage here
33
+ \`\`\`
34
+
35
+ ## Edge Cases
36
+
37
+ Document any edge cases or error handling scenarios here.
38
+ `,s=h.join(process.cwd(),".skills");n.mkdirSync(s,{recursive:!0});let i=p(s,`${r}.md`);if(n.existsSync(i)){let{overwrite:t}=await c.prompt([{type:"confirm",name:"overwrite",message:`${i} already exists. Overwrite?`,default:!1}]);if(!t){console.error(a(" Aborted."));return}}n.writeFileSync(i,m,"utf-8"),console.error(d(`Created .skills/${r}.md`)),console.error(a(`
39
+ Edit the file, then run ${f(`osm score .skills/${r}.md`)} to check quality.
40
+ `))}async function w(){let e=await c.prompt([{type:"input",name:"name",message:"Blueprint name (slug):",validate:t=>{try{return l(t.trim()),!0}catch(o){return o instanceof Error?o.message:"Invalid slug"}}},{type:"input",name:"description",message:"Short description:",validate:t=>t.trim().length>0||"Required"},{type:"input",name:"category",message:"Category:",default:"general"}]),r=l(e.name.trim()),m=`---
41
+ name: ${r}
42
+ description: ${e.description}
43
+ category: ${e.category}
44
+ ---
45
+
46
+ # ${r}
47
+
48
+ ${e.description}
49
+
50
+ ## Constraints
51
+
52
+ Define the constraints for the output format here.
53
+
54
+ ## Common Failures
55
+
56
+ List common failure patterns and how to detect them.
57
+
58
+ ## Verification Rules
59
+
60
+ - [ ] Rule 1: Description
61
+ - [ ] Rule 2: Description
62
+ - [ ] Rule 3: Description
63
+
64
+ ## Recovery Guidance
65
+
66
+ If a verification rule fails, describe how to fix it here.
67
+ `,s=h.join(process.cwd(),".blueprints");n.mkdirSync(s,{recursive:!0});let i=p(s,`${r}.md`);if(n.existsSync(i)){let{overwrite:t}=await c.prompt([{type:"confirm",name:"overwrite",message:`${i} already exists. Overwrite?`,default:!1}]);if(!t){console.error(a(" Aborted."));return}}n.writeFileSync(i,m,"utf-8"),console.error(d(`Created .blueprints/${r}.md`)),console.error(a(`
68
+ Edit the file and customize the constraints, verification rules, and recovery guidance.
69
+ `))}export{R as initCommand};
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
3
+ import{e as p,f as u}from"./chunk-ONVELHE6.js";import{f as l,j as a,k as c,l as d}from"./chunk-OVTYCRA4.js";import h from"fs";import n from"path";async function k(){let t=process.cwd(),i=n.join(t,".skills"),m=n.join(t,".blueprints"),r=f(i),e=f(m);if(r.length===0&&e.length===0){process.stderr.write(u("No skills or blueprints installed in this project.",`Run ${a("osm search <query>")} to find and install skills.`)+`
4
+ `);return}if(r.length>0){process.stderr.write(p(`Installed Skills (${r.length})`)+`
5
+ `);for(let s of r){let o=n.basename(s,".md");process.stdout.write(` ${l("\u2022")} ${c(o)} ${d(`(.skills/${s})`)}
6
+ `)}}if(e.length>0){process.stderr.write(p(`Installed Blueprints (${e.length})`)+`
7
+ `);for(let s of e){let o=n.basename(s,".md");process.stdout.write(` ${l("\u2022")} ${c(o)} ${d(`(.blueprints/${s})`)}
8
+ `)}}process.stdout.write(`
9
+ `)}function f(t){try{return h.readdirSync(t).filter(i=>i.endsWith(".md")).sort()}catch{return[]}}export{k as listCommand};
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
3
+ import{a as u,b as d,c as f,k as m}from"./chunk-5CDG6OB7.js";import{e as c,f as p}from"./chunk-ONVELHE6.js";import{f as n,g as a,k as l,l as e}from"./chunk-OVTYCRA4.js";async function h(){let o={mcpServers:{openskill:{url:`${await u()}/mcp/sse`}}};console.error(c("MCP Server Configuration")),console.error(e(` Add this to your Claude Desktop or Cursor MCP config:
4
+ `)),console.log(JSON.stringify(o,null,2)),console.error(""),console.error(n.bold(" For Claude Desktop:")),console.error(e(" Add to ~/Library/Application Support/Claude/claude_desktop_config.json")),console.error(""),console.error(n.bold(" For Cursor:")),console.error(e(" Add to .cursor/mcp.json in your project root")),console.error(""),console.error(e(" The OpenSkill MCP server gives your AI agent access to the full")),console.error(e(" skill and blueprint registry via tool calls.")),console.error("")}async function b(t){console.error(c(`MCP Server: ${t}`));let o;try{o=await m(t)}catch(r){if(r instanceof f&&r.statusCode===404){let i=await d();process.stderr.write(p(`MCP server "${t}" not found.`,`Browse available servers at ${i}/mcp-servers`)+`
5
+ `);return}process.stderr.write(p(r instanceof Error?r.message:"Unknown error")+`
6
+ `);return}console.error(""),console.error(n.bold(` ${o.displayName||o.name}`)),o.description&&console.error(e(` ${o.description}`)),console.error(""),o.mcpEndpointUrl&&(console.error(a.bold(" Endpoint URL:")),console.error(a(` ${o.mcpEndpointUrl}`)),console.error(""));let s=[];if(o.transportType){let r=o.transportType==="sse"||o.transportType==="streamable-http";s.push(["Transport",r?"Remote (SSE)":"Local install (stdio)"])}o.authType&&s.push(["Auth",o.authType==="none"?"None required":o.authType]),o.verified&&s.push(["Verified","Yes"]),o.status&&s.push(["Status",o.status]),o.stargazerCount!=null&&s.push(["Stars",String(o.stargazerCount)]),o.toolCount&&s.push(["Tools",String(o.toolCount)]),o.primaryLanguage&&s.push(["Language",o.primaryLanguage]),o.category&&s.push(["Category",o.category]);for(let[r,i]of s)console.error(` ${e(`${r}:`)} ${l(i)}`);if(console.error(""),o.installCommand&&(console.error(n.bold(" Install:")),console.error(l(` ${o.installCommand}`)),console.error("")),o.toolNames&&o.toolNames.length>0){console.error(n.bold(" Tools:"));for(let r of o.toolNames.slice(0,20))console.error(e(` - ${r}`));o.toolNames.length>20&&console.error(e(` ... and ${o.toolNames.length-20} more`)),console.error("")}if(o.mcpEndpointUrl){console.error(n.bold(" Config JSON (Claude Desktop / Cursor):"));let r={mcpServers:{[o.slug]:{url:o.mcpEndpointUrl}}};console.log(JSON.stringify(r,null,2)),console.error("")}else o.githubUrl&&(console.error(n.bold(" GitHub:")),console.error(l(` ${o.githubUrl}`)),console.error(""))}export{b as mcpInfoCommand,h as mcpSetupCommand};
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
3
+ import{a as p,b as m}from"./chunk-AXKAVWKJ.js";import{f as n,g as o}from"./chunk-ONVELHE6.js";import{j as d}from"./chunk-OVTYCRA4.js";import s from"fs";import t from"path";async function h(e){try{e=p(e)}catch(a){process.stderr.write(n(a instanceof Error?a.message:"Invalid slug")+`
4
+ `);return}let r=process.cwd(),l=t.join(r,".skills",`${e}.md`),c=t.join(r,".blueprints",`${e}.md`),i=!1;s.existsSync(l)&&(m(t.join(r,".skills"),`${e}.md`),s.unlinkSync(l),process.stderr.write(o(`Removed skill "${e}" from .skills/`)+`
5
+ `),i=!0),s.existsSync(c)&&(m(t.join(r,".blueprints"),`${e}.md`),s.unlinkSync(c),process.stderr.write(o(`Removed blueprint "${e}" from .blueprints/`)+`
6
+ `),i=!0),i||process.stderr.write(n(`"${e}" is not installed.`,`Run ${d("osm list")} to see installed skills and blueprints.`)+`
7
+ `)}export{h as removeCommand};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
3
+ import{a}from"./chunk-IZJHFL7T.js";import{b as m}from"./chunk-5CDG6OB7.js";import"./chunk-YAZPI4SK.js";import{f as c,g as d}from"./chunk-ONVELHE6.js";import{f as t,k as l,l as o,n as i}from"./chunk-OVTYCRA4.js";import u from"fs";import p from"path";async function I(){let s=a({text:"Downloading OpenSkill router...",spinner:i,color:!1}).start();try{let r=await m(),e=await fetch(`${r}/skills/router/SKILL.md`);if(!e.ok)throw new Error(`Failed to download router SKILL.md (HTTP ${e.status})`);let f=await e.text(),n=p.join(process.cwd(),".skills");u.mkdirSync(n,{recursive:!0});let h=p.join(n,"openskill-router.md");u.writeFileSync(h,f,"utf-8"),s.stop(),console.error(d("Installed OpenSkill router to .skills/openskill-router.md")),console.error(""),console.error(t.bold(" What is the router?")),console.error(o(" The router skill teaches your AI agent how to discover and install")),console.error(o(" skills on-demand from the OpenSkill registry.")),console.error(""),console.error(t.bold(" How to use:")),console.error(l(' Point your agent at the file: "Read .skills/openskill-router.md"')),console.error(o(" The agent will then automatically search for relevant skills as needed.")),console.error("")}catch(r){s.fail("Failed to install router"),console.error(c(r instanceof Error?r.message:"Unknown error"))}}export{I as routerInstallCommand};
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
3
+ import{b as l,c as m,e as d,f as u}from"./chunk-ONVELHE6.js";import{g as p,h as f}from"./chunk-OVTYCRA4.js";import g from"fs";function h(s){let t=[],e=A(s,t),o=w(s,t),r=$(s,t),a=k(s,t);return{overall:e+o+r+a,format:e,structure:o,security:r,specificity:a,suggestions:t}}function A(s,t){let e=0,o=s.split(`
4
+ `);if(s.startsWith("---")){let n=s.indexOf("---",3);if(n>3){let c=s.slice(3,n).trim(),v=/^name:/m.test(c),S=/^description:/m.test(c),b=/^version:/m.test(c);v?e+=3:t.push("Add a 'name' field to your YAML frontmatter"),S?e+=3:t.push("Add a 'description' field to your YAML frontmatter"),b?e+=2:t.push("Add a 'version' field to your YAML frontmatter"),e+=4}else t.push("Your YAML frontmatter is not properly closed with '---'")}else t.push("Add YAML frontmatter at the top of your SKILL.md (between --- delimiters)");let a=o.some(n=>/^# /.test(n)),i=o.some(n=>/^## /.test(n));return a?e+=4:t.push("Add a top-level heading (# Title)"),i?e+=3:t.push("Add section headings (## Section)"),/```[\s\S]*?```/.test(s)&&(e+=3),o.some(n=>/^\s*[-*]\s/.test(n)||/^\s*\d+\.\s/.test(n))&&(e+=3),Math.min(e,25)}function w(s,t){let e=0,o=[{pattern:/when to use/i,name:"When to Use",points:5},{pattern:/workflow|process|steps/i,name:"Workflow",points:5},{pattern:/rules|guidelines|constraints/i,name:"Rules/Guidelines",points:5}];for(let i of o)i.pattern.test(s)?e+=i.points:t.push(`Add a '${i.name}' section to improve structure`);let r=s.match(/^##?\s+.+$/gm)||[];r.length>=3?e+=4:r.length>=2?e+=2:t.push("Add more sections to organize your content (aim for 3+ headings)");let a=s.split(/\s+/).length;return a>=500?e+=3:a>=200?e+=2:t.push("Expand your content \u2014 aim for at least 500 words for a comprehensive skill"),/examples?/i.test(s)?e+=3:t.push("Add an 'Examples' section with concrete usage scenarios"),Math.min(e,25)}function $(s,t){let e=25,o=[{pattern:/(?:api[_-]?key|secret|password|token)\s*[:=]\s*['"][^'"]+['"]/gi,name:"hardcoded secrets",penalty:8},{pattern:/rm\s+-rf\s+\//g,name:"dangerous rm -rf / commands",penalty:8},{pattern:/eval\s*\(/g,name:"eval() usage",penalty:5},{pattern:/sudo\s+/g,name:"sudo commands",penalty:3},{pattern:/chmod\s+777/g,name:"chmod 777 permissions",penalty:5},{pattern:/curl.*\|\s*(ba)?sh/g,name:"piping curl to shell",penalty:5}];for(let r of o)r.pattern.test(s)&&(e-=r.penalty,t.push(`Security concern: contains ${r.name}`));return/environment\s*variable|env\s+var|\$\{?\w+\}?/i.test(s)&&!/hardcod/i.test(s)&&(e=Math.min(e+2,25)),/sanitiz|validat|escape|safe/i.test(s)&&(e=Math.min(e+2,25)),Math.max(e,0)}function k(s,t){let e=0,o=s.match(/```[\s\S]*?```/g)||[];return o.length>=3?e+=6:o.length>=1?e+=3:t.push("Add code examples to make your skill more actionable"),/for example|e\.g\.|such as|here's|consider this/i.test(s)?e+=4:t.push("Add concrete examples with phrases like 'For example...' or 'Here's how...'"),/\.\w{2,4}\b/.test(s)&&/file|path|directory|folder/i.test(s)&&(e+=3),/do not|don't|avoid|never|always|must|should not/i.test(s)?e+=4:t.push("Add clear do's and don'ts (use 'Always...', 'Never...', 'Avoid...')"),/output|result|returns|produces|generates/i.test(s)&&(e+=3),/edge case|corner case|error|exception|fallback|handle/i.test(s)?e+=3:t.push("Document edge cases and error handling scenarios"),s.split(/\s+/).length>=1e3&&(e+=2),Math.min(e,25)}async function D(s){if(!g.existsSync(s)){console.error(u(`File not found: ${s}`,"Provide a path to a SKILL.md file."));return}let t=g.readFileSync(s,"utf-8");if(t.trim().length===0){console.error(u("File is empty."));return}let e=h(t);console.error(d(`Score: ${s}`));let o=[{label:"Format",score:e.format,max:25},{label:"Structure",score:e.structure,max:25},{label:"Security",score:e.security,max:25},{label:"Specificity",score:e.specificity,max:25}];for(let r of o)console.error(` ${r.label.padEnd(14)} ${m(r.score,r.max)} ${l(r.score,r.max)}/${r.max}`);if(console.error(""),console.error(` ${"Overall".padEnd(14)} ${m(e.overall,100)} ${l(e.overall,100)}/100`),e.suggestions.length>0){console.error(d("Suggestions"));for(let r of e.suggestions)console.error(` ${f("\u2192")} ${r}`)}else console.error(""),console.error(p(" \u2728 Great job! No suggestions for improvement."));console.error(""),console.log(JSON.stringify(e))}export{D as scoreCommand};
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
3
+ import{a as k}from"./chunk-IZJHFL7T.js";import{d as C,e as P,f as x}from"./chunk-5CDG6OB7.js";import"./chunk-YAZPI4SK.js";import{a as w,b as v,d as $,e as d,f as h}from"./chunk-ONVELHE6.js";import{f as n,l as t,n as S}from"./chunk-OVTYCRA4.js";async function A(p){let b=k({text:`Searching for "${p}"...`,spinner:S,color:!1}).start();try{let s=await C(p);b.stop();let a=s.mcpServers??[];if(s.skills.length+s.blueprints.length+a.length===0){process.stderr.write(h(`No results found for "${p}".`)+`
4
+ `),process.stderr.write(t(` \u2192 Try broader search terms or run ${n("osm browse")} to explore categories.
5
+ `)+`
6
+ `);return}if(s.skills.length>0){process.stderr.write(d(`Skills (${s.skills.length})`)+`
7
+ `);let o=await Promise.allSettled(s.skills.map(r=>P(r.slug)));for(let r=0;r<s.skills.length;r++){let l=s.skills[r],i=o[r],e=i.status==="fulfilled"?i.value:null,u=e?.name||l.name,f=e?.scoreOverall!=null?v(e.scoreOverall,100):t("--"),g=e?.downloads!=null?$(e.downloads):"--",c=e?w(e.publisher):"",m=e?.description||l.description||"";process.stdout.write(` ${n(u)}${c} ${t("\xB7")} score: ${f} ${t("\xB7")} ${g} downloads
8
+ `),m&&process.stdout.write(` ${t(typeof m=="string"?m.slice(0,120):"")}
9
+ `),process.stdout.write(` ${t(`slug: ${l.slug}`)}
10
+
11
+ `)}}if(s.blueprints.length>0){process.stderr.write(d(`Blueprints (${s.blueprints.length})`)+`
12
+ `);let o=await Promise.allSettled(s.blueprints.map(r=>x(r.slug)));for(let r=0;r<s.blueprints.length;r++){let l=s.blueprints[r],i=o[r],e=i.status==="fulfilled"?i.value:null,u=e?.name||l.name,f=e?.downloads!=null?$(e.downloads):"--",g=e?w(e.publisher):"",c=e?.description||l.description||"";process.stdout.write(` ${n(u)}${g} ${t("\xB7")} ${f} downloads
13
+ `),c&&process.stdout.write(` ${t(typeof c=="string"?c.slice(0,120):"")}
14
+ `),process.stdout.write(` ${t(`slug: ${l.slug}`)}
15
+
16
+ `)}}if(a.length>0){process.stderr.write(d(`MCP Servers (${a.length})`)+`
17
+ `);for(let o of a)process.stdout.write(` ${n(o.name)}
18
+ `),o.description&&process.stdout.write(` ${t(o.description.slice(0,120))}
19
+ `),process.stdout.write(` ${t(`slug: ${o.slug}`)}
20
+
21
+ `)}process.stderr.write(t(` Run ${n("osm info <slug>")} for details, ${n("osm add <source>")} to install, or ${n("osm mcp info <slug>")} for MCP servers.
22
+
23
+ `))}catch(s){b.fail("Search failed"),process.stderr.write(h(s instanceof Error?s.message:"Unknown error")+`
24
+ `)}}export{A as searchCommand};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openskillmd/osm",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "The OpenSkill CLI (osm) — search, add, score, and explore AI agent skills from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -47,21 +47,22 @@
47
47
  "access": "public",
48
48
  "registry": "https://registry.npmjs.org/"
49
49
  },
50
+ "packageManager": "pnpm@11.5.1",
50
51
  "dependencies": {
51
- "boxen": "^8.0.1",
52
- "chalk": "^5.4.1",
53
- "commander": "^13.1.0",
54
- "inquirer": "^12.6.0",
55
- "open": "^10.2.0",
56
- "ora": "^8.2.0",
57
52
  "skills": "^1.4.6"
58
53
  },
59
54
  "devDependencies": {
60
55
  "@biomejs/biome": "^2.0.0",
61
56
  "@types/node": "^22.0.0",
57
+ "chalk": "^5.4.1",
58
+ "commander": "^13.1.0",
59
+ "inquirer": "^12.6.0",
60
+ "open": "^10.2.0",
61
+ "ora": "^8.2.0",
62
62
  "tsup": "^8.5.0",
63
63
  "tsx": "^4.21.0",
64
64
  "typescript": "^5.8.0",
65
- "vitest": "^3.0.0"
65
+ "vitest": "^3.0.0",
66
+ "zod": "^4.4.3"
66
67
  }
67
68
  }