@easbot/skills 0.3.12 → 0.3.14

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.
Files changed (67) hide show
  1. package/README.en.md +433 -126
  2. package/README.md +428 -126
  3. package/dist/chunks/blob-SCUVTYVE.cjs +1 -0
  4. package/dist/chunks/blob-WZAGX4RO.mjs +1 -0
  5. package/dist/chunks/chunk-2E6BHPFV.cjs +265 -0
  6. package/dist/chunks/chunk-5BDDXFOF.mjs +1 -0
  7. package/dist/chunks/chunk-5RWSXDNO.cjs +3 -0
  8. package/dist/chunks/chunk-6NTEYECA.mjs +22 -0
  9. package/dist/chunks/chunk-AQYRRXU5.mjs +5 -0
  10. package/dist/chunks/{chunk-2VZUPTI7.cjs → chunk-DFBKA5A6.cjs} +1 -1
  11. package/dist/chunks/chunk-DNE3XPCJ.cjs +2 -0
  12. package/dist/chunks/chunk-E7AHWFZN.cjs +2 -0
  13. package/dist/chunks/chunk-ISMGLHYS.cjs +1 -0
  14. package/dist/chunks/chunk-J6PRUXFG.mjs +265 -0
  15. package/dist/chunks/chunk-JCOXRETY.cjs +22 -0
  16. package/dist/chunks/chunk-ML6B4IQL.mjs +1 -0
  17. package/dist/chunks/chunk-NH4TYEPW.mjs +3 -0
  18. package/dist/chunks/{chunk-S6YNGR7S.cjs → chunk-Q2MOP5ZW.cjs} +2 -2
  19. package/dist/chunks/{chunk-OWG6N2K6.cjs → chunk-UGHF4GOW.cjs} +2 -2
  20. package/dist/chunks/chunk-ZJS7IO5V.mjs +2 -0
  21. package/dist/chunks/chunk-ZYDDQV73.mjs +2 -0
  22. package/dist/chunks/cli-handler-3FSM4C7L.mjs +1 -0
  23. package/dist/chunks/cli-handler-B6H4RZEM.cjs +1 -0
  24. package/dist/chunks/{installer-FB26E7JZ.mjs → installer-NJN3PT5F.mjs} +1 -1
  25. package/dist/chunks/installer-YDJBZTQ7.cjs +1 -0
  26. package/dist/chunks/{interfaces-UIS44Q7A.cjs → interfaces-5BH4K5TM.cjs} +1 -1
  27. package/dist/chunks/local-lock-SPZB3AB7.cjs +1 -0
  28. package/dist/chunks/local-lock-ZHTDWYXF.mjs +1 -0
  29. package/dist/chunks/scan-6W47D2KJ.mjs +1 -0
  30. package/dist/chunks/scan-L6UNVP3V.cjs +1 -0
  31. package/dist/chunks/skill-lock-MNRZ7TIX.mjs +1 -0
  32. package/dist/chunks/skill-lock-VX2HGPTY.cjs +1 -0
  33. package/dist/chunks/store-TSS4BMBF.cjs +1 -0
  34. package/dist/chunks/store-UJPPYDBG.mjs +1 -0
  35. package/dist/chunks/telemetry-B4PS27S5.cjs +1 -0
  36. package/dist/cli.cjs +1 -1
  37. package/dist/cli.mjs +1 -1
  38. package/dist/index.cjs +1 -1
  39. package/dist/index.d.cts +53 -9
  40. package/dist/index.d.ts +53 -9
  41. package/dist/index.mjs +1 -1
  42. package/package.json +5 -7
  43. package/dist/chunks/blob-DOVEGVIE.cjs +0 -1
  44. package/dist/chunks/blob-JSMTOYEN.mjs +0 -1
  45. package/dist/chunks/chunk-2YVJ7YP6.mjs +0 -22
  46. package/dist/chunks/chunk-4R6NKPNW.mjs +0 -3
  47. package/dist/chunks/chunk-676OG55M.mjs +0 -5
  48. package/dist/chunks/chunk-6PJ3YQA7.mjs +0 -2
  49. package/dist/chunks/chunk-72DXY4B7.mjs +0 -1
  50. package/dist/chunks/chunk-GR2NJUJ6.mjs +0 -255
  51. package/dist/chunks/chunk-JFEBB5CL.cjs +0 -22
  52. package/dist/chunks/chunk-KV7EP6AW.cjs +0 -255
  53. package/dist/chunks/chunk-RWSBKHQ2.cjs +0 -3
  54. package/dist/chunks/chunk-TCFGU43L.cjs +0 -2
  55. package/dist/chunks/cli-handler-RAJ42VDN.mjs +0 -1
  56. package/dist/chunks/cli-handler-YAJ5J5VA.cjs +0 -1
  57. package/dist/chunks/installer-GOQTCUJ4.cjs +0 -1
  58. package/dist/chunks/local-lock-4AA55ORE.cjs +0 -1
  59. package/dist/chunks/local-lock-LG5YL33V.mjs +0 -1
  60. package/dist/chunks/scan-QEVID2TF.mjs +0 -1
  61. package/dist/chunks/scan-XWU3FCE3.cjs +0 -1
  62. package/dist/chunks/skill-lock-KHPVP7AD.mjs +0 -1
  63. package/dist/chunks/skill-lock-LET33FVT.cjs +0 -1
  64. package/dist/chunks/store-3NRBE47N.mjs +0 -1
  65. package/dist/chunks/store-EHYH46YY.cjs +0 -1
  66. package/dist/chunks/telemetry-LCGTSJDM.cjs +0 -1
  67. /package/dist/chunks/{chunk-VRHWDHQV.cjs → chunk-GWUDKZEH.cjs} +0 -0
@@ -1,255 +0,0 @@
1
- 'use strict';var chunkS6YNGR7S_cjs=require('./chunk-S6YNGR7S.cjs'),chunkRWSBKHQ2_cjs=require('./chunk-RWSBKHQ2.cjs'),chunk2VZUPTI7_cjs=require('./chunk-2VZUPTI7.cjs'),chunkOWG6N2K6_cjs=require('./chunk-OWG6N2K6.cjs'),chunkJFEBB5CL_cjs=require('./chunk-JFEBB5CL.cjs'),chunkTCFGU43L_cjs=require('./chunk-TCFGU43L.cjs'),chunkXGUPIAAF_cjs=require('./chunk-XGUPIAAF.cjs'),chunkVRHWDHQV_cjs=require('./chunk-VRHWDHQV.cjs'),fs$1=require('fs'),path=require('path'),I=require('@clack/prompts'),L=require('picocolors'),os$1=require('os'),utils=require('@easbot/utils'),vt=require('readline'),util=require('util'),stream=require('stream'),promises=require('fs/promises'),crypto=require('crypto'),detectAgent=require('@vercel/detect-agent'),url=require('url'),child_process=require('child_process');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var I__namespace=/*#__PURE__*/_interopNamespace(I);var L__default=/*#__PURE__*/_interopDefault(L);var vt__namespace=/*#__PURE__*/_interopNamespace(vt);var Qs=new stream.Writable({write(e,t,s){s();}}),en=L__default.default.green("\u25C6"),tn=L__default.default.red("\u25A0"),ln=L__default.default.green("\u25C7"),sn=L__default.default.green("\u25CF"),nn=L__default.default.dim("\u25CB");L__default.default.green("\u2713");var on=L__default.default.green("\u2022"),ae=L__default.default.dim("\u2502"),He=L__default.default.dim("\u2500"),rn=Symbol("cancel");function an(e){let t=0;for(let s of e){let l=s.codePointAt(0);if(l===0)continue;let n=l>=4352&&l<=4447||l>=8986&&l<=8987||l>=9001&&l<=9002||l>=9193&&l<=9196||l===9200||l===9203||l>=9725&&l<=9726||l>=9748&&l<=9749||l>=9800&&l<=9811||l>=9855&&l<=9855||l>=9875&&l<=9875||l>=9889&&l<=9889||l>=9898&&l<=9899||l>=9917&&l<=9918||l>=9924&&l<=9925||l>=9934&&l<=9934||l>=9940&&l<=9940||l>=9962&&l<=9962||l>=9970&&l<=9971||l>=9973&&l<=9973||l>=9978&&l<=9978||l>=9981&&l<=9981||l>=9989&&l<=9989||l>=9994&&l<=9995||l>=10024&&l<=10024||l>=10060&&l<=10060||l>=10062&&l<=10062||l>=10067&&l<=10069||l>=10071&&l<=10071||l>=10133&&l<=10135||l>=10160&&l<=10160||l>=10175&&l<=10175||l>=11035&&l<=11036||l>=11088&&l<=11088||l>=11093&&l<=11093||l>=11904&&l<=42191&&l!==12351||l>=43360&&l<=43388||l>=44032&&l<=55203||l>=63744&&l<=64255||l>=65040&&l<=65049||l>=65072&&l<=65135||l>=65280&&l<=65376||l>=65504&&l<=65510||l>=126976&&l<=129535;t+=n?2:1;}return t}function cn(e,t){let s=util.stripVTControlCharacters(e),l=Math.max(1,t),n=an(s);return Math.max(1,Math.ceil(n/l))}function pn(e,t){let s=t!==void 0&&t>0?t:process.stdout.columns&&process.stdout.columns>0?process.stdout.columns:80;return e.reduce((l,n)=>l+cn(n,s),0)}async function Vt(e){let{message:t,items:s,maxVisible:l=8,initialSelected:n=[],required:o=false,lockedSection:r}=e;return new Promise(g=>{let d=vt__namespace.createInterface({input:process.stdin,output:Qs,terminal:false});process.stdin.isTTY&&process.stdin.setRawMode(true),vt__namespace.emitKeypressEvents(process.stdin,d);let u="",k=0,$=new Set(n),b=0,A=r?r.items.map(T=>T.value):[],p=(T,x)=>{if(!x)return true;let C=x.toLowerCase();return T.label.toLowerCase().includes(C)||String(T.value).toLowerCase().includes(C)},a=()=>s.filter(T=>p(T,u)),f=()=>{if(b>0){process.stdout.write(`\x1B[${b}A`);for(let T=0;T<b;T++)process.stdout.write("\x1B[2K\x1B[1B");process.stdout.write(`\x1B[${b}A`);}},S=(T="active")=>{f();let x=[],C=a(),B=T==="active"?en:T==="cancel"?tn:ln;if(x.push(`${B} ${L__default.default.bold(t)}`),T==="active"){if(r&&r.items.length>0){x.push(`${ae}`);let J=`${L__default.default.bold(r.title)} ${L__default.default.dim("\u2500\u2500 always included")}`;x.push(`${ae} ${He}${He} ${J} ${He.repeat(12)}`);for(let le of r.items)x.push(`${ae} ${on} ${L__default.default.bold(le.label)}`);r.hiddenCount&&r.hiddenCount>0&&x.push(`${ae} ${L__default.default.dim(`...and ${r.hiddenCount} more`)}`),x.push(`${ae}`),x.push(`${ae} ${He}${He} ${L__default.default.bold("Additional agents")} ${He.repeat(29)}`);}let U=`${ae} ${L__default.default.dim("Search:")} ${u}${L__default.default.inverse(" ")}`;x.push(U),x.push(`${ae} ${L__default.default.dim("\u2191\u2193 move, space select, enter confirm")}`),x.push(`${ae}`);let R=Math.max(0,Math.min(k-Math.floor(l/2),C.length-l)),z=Math.min(C.length,R+l),W=C.slice(R,z);if(C.length===0)x.push(`${ae} ${L__default.default.dim("No matches found")}`);else {for(let X=0;X<W.length;X++){let ie=W[X],re=R+X,we=$.has(ie.value),et=re===k,at=we?sn:nn,tt=et?L__default.default.underline(ie.label):ie.label,Et=ie.hint?L__default.default.dim(` (${ie.hint})`):"",xe=et?L__default.default.cyan("\u276F"):" ";x.push(`${ae} ${xe} ${at} ${tt}${Et}`);}let J=R,le=C.length-z;if(J>0||le>0){let X=[];J>0&&X.push(`\u2191 ${J} more`),le>0&&X.push(`\u2193 ${le} more`),x.push(`${ae} ${L__default.default.dim(X.join(" "))}`);}}x.push(`${ae}`);let O=[];for(let J of s)$.has(J.value)&&O.push(J.label);if(O.length===0)x.push(`${ae} ${L__default.default.dim("Selected: (none \u2014 only locked universal)")}`);else {let J=O.length<=3?O.join(", "):`${O.slice(0,3).join(", ")} +${O.length-3} more`;x.push(`${ae} ${L__default.default.green("Selected:")} ${J}`);}x.push(`${L__default.default.dim("\u2514")}`);}else if(T==="submit"){let U=s.filter(z=>$.has(z.value)).map(z=>z.label),R=U.length===0?"(none \u2014 only locked universal)":U.join(", ");x.push(`${ae} ${L__default.default.dim(R)}`);}else T==="cancel"&&x.push(`${ae} ${L__default.default.strikethrough(L__default.default.dim("Cancelled"))}`);process.stdout.write(x.join(`
2
- `)+`
3
- `),b=pn(x,process.stdout.columns);},v=()=>{process.stdin.removeListener("keypress",w),process.stdin.isTTY&&process.stdin.setRawMode(false),d.close();},P=()=>{if(o&&$.size===0&&A.length===0)return;S("submit"),v();let T=new Set(A),x=[...A];for(let C of $)T.has(C)||(T.add(C),x.push(C));g(x);},m=()=>{S("cancel"),v(),g(rn);},w=(T,x)=>{if(!x)return;let C=a();if(x.name==="return"){P();return}if(x.name==="escape"||x.ctrl&&x.name==="c"){m();return}if(x.name==="up"){k=Math.max(0,k-1),S();return}if(x.name==="down"){k=Math.min(C.length-1,k+1),S();return}if(x.name==="space"){let B=C[k];B&&($.has(B.value)?$.delete(B.value):$.add(B.value)),S();return}if(x.name==="backspace"){u=u.slice(0,-1),k=0,S();return}if(x.sequence&&!x.ctrl&&!x.meta&&x.sequence.length===1){u+=x.sequence,k=0,S();return}};process.stdin.on("keypress",w),S();})}async function Bl(e){let t=crypto.createHash("sha256");try{let s=await promises.readFile(path.join(e,"SKILL.md"),"utf-8");t.update("SKILL.md"),t.update(s);}catch{t.update("EMPTY");}return t.digest("hex")}async function Zt(e,t){let s;try{s=await promises.lstat(e);}catch{return "absent"}if(s.isSymbolicLink())try{let g=utils.Filesystem.toUnixPath(await promises.realpath(e)),d=utils.Filesystem.toUnixPath(await promises.realpath(t));return g===d?"symlinked":"orphan"}catch{return "orphan"}let l=path.join(e,"SKILL.md");try{await promises.access(l);}catch{return "absent"}if(!await chunkJFEBB5CL_cjs.z(l))return "divergent";let o=await Bl(e),r=await Bl(t);return o===r?"copied":"divergent"}function Gl(e,t){let s=[];for(let l of e)for(let n of ["global","project"]){let o=l.cells[n];o.state==="absent"?s.push({kind:"install",agentId:l.agentId,scope:n,mode:t,targetPath:o.targetPath}):o.state==="symlinked"||o.state==="copied"?s.push({kind:"skip",agentId:l.agentId,scope:n,state:o.state}):s.push({kind:"report",agentId:l.agentId,scope:n,state:o.state});}return s}async function Wl(e,t){let s=[],l=[];for(let n of e)if(n.kind!=="skip"){if(n.kind==="report"){l.push(n);continue}try{await promises.mkdir(path.dirname(n.targetPath),{recursive:!0});let o;n.mode==="symlink"?o=await chunkOWG6N2K6_cjs.i(t.sourceDir,n.targetPath,{isGlobal:t.installGlobally&&n.scope==="global",agentType:n.agentId,cwd:t.cwd}):o=await chunkOWG6N2K6_cjs.j(t.sourceDir,n.targetPath,{agentType:n.agentId,isGlobal:t.installGlobally&&n.scope==="global"}),o.success?(o.symlinkFailed,s.push(n)):l.push({kind:"report",agentId:n.agentId,scope:n.scope,state:"divergent"});}catch{l.push({kind:"report",agentId:n.agentId,scope:n.scope,state:"divergent"});}}return {installed:s,reported:l}}function Hl(e,t){let s=[];for(let l of e)if(l==="eve"&&t.includeEveSubagents!==false){let n=chunkTCFGU43L_cjs.i(t.cwd);if(n.length===0)s.push(kn(t));else for(let o of n)s.push({agentId:l,cells:{global:ze("global",l,true,t,o),project:ze("project",l,false,t,o)}});}else s.push({agentId:l,cells:{global:ze("global",l,true,t),project:ze("project",l,false,t)}});return s}function ze(e,t,s,l,n){return {scope:e,state:"absent",targetPath:path.join(chunkOWG6N2K6_cjs.g(t,s,l.cwd,n),l.skillId),sourceDir:l.sourceDir}}function kn(e){return {agentId:"eve",cells:{global:ze("global","eve",true,e),project:ze("project","eve",false,e)}}}async function el(e){let t=e.cwd??process.cwd(),s=utils.Filesystem.toUnixPath(e.sourceDir),l=e.includeEveSubagents??true;if(e.assumeYes)return {skipped:true,installed:[],reported:[]};let n=Hl(e.targetAgents,{skillId:e.skillId,sourceDir:s,cwd:t,includeEveSubagents:l}),o=[];for(let u of n){let k={...u.cells.global,state:await Zt(u.cells.global.targetPath,s)},$={...u.cells.project,state:await Zt(u.cells.project.targetPath,s)};o.push({agentId:u.agentId,cells:{global:k,project:$}});}let r=Gl(o,e.defaultMode),{installed:g,reported:d}=await Wl(r,{sourceDir:s,installGlobally:e.installGlobally,cwd:t});return {skipped:false,installed:g,reported:d,matrix:o}}function xt(e){return L__default.default.bgCyan(L__default.default.black(L__default.default.bold(` ${e} `)))}var qe=null,yn={cursor:"cursor","cursor-cli":"cursor",claude:"claude-code",cowork:"claude-code",devin:"universal",replit:"replit",gemini:"gemini-cli",codex:"codex",antigravity:"antigravity","augment-cli":"augment",opencode:"opencode","github-copilot":"github-copilot"};async function Ye(){return qe||(qe=await detectAgent.determineAgent(),qe.isAgent&&chunkS6YNGR7S_cjs.a(qe.agent.name),qe)}async function At(){return (await Ye()).isAgent}async function Zi(){let e=await Ye();return e.isAgent?e.agent.name:null}function zl(e){return yn[e]??null}function ll(e,t){return t?`${e}#${t}`:e}var i="\x1B[0m",F="\x1B[1m",c="\x1B[38;5;102m",M="\x1B[38;5;145m",he="\x1B[36m";var nt="\x1B[33m";path.dirname(url.fileURLToPath(chunkVRHWDHQV_cjs.c));var Jl=Number(process.env.SKILLS_UPDATE_TIMEOUT??6e4);async function Vl(e,t,s){let l=null,n=new Promise((o,r)=>{l=setTimeout(()=>r(new Error(`${s} timed out after ${t}ms`)),t);});try{return await Promise.race([e,n])}finally{l&&clearTimeout(l);}}function Xl(e,t){if(!e)return [];let l=e.message.includes("timed out")?"Fetch timeout":"Source unreachable";return t.map(({name:n,entry:o})=>({name:n,reason:l,sourceUrl:o.source,sourceType:o.sourceType,ref:o.ref}))}async function Zl(e){try{return await chunkJFEBB5CL_cjs.v(e)}catch{return}}async function Ql(e,t,s,l){let{rm:n,readdir:o,stat:r}=await import('fs/promises'),{createHash:g}=await import('crypto'),{Filesystem:d}=await import('@easbot/utils'),{deriveSourceKey:u,getStoreDir:k,writeStoreDefinitionsBatch:$,findSkillByLocation:b}=await import('./store-EHYH46YY.cjs'),A=u(e),p=k(e),a=d.join(d.normalize(t),s),f=d.join(p,s);if(!await d.exists(a))return {ok:false};let S=async T=>{let x=[],C=async U=>{try{let z=[...await o(U,{withFileTypes:!0})].sort((O,J)=>O.name.localeCompare(J.name)),W=await Promise.all(z.map(async O=>{let J=d.join(U,O.name);try{let le=await r(J);return `${J.slice(d.normalize(T).length+1).split(/[\\/]/).join("/")}|${le.size}|${O.isDirectory()?"d":"f"}|${(le.mode&511).toString(8)}`}catch{return `${O.name}|?|?|?`}}));for(let O of W)x.push(O);for(let O of z)if(O.isDirectory()&&!await C(d.join(U,O.name)))return !1;return !0}catch{return false}};if(await C(d.normalize(T)))return x.sort(),g("sha256").update(x.join(`
4
- `)).digest("hex")},v=await S(a),P=await S(f);if(v&&P&&v===P){let x=(await b(A,wn(e,s),l))?.entry.computedHash;if(x)return {ok:true,hash:x,skipped:true}}try{await n(f,{recursive:!0,force:!0}),await d.cp(a,f);}catch{return {ok:false}}let m=await Zl(f);if(!m)return {ok:false};let w=e.type==="local"?e.localPath??e.url:d.normalize(t);try{await $([{skillName:l,parsed:e,sourceKey:A,sourcePath:w,storePath:p,skillPath:s,computedHash:m}]);}catch{}return {ok:true,hash:m}}function wn(e,t){return (e.subpath??t.split("/")[0]??"default").split("/")[0]||"default"}function Lt(e,t,s){return e||!t||!s?true:t!==s}function vn(e,t={}){let s={};t.cwd&&(s.cwd=t.cwd);let l=[];for(let n=0;n<e.length;n++){let o=e[n];if(o==="-g"||o==="--global")s.global=true;else if(o==="-p"||o==="--project")s.project=true;else if(o==="-y"||o==="--yes")s.yes=true;else if(o==="--all")s.all=true;else if(o==="--force")s.force=true;else if(o==="-a"||o==="--agent")for(s.agent=s.agent??[];n+1<e.length&&!e[n+1].startsWith("-");)s.agent.push(e[++n]);else o&&!o.startsWith("-")&&l.push(o);}return l.length>0&&(s.skills=l),s}function Pr(e){let t=e||process.cwd();return fs$1.existsSync(path.join(t,"skills-lock.json"))}async function xn(e){if(e.skills&&e.skills.length>0)return e.global?"global":e.project?"project":"both";if(e.global&&e.project)return "both";if(e.global)return "global";if(e.project)return "project";if(e.yes||!process.stdin.isTTY)return "both";let t=await I__namespace.select({message:"Update scope",options:[{value:"project",label:"Project",hint:"Update skills in current directory (committed with your project)"},{value:"global",label:"Global",hint:"Update skills in home directory (available across all projects)"},{value:"both",label:"Both",hint:"Update all skills (project + global)"}]});return I__namespace.isCancel(t)&&(I__namespace.cancel("Cancelled"),process.exit(0)),t}function es(e,t){if(!t||t.length===0)return true;let s=e.toLowerCase();return t.some(l=>{let n=l.toLowerCase();return n==="*"?true:n===s})}function An(e){return e.sourceType==="local"?"Local path":e.sourceType==="git"?"Git URL":e.sourceType==="well-known"?"Well-known skill":e.computedHash?e.skillPath?"No version tracking":"No skill path recorded":"Private or deleted repo"}function Tn(e){let t=e.sourceUrl;if(e.sourceType==="well-known"){let s=t.indexOf("/.well-known/");s!==-1&&(t=t.slice(0,s));}return ll(t,e.ref)}function Tt(e){if(e.length===0)return;console.log(),console.log(`${c}${e.length} skill(s) cannot be checked automatically:${i}`);let t=new Map;for(let s of e){let l=Tn(s),n=t.get(l)||[];n.push(s),t.set(l,n);}for(let[s,l]of t){if(l.length===1){let n=l[0];console.log(` ${M}\u2022${i} ${chunkTCFGU43L_cjs.b(n.name)} ${c}(${n.reason})${i}`);}else {let n=l[0].reason,o=l.map(r=>chunkTCFGU43L_cjs.b(r.name)).join(", ");console.log(` ${M}\u2022${i} ${o} ${c}(${n})${i}`);}console.log(` ${c}To update: ${M}easbot skills add ${s} -g -y${i}`);}}async function ts(e){let t={skills:[],refreshedSkillCount:0,upToDateSkillCount:0,failedSkillCount:0},s=new Map,l=(a,f)=>{let S=`${f}::${a}`,v=s.get(S);return v||(v={skillName:a,scope:f,sharedAgents:[],copiedAgents:[],linkedAgents:[],upToDateAgents:[],deadLinkAgents:[],failed:[],ok:true,failedCount:0},s.set(S,v),t.skills.push(v)),v},n=e.scope??"both",o=chunkTCFGU43L_cjs.t(e.agentFilter??[]),r=o.length>0?o:void 0,d=(await chunk2VZUPTI7_cjs.a({scope:n,cwd:e.cwd,agentFilter:r})).map(a=>({name:a.name,description:"",path:a.skillDir,canonicalPath:a.skillDir,scope:a.scope,agents:[...a.agents]})),u=e.skillNames??[];if(!(u.length===1&&u[0]==="*")){let a=new Set(u.map(f=>f.toLowerCase()));d=d.filter(f=>a.has(f.name.toLowerCase()));}let{readLocalLock:k}=await import('./local-lock-4AA55ORE.cjs'),{readSkillLock:$}=await import('./skill-lock-LET33FVT.cjs'),b=await k(),A=await $();for(let a of d){let f=a.scope==="global"?A.skills[a.name]:b.skills[a.name];if(!f?.marketId||!f.pluginId)continue;let S=await chunkJFEBB5CL_cjs.Z(f.marketId,f.pluginId,a.name);if(!S)continue;let{readStoreIndex:v}=await import('./store-EHYH46YY.cjs'),m=(await v()).markets[S.marketId];if(!m)continue;let T=`${m.storePath.replace(/\\/g,"/").replace(/\/+$/,"")}/${S.entry.skillPath}`.replace(/\\/g,"/");a.path=T,a.canonicalPath=T;}let p=new Map;for(let a of d){let f=`${a.scope}::${a.name}::${a.path}`;p.set(f,a);}for(let a of u){if(a==="*")continue;let f=a.replace(/\.+$/,""),S=u.indexOf(a),P=e.skillStorePaths?.[S]?.split(/[\\/]/).filter(Boolean).pop();if(P){for(let[m,w]of p)if(m.startsWith(`${w.scope}::`)&&m.endsWith(`::${P}`)){let T=`${w.scope}::${f}::${w.path}`;p.has(T)||p.set(T,w);break}}}if(p.size===0)return t;for(let[a,f]of p){let v=a.split("::")[1].replace(/\.+$/,""),P=f.path,m=l(v,f.scope),T=fs$1.existsSync(P)?await chunkJFEBB5CL_cjs.z(`${P}/SKILL.md`.replace(/\\/g,"/")):void 0;if(!T){if(!await In(v,f.scope==="global"))continue;for(let B of f.agents)m.failed.push({agent:B,reason:"store source missing \u2014 run `easbot skills add <source>` to rebuild"}),m.failedCount++,m.ok=false;continue}let x=T;for(let C of f.agents){let B=chunkTCFGU43L_cjs.r(C,f.scope),R=await chunkOWG6N2K6_cjs.h(x,C,{global:f.scope==="global",mode:"symlink",cwd:e.cwd});if(!R.success){m.failed.push({agent:C,reason:R.error??"install failed"}),m.failedCount++,m.ok=false;continue}R.skippedReason==="up-to-date"?m.upToDateAgents.push(C):B?m.sharedAgents.push(C):m.copiedAgents.push(C);}}for(let a of t.skills){let f=a.failedCount>0,S=a.sharedAgents.length+a.copiedAgents.length+a.linkedAgents.length>0,v=a.upToDateAgents.length+a.deadLinkAgents.length>0||S;f?t.failedSkillCount++:S?t.refreshedSkillCount++:v&&t.upToDateSkillCount++;}return t}async function In(e,t){return t?(await chunkRWSBKHQ2_cjs.c()).skills[e]:(await chunkJFEBB5CL_cjs.t()).skills[e]}function ls(e){if(e.skills.length===0)return;let t=u=>{let k=u.map($=>chunkTCFGU43L_cjs.e[$]?.displayName??$);return k.length<=5?k.join(", "):`${k.slice(0,5).join(", ")} +${k.length-5} more`},s=e.skills.some(u=>u.sharedAgents.length>0),l=new Set;for(let u of e.skills){for(let k of u.sharedAgents)l.add(k);for(let k of u.copiedAgents)l.add(k);for(let k of u.linkedAgents)l.add(k);for(let k of u.upToDateAgents)l.add(k);}let n=new Set;for(let u of l){let k=false;for(let $ of e.skills)if($.sharedAgents.includes(u)){k=true;break}k||n.add(u);}let o=[];s&&o.push("Universal");for(let u of n)o.push(chunkTCFGU43L_cjs.e[u]?.displayName??u);let r=o.slice(1).sort(),g=o.length>0&&o[0]==="Universal"?["Universal",...r]:r;g.length>0&&console.log(`${M}Updating for: ${g.join(", ")}${i}`);let d=["global","project"];for(let u of d){let k=e.skills.filter(b=>b.scope===u);if(k.length===0)continue;console.log(`${F}${u==="global"?"Global Skills":"Project Skills"}${i}`);let $=[...k].sort((b,A)=>b.skillName.localeCompare(A.skillName));for(let b of $){let A=chunkTCFGU43L_cjs.b(b.skillName);console.log(` ${c}\u2514${i} ${he}${A}${i}`);let p=[];if(b.sharedAgents.length>0&&p.push({label:"universal",agents:b.sharedAgents}),b.copiedAgents.length>0&&p.push({label:"copied",agents:b.copiedAgents}),b.linkedAgents.length>0&&p.push({label:"symlinked",agents:b.linkedAgents}),b.upToDateAgents.length>0&&p.push({label:"up-to-date",agents:b.upToDateAgents}),p.length===0&&b.failed.length===0){console.log(` ${c}\u2514(no install targets)${i}`);continue}for(let a of p){let f=a.agents.length;console.log(` ${c}\u2514${i} (${f} agents) ${a.label}: ${t(a.agents)}`);}if(b.failed.length>0)for(let{agent:a,reason:f}of b.failed){let S=chunkTCFGU43L_cjs.e[a]?.displayName??a;console.log(` ${M}\u2717 ${S}:${i} ${c}${f}${i}`);}}console.log();}}async function Ln(e){let t=await chunkJFEBB5CL_cjs.t(),s=[];for(let[l,n]of Object.entries(t.skills))es(l,e)&&n.sourceType!=="node_modules"&&s.push({name:l,source:n.source,entry:n});return s}async function jn(e={}){let t=e.cwd||process.cwd(),s=await chunkRWSBKHQ2_cjs.c(),l=Object.keys(s.skills),n=0,o=0;if(l.length===0)return e.skills||(console.log(`${c}No global skills tracked in lock file.${i}`),console.log(`${c}Install skills with${i} ${M}easbot skills add <package> -g${i}`)),{successCount:n,failCount:o,checkedCount:0};let{listInstalledSkills:r}=await import('./installer-GOQTCUJ4.cjs'),g=await r({scope:"global",agentFilter:e.agent,cwd:t}),d=new Set(g.map(p=>p.name)),u=[],k=[],$=[];for(let p of l){if(!es(p,e.skills))continue;let a=s.skills[p];if(a){if(!a.skillPath){k.push({name:p,reason:An(a),sourceUrl:a.source,sourceType:a.sourceType,ref:a.ref});continue}d.has(p)&&$.push({name:p,entry:a});}}let b=new Map;for(let p of $){let a=p.entry.source,f=b.get(a)||[];f.push(p),b.set(a,f);}for(let[p,a]of b){let f=a[0].entry,S=f.source,v=f.sourceType,P=null;process.stdout.write(`\r${c}Checking skills from source: ${p}${i}\x1B[K
5
- `);let m=null;try{let T=await Vl(chunkJFEBB5CL_cjs.R({type:v??"git",url:S,ref:f.ref??void 0,mode:"update"}),Jl,`update fetch ${p}`);if(P=T.tempDir,T.cloneError&&(m=T.cloneError),!m&&P){let x=await chunkJFEBB5CL_cjs.B(P),C=P.replace(/\\/g,"/").replace(/\/+$/,""),B=x.map(U=>{let R=U.path.replace(/\\/g,"/");return path.relative(C,R).split(path.sep).join("/")});if(x.length===0)m=new Error(`Source returned 0 skills (network 404 / empty repo / cache corruption): ${p}`);else {let U=new Set,R=new Set(B),z=chunkJFEBB5CL_cjs.e(S);for(let{name:W,entry:O}of a){if(U.has(W))continue;let le=O.skillPath.split(path.sep).join("/").replace(/\/SKILL\.md$/,"");if(!R.has(le))continue;let X=await Ql(z,P,le,W);if(!X.ok){k.push({name:W,reason:"Store sync failed",sourceUrl:O.source,sourceType:O.sourceType,ref:O.ref});continue}Lt(e.force,X.hash,X.hash)&&u.push({name:W,source:p,entry:O});}}}}catch(w){m=w instanceof Error?w:new Error(String(w));}finally{P&&v!=="local"&&!chunkJFEBB5CL_cjs.ha(P)&&await chunkJFEBB5CL_cjs.l(P);}m&&(console.log(` ${c}\u2717 Failed to check skills from ${p}: ${m.message}${i}`),k.push(...Xl(m,a)));}$.length>0&&process.stdout.write("\r\x1B[K");let A=$.length+k.length;if($.length===0&&k.length===0)return e.skills||console.log(`${c}No global skills to check.${i}`),{successCount:n,failCount:o,checkedCount:0};if($.length===0&&k.length>0)return Tt(k),{successCount:n,failCount:o,checkedCount:A};if(u.length===0)return console.log(`${M}\u2713 All global skills are up to date${i}`),{successCount:n,failCount:o,checkedCount:A};if(console.log(`${M}Found ${u.length} global update(s)${i}`),console.log(),u.length===0)return Tt(k),{successCount:n,failCount:o,checkedCount:A};try{let p=[],a=[];for(let S of u){p.push(S.name);let v=chunkJFEBB5CL_cjs.e(S.entry.source),P=chunkJFEBB5CL_cjs.N(v),w=(S.entry.skillPath??S.name).split(/[\\/]/).join("/").replace(/\/SKILL\.md$/,"");a.push(path.join(P,w));}let f=await ts({skillNames:p,skillStorePaths:a,scope:"global",agentFilter:e.agent,cwd:t});ls(f),f.failedSkillCount>0?o+=f.failedSkillCount:n+=f.skills.length;}catch(p){o+=u.length,console.log(`${c}\u2717 Failed to refresh: ${p instanceof Error?p.message:String(p)}${i}`);}if(u.length>0)try{let p=await chunkRWSBKHQ2_cjs.c(),a=new Date().toISOString(),f=!1,S=0;for(let v of u){let P=p.skills[v.name];if(!P)continue;if(!v.entry.marketId||!v.entry.pluginId){console.log(`${c} \u26A0 ${v.name}: lock entry missing marketId/pluginId; run \`easbot skills remove ${v.name}\` then re-add${i}`);continue}let m=chunkJFEBB5CL_cjs.e(v.entry.source),w=chunkJFEBB5CL_cjs.N(m),x=(v.entry.skillPath??v.name).split(/[\\/]/).join("/").replace(/\/SKILL\.md$/,""),C=path.join(w,x),B=await Zl(C);B&&P.computedHash!==B&&(P.computedHash=B,P.updatedAt=a,f=!0,S++);}f&&(await chunkRWSBKHQ2_cjs.d(p),console.log(`${c}\u2192 updated global lock: ${S} skill(s) refreshed, ${Object.keys(p.skills).length} total tracked${i}`));}catch(p){console.log(`${c}\u26A0 Failed to write global lock: ${p instanceof Error?p.message:String(p)}${i}`);}return Tt(k),{successCount:n,failCount:o,checkedCount:A}}async function _n(e={}){let t=e.cwd||process.cwd(),s=await Ln(e.skills),l=0,n=0,o=[];if(s.length===0)return e.skills||(console.log(`${c}No project skills to update.${i}`),console.log(`${c}Install project skills with${i} ${M}easbot skills add <package>${i}`)),{successCount:l,failCount:n,foundCount:0};let{listInstalledSkills:r}=await import('./installer-GOQTCUJ4.cjs'),g=await r({scope:"project",agentFilter:e.agent,cwd:t}),d=new Set(g.map(a=>a.name)),u=s.filter(a=>d.has(a.name)),k=u.filter(a=>a.entry.skillPath),$=u.filter(a=>!a.entry.skillPath);if(k.length===0)return console.log(`${c}No project skills can be updated in place.${i}`),ql($),{successCount:l,failCount:n,foundCount:s.length};console.log(`${M}Checking ${k.length} skill(s)...${i}`),console.log();let b=new Map;for(let a of k){let f=a.entry.source,S=b.get(f)||[];S.push(a),b.set(f,S);}let A=await chunkJFEBB5CL_cjs.t(),p=[];for(let[a,f]of b){let S=f[0].entry,v=S.source,P=S.ref;Object.entries(A.skills).filter(([R,z])=>z.source===a).map(([R,z])=>R);let w=null,T=[],x=new Map,C=null;try{let R=S.sourceType??"git",z=await Vl(chunkJFEBB5CL_cjs.R({type:R,url:v,ref:P,mode:"update"}),Jl,`update fetch ${a}`);if(w=z.tempDir,z.cloneError)C=z.cloneError;else {let W=await chunkJFEBB5CL_cjs.B(w);if(W.length===0)C=new Error(`Source returned 0 skills (network 404 / empty repo / cache corruption): ${a}`);else {let O=W.map(le=>{let X=path.relative(w,le.path);return path.join(X,"SKILL.md").split(path.sep).join("/")}),J=chunkJFEBB5CL_cjs.e(v);for(let le of W){let ie=path.join(path.relative(w,le.path),"SKILL.md").split(path.sep).join("/").replace(/\/SKILL\.md$/,""),re=await Ql(J,w,ie,le.name);re.ok&&re.hash&&x.set(le.name,re.hash);}}}}catch(R){C=R instanceof Error?R:new Error(String(R));}finally{w&&!chunkJFEBB5CL_cjs.ha(w)&&await chunkJFEBB5CL_cjs.l(w);}if(C){console.log(` ${c}\u2717 Failed to check for deleted skills from ${a}: ${C.message}${i}`);let R=f.map(z=>({name:z.name,entry:{source:z.source,sourceType:z.entry.sourceType,ref:z.entry.ref}}));p.push(...Xl(C,R));continue}let B=f.filter(R=>!T.includes(R.name)),U=[];for(let R of B){let z=A.skills[R.name],W=x.get(R.name);if(!W)continue;let O=z?.computedHash;if(!Lt(e.force,O,W))continue;let J=chunkJFEBB5CL_cjs.e(R.entry.source),le=chunkJFEBB5CL_cjs.N(J),ie=(R.entry.skillPath??R.name).split(/[\\/]/).join("/").replace(/\/SKILL\.md$/,"");U.push({name:R.name,source:R.entry.source,skillPath:ie,storeRoot:le});}if(U.length!==0)try{let R=U.map(O=>O.name),z=U.map(O=>path.join(O.storeRoot,O.skillPath)),W=await ts({skillNames:R,skillStorePaths:z,scope:"project",agentFilter:e.agent,cwd:t});ls(W),W.failedSkillCount>0?n+=W.failedSkillCount:l+=W.skills.length;for(let O of U)o.push(O.name);}catch(R){n+=U.length,console.log(` ${c}\u2717 Failed to refresh: ${R instanceof Error?R.message:String(R)}${i}`);}}if(ql($),Tt(p),l>0&&o.length>0)try{let a=await chunkJFEBB5CL_cjs.t(),f=new Date().toISOString(),S=!1,v=0;for(let P of o){let m=a.skills[P];if(!m)continue;let T=(await chunkJFEBB5CL_cjs.Z(m.marketId,m.pluginId,P))?.entry.computedHash;T&&m.computedHash!==T&&(m.computedHash=T,m.updatedAt=f,S=!0,v++);}if(S){let{writeLocalLock:P}=await import('./local-lock-4AA55ORE.cjs');await P(a),console.log(`${c}\u2192 updated project lock: ${v} skill(s) refreshed, ${Object.keys(a.skills).length} total tracked${i}`);}}catch(a){console.log(`${c}\u26A0 Failed to write project lock: ${a instanceof Error?a.message:String(a)}${i}`);}return {successCount:l,failCount:n,foundCount:s.length}}function ql(e){if(e.length!==0){console.log(),console.log(`${c}${e.length} project skill(s) cannot be updated automatically (installed before skillPath tracking):${i}`);for(let t of e){let s=ll(t.entry.source,t.entry.ref);console.log(` ${M}\u2022${i} ${chunkTCFGU43L_cjs.b(t.name)}`),console.log(` ${c}To refresh: ${M}easbot skills add ${s} -y${i}`);}}}async function ss(e=[],t={}){let s=vn(e,t);s.all===true&&(s.yes=true,(!s.skills||s.skills.length===0)&&(s.skills=["*"]));let l=await xn(s);s.skills?console.log(`${M}Updating ${s.skills.join(", ")}...${i}`):console.log(`${M}Checking for skill updates...${i}`),console.log();let n=0,o=0,r=0;if(l==="global"||l==="both"){l==="both"&&!s.skills&&console.log(`${F}Global Skills${i}`);let{successCount:g,failCount:d,checkedCount:u}=await jn(s);n+=g,o+=d,r+=u,l==="both"&&!s.skills&&console.log();}if(l==="project"||l==="both"){l==="both"&&!s.skills&&console.log(`${F}Project Skills${i}`);let{successCount:g,failCount:d,foundCount:u}=await _n(s);n+=g,o+=d,r+=u;}s.skills&&r===0&&console.log(`${c}No installed skills found matching: ${s.skills.join(", ")}${i}`),console.log(),n>0&&console.log(`${M}\u2713 Updated ${n} skill(s)${i}`),o>0&&console.log(`${c}Failed to update ${o} skill(s)${i}`),chunkS6YNGR7S_cjs.d({event:"update",scope:l,skillCount:String(n+o),successCount:String(n),failCount:String(o)}),console.log();}var ns={version:"0.3.12"};var as="eve agent";function Nn(e,t){return e.startsWith("git@")||e.startsWith("ssh://")?e:t}function cs(e){chunkS6YNGR7S_cjs.b(e);}async function On(e,t,s,l){let{agent:n,subagent:o}=t,{installMode:r,installGlobally:g}=l,k=await chunkOWG6N2K6_cjs.h(e,n,{global:g,mode:r,eveSubagent:o});return {skill:chunkJFEBB5CL_cjs.C(e),agent:ot(t),pluginName:e.pluginName,...k}}var En=(()=>{let e=process.env.SKILLS_AUDIT_DISPLAY_TIMEOUT_MS;if(!e)return 3e4;let t=Number.parseInt(e,10);return Number.isFinite(t)&&t>0?t:3e4})();function os(e){switch(e){case "critical":return L__default.default.red(L__default.default.bold("Critical Risk"));case "high":return L__default.default.red("High Risk");case "medium":return L__default.default.yellow("Med Risk");case "low":return L__default.default.green("Low Risk");case "safe":return L__default.default.green("Safe");default:return L__default.default.dim("--")}}function Dn(e){if(!e)return L__default.default.dim("--");let t=e.alerts??0;return t>0?L__default.default.red(`${t} alert${t!==1?"s":""}`):L__default.default.green("0 alerts")}function Xe(e,t){let s=chunkTCFGU43L_cjs.a(e),l=Math.max(0,t-s.length);return e+" ".repeat(l)}function Un(e,t,s){if(!e)return [];if(!t.some(g=>{let d=e[g.slug];return d&&Object.keys(d).length>0}))return [];let n=Math.min(Math.max(...t.map(g=>g.displayName.length)),36),o=[],r=Xe("",n+2)+Xe(L__default.default.dim("Gen"),18)+Xe(L__default.default.dim("Socket"),18)+L__default.default.dim("Snyk");o.push(r);for(let g of t){let d=e[g.slug],u=g.displayName.length>n?g.displayName.slice(0,n-1)+"\u2026":g.displayName,k=d?.ath?os(d.ath.risk):L__default.default.dim("--"),$=d?.socket?Dn(d.socket):L__default.default.dim("--"),b=d?.snyk?os(d.snyk.risk):L__default.default.dim("--");o.push(Xe(L__default.default.cyan(u),n+2)+Xe(k,18)+Xe($,18)+b);}return o.push(""),o.push(`${L__default.default.dim("Details:")} ${L__default.default.dim(`https://skills.sh/${s}`)}`),o}function ol(e,t){let s=os$1.homedir();return e===s||e.startsWith(s+path.sep)?"~"+e.slice(s.length):e===t||e.startsWith(t+path.sep)?"."+e.slice(t.length):e}function ke(e,t=5){if(e.length<=t)return e.join(", ");let s=e.slice(0,t),l=e.length-t;return `${s.join(", ")} +${l} more`}function Fn(e){let t=e.map(l=>L__default.default.cyan(chunkJFEBB5CL_cjs.C(l))),s=ke(t,3);return chunkTCFGU43L_cjs.a(s).length<=80?s:`${e.length} selected skills`}function Mn(e){return `Detected an eve project. Install ${Fn(e)} for your ${as} to use?`}function Kn(e,t,s){let l=[],n=[],o=[],r=new Map;if(e)for(let g of e)g.mode&&r.set(g.agent,g.mode);for(let g of t){let d=chunkTCFGU43L_cjs.e[g].displayName,u=r.get(d);chunkTCFGU43L_cjs.r(g,s?"global":"project")?l.push(d):u==="symlink"?o.push(d):n.push(d);}return {universal:l,copied:n,symlinked:o}}function ot(e){let t=chunkTCFGU43L_cjs.e[e.agent].displayName;return e.subagent?`${t} (${e.subagent})`:t}function jt(e){return e.subagent?`${e.agent}:${e.subagent}`:e.agent}function Bn(e,t){let s=[];for(let l of e)if(l==="eve")for(let n of t)s.push({agent:l,subagent:n});else s.push({agent:l});return s}function Gn(e,t,s,l=[]){let n=[],o=e.filter($=>!$.subagent).map($=>$.agent),r=e.filter($=>$.subagent).map(ot),g,d;if(l.length>0){let $=new Set(l);g=o.filter(b=>$.has(b)),d=o.filter(b=>!$.has(b));}else g=o.filter($=>chunkTCFGU43L_cjs.r($,s?"global":"project")),d=o.filter($=>!chunkTCFGU43L_cjs.r($,s?"global":"project"));let u=g.map($=>chunkTCFGU43L_cjs.e[$].displayName),k=d.map($=>chunkTCFGU43L_cjs.e[$].displayName);return t==="symlink"?(u.length>0&&n.push(` ${L__default.default.green("universal:")} ${ke(u)}`),k.length>0&&n.push(` ${L__default.default.dim("symlinked:")} ${ke(k)}`),r.length>0&&n.push(` ${L__default.default.dim("copied:")} ${ke(r)}`)):(u.length>0&&n.push(` ${L__default.default.green("universal:")} ${ke(u)}`),k.length>0&&n.push(` ${L__default.default.dim("copied:")} ${ke(k)}`),r.length>0&&n.push(` ${L__default.default.dim("copied (subagent):")} ${ke(r)}`)),n}function is(e,t){let s=chunkTCFGU43L_cjs.k(t),l=[...e];for(let n of s)l.includes(n)||l.push(n);return l}function Wn(e,t,s){let l=[],{universal:n,copied:o,symlinked:r}=Kn(e,t,s),g=o,d=e.filter(u=>u.symlinkFailed&&!u.skipped).map(u=>u.agent);return n.length>0&&l.push(` ${L__default.default.green("universal:")} ${ke(n)}`),g.length>0&&l.push(` ${L__default.default.cyan("copied:")} ${ke(g)}`),r.length>0&&l.push(` ${L__default.default.dim("symlinked:")} ${ke(r)}`),d.length>0&&l.push(` ${L__default.default.yellow("symlink-failed:")} ${ke(d)}`),l}function Hn(e){return I__namespace.multiselect({...e,options:e.options,message:`${e.message} ${L__default.default.dim("(space to toggle)")}`})}async function zn(e,t){return await Vt({message:e,items:t,initialSelected:[],required:true})}async function rs(e){let t=e.global===true?"global":"project",s=u=>t!=="global"||chunkTCFGU43L_cjs.e[u].globalSkillsDir!==void 0,l=chunkTCFGU43L_cjs.k(t).filter(s),n=chunkTCFGU43L_cjs.l(t).filter(u=>u!=="eve"&&s(u)),o={title:"Universal (.agents/skills)",items:l.map(u=>({value:u,label:chunkTCFGU43L_cjs.e[u].displayName}))},r=n.map(u=>({value:u,label:chunkTCFGU43L_cjs.e[u].displayName,hint:e.global?chunkTCFGU43L_cjs.e[u].globalSkillsDir:chunkTCFGU43L_cjs.e[u].skillsDir})),d=await Vt({message:"Which agents do you want to install to?",items:r,initialSelected:[],lockedSection:o});if(Array.isArray(d)){let u=d,k=new Set(l),$=[],b=[],A=new Set;for(let p of u)A.has(p)||(A.add(p),k.has(p)?$.push(p):b.push(p));return {locked:$,selected:b}}return d}var qn=ns.version;chunkS6YNGR7S_cjs.b(qn);async function it(e,t={}){let s=e[0],l=false,n=()=>{l||(I__namespace.log.message(L__default.default.dim("Tip: use the --yes (-y) and --global (-g) flags to install without prompts.")),l=true);};if(!s){let{readStoreIndex:g,resolveDefaultSource:d}=await import('./store-EHYH46YY.cjs'),u=await g();s=await d(u);}t.all&&(t.skill=["*"],t.agent=["*"],t.yes=true);let o=await Ye();if(o.isAgent&&(t.yes=true,!t.agent||t.agent.length===0)){let g=zl(o.agent.name);if(g){let d=t.global===true?"global":"project";t.agent=is([g],d);}}console.log(),o.isAgent||I__namespace.intro(L__default.default.bgCyan(L__default.default.black(" skills "))),o.isAgent?I__namespace.log.info(xt(o.agent.name)+" Agent detected \u2014 installing non-interactively"):!process.stdin.isTTY&&!t.yes&&n();let r=null;try{let g=I__namespace.spinner();g.start("Parsing source...");let d=chunkJFEBB5CL_cjs.e(s);g.stop(`Source: ${d.type==="local"?d.localPath:d.url}${d.ref?` #${L__default.default.yellow(d.ref)}`:""}${d.subpath?` @${L__default.default.cyan(d.subpath)}`:""}`);let u=chunkJFEBB5CL_cjs.a(d),k=(()=>{if(!u)return Promise.resolve(null);let h=chunkJFEBB5CL_cjs.b(u);return h?chunkJFEBB5CL_cjs.c(h.owner,h.repo).catch(()=>null):Promise.resolve(null)})(),$=Array.isArray(t?.skill)&&t.skill.length>0||t.fullDepth===!0||!!d.subpath;g.start("Loading source...");let b;try{b=await chunkJFEBB5CL_cjs.ea(d,{includeInternal:$,fullDepth:t.fullDepth});}catch(h){throw h instanceof chunkJFEBB5CL_cjs.S&&(g.stop(L__default.default.red("Path not found")),I__namespace.outro(L__default.default.red(`Local path does not exist: ${h.localPath}`)),process.exit(1)),h}r=b.storeDir,g.stop(b.cacheHit?"Repository loaded from cache":b.source==="blob-fetch"?"Fetched via GitHub API":b.source==="well-known-fetch"?"Well-known index fetched":b.source==="local-cp"?"Local path cached":"Repository cloned");let A=b.skills,p=d.subpath?A.filter(h=>h.path.includes(`/${d.subpath}/`)||h.path.endsWith(`/${d.subpath}`)):A;if(g.start("Discovering skills..."),p.length===0&&b.cloneError){g.stop(L__default.default.red("Failed to clone repository"));for(let h of b.cloneError.message.split(`
6
- `))I__namespace.log.message(L__default.default.dim(h));await pe(r),process.exit(1);}if(p.length===0&&(g.stop(L__default.default.red("No skills found")),I__namespace.outro(L__default.default.red("No valid skills found. Skills require a SKILL.md with name and description.")),await pe(r),process.exit(1)),g.stop(`Found ${L__default.default.green(p.length)} skill${p.length>1?"s":""}`),t.list){console.log(),I__namespace.log.step(L__default.default.bold("Available Skills"));let h={},j=[];for(let _ of p)if(_.pluginName){let E=_.pluginName;h[E]||(h[E]=[]),h[E].push(_);}else j.push(_);let N=Object.keys(h).sort();for(let _ of N){let E=_.split("-").map(H=>H.charAt(0).toUpperCase()+H.slice(1)).join(" ");console.log(L__default.default.bold(E));for(let H of h[_])I__namespace.log.message(` ${L__default.default.cyan(chunkJFEBB5CL_cjs.C(H))}`),I__namespace.log.message(` ${L__default.default.dim(H.description)}`);console.log();}if(j.length>0){N.length>0&&console.log(L__default.default.bold("General"));for(let _ of j)I__namespace.log.message(` ${L__default.default.cyan(chunkJFEBB5CL_cjs.C(_))}`),I__namespace.log.message(` ${L__default.default.dim(_.description)}`);}console.log(),I__namespace.outro("Use --skill <name> to install specific skills"),await pe(r),process.exit(0);}let a;if(t.skill&&t.skill.length>0){let h=p.map(N=>chunkJFEBB5CL_cjs.C(N)),j=chunkJFEBB5CL_cjs.F(t.skill,h);if(j.wildcard)a=p,I__namespace.log.info(`Installing all ${p.length} skills`);else if(j.invalid.length>0){I__namespace.log.error(`No matching skills found for: ${j.invalid.join(", ")}`),I__namespace.log.info("Available skills:");for(let N of p)I__namespace.log.message(` - ${chunkJFEBB5CL_cjs.C(N)}`);await pe(r),process.exit(1);}else a=chunkJFEBB5CL_cjs.D(p,j.matched),a.length===0&&(I__namespace.log.error(`No matching skills found for: ${j.matched.join(", ")}`),await pe(r),process.exit(1)),I__namespace.log.info(`Selected ${a.length} skill${a.length!==1?"s":""}: ${a.map(N=>L__default.default.cyan(chunkJFEBB5CL_cjs.C(N))).join(", ")}`);}else if(p.length===1){a=p;let h=p[0];I__namespace.log.info(`Skill: ${L__default.default.cyan(chunkJFEBB5CL_cjs.C(h))}`),I__namespace.log.message(L__default.default.dim(h.description));}else if(t.yes)a=p,I__namespace.log.info(`Installing all ${p.length} skills`);else {let h=[...p].sort((_,E)=>_.pluginName&&!E.pluginName?-1:!_.pluginName&&E.pluginName?1:_.pluginName&&E.pluginName&&_.pluginName!==E.pluginName?_.pluginName.localeCompare(E.pluginName):chunkJFEBB5CL_cjs.C(_).localeCompare(chunkJFEBB5CL_cjs.C(E))),j=h.some(_=>_.pluginName),N;if(j){let _=H=>H.split("-").map(q=>q.charAt(0).toUpperCase()+q.slice(1)).join(" "),E={};for(let H of h){let q=H.pluginName?_(H.pluginName):"Other";E[q]||(E[q]=[]),E[q].push({value:H,label:chunkJFEBB5CL_cjs.C(H),hint:H.description.length>60?H.description.slice(0,57)+"...":H.description});}N=await I__namespace.groupMultiselect({message:`Select skills to install ${L__default.default.dim("(space to toggle)")}`,options:E,required:!0});}else {let _=h.map(E=>({value:E,label:chunkJFEBB5CL_cjs.C(E),hint:E.description.length>60?E.description.slice(0,57)+"...":E.description}));N=await Hn({message:"Select skills to install",options:_,required:!0});}I__namespace.isCancel(N)&&(I__namespace.cancel("Installation cancelled"),await pe(r),process.exit(0)),a=N;}let f=chunkJFEBB5CL_cjs.a(d),S=f?chunkS6YNGR7S_cjs.c(f,a.map(h=>chunkJFEBB5CL_cjs.C(h))):Promise.resolve(null),v,P=Object.keys(chunkTCFGU43L_cjs.e),m=t.global??!1,w=t.global!==void 0;if(t.agent===void 0&&!w&&!t.yes&&process.stdin.isTTY&&Object.values(chunkTCFGU43L_cjs.e).some(j=>j.globalSkillsDir!==void 0)){g.start("Asking for installation scope...");let j=await I__namespace.select({message:"Installation scope",options:[{value:!1,label:"Project",hint:"Install in current directory (committed with your project)"},{value:!0,label:"Global",hint:"Install in home directory (available across all projects)"}]});I__namespace.isCancel(j)&&(g.stop("Cancelled"),I__namespace.cancel("Installation cancelled"),await pe(r),process.exit(0)),m=j,g.stop(`${m?"Global":"Project"} scope selected`);}let x=w?t.global===!0?"global":"project":m?"global":"project",C=[];if(t.agent&&t.agent.length>0){let h=chunkTCFGU43L_cjs.s(t.agent);h.length>0&&(I__namespace.log.error(`Invalid agents: ${h.join(", ")}`),I__namespace.log.info(`Valid agents: ${P.join(", ")}`),await pe(r),process.exit(1)),v=chunkTCFGU43L_cjs.t(t.agent),t.agent.includes("*")&&I__namespace.log.info(`Installing to all ${v.length} agents`);}else {g.start("Loading agents...");let h=await chunkTCFGU43L_cjs.f(),j=Object.keys(chunkTCFGU43L_cjs.e).length;if(g.stop(`${j} agents`),h.includes("eve")&&(t.yes||!o.isAgent)){let N=t.yes?!0:await I__namespace.confirm({message:Mn(a),initialValue:!0});if(I__namespace.isCancel(N)&&(I__namespace.cancel("Installation cancelled"),await pe(r),process.exit(0)),N)v=["eve"],I__namespace.log.info(`Installing to: ${L__default.default.cyan(as)}`);else {let _=await rs({global:x==="global"});typeof _=="symbol"&&(I__namespace.cancel("Installation cancelled"),await pe(r),process.exit(0)),C=_.locked,v=[..._.locked,..._.selected];}}else if(h.length===0)if(t.yes)v=P,I__namespace.log.info("Installing to all agents");else {I__namespace.log.info("Select agents to install skills to");let N=Object.entries(chunkTCFGU43L_cjs.e).filter(([E])=>E!=="eve").map(([E,H])=>({value:E,label:H.displayName})),_=await zn("Which agents do you want to install to?",N);I__namespace.isCancel(_)&&(I__namespace.cancel("Installation cancelled"),await pe(r),process.exit(0)),v=_;}else if(h.length===1||t.yes)if(v=is(h,x),h.length===1){let N=h[0];I__namespace.log.info(`Installing to: ${L__default.default.cyan(chunkTCFGU43L_cjs.e[N].displayName)}`);}else I__namespace.log.info(`Installing to: ${h.map(N=>L__default.default.cyan(chunkTCFGU43L_cjs.e[N].displayName)).join(", ")}`);else {let N=await rs({global:x==="global"});typeof N=="symbol"&&(I__namespace.cancel("Installation cancelled"),await pe(r),process.exit(0)),C=N.locked,v=[...N.locked,...N.selected];}}t.subagent&&t.subagent.length>0&&!v.includes("eve")&&(v=[...v,"eve"]);let B=[void 0];if(v.includes("eve")){let h=chunkTCFGU43L_cjs.i(process.cwd());if(t.subagent&&t.subagent.length>0)B=t.subagent.map(j=>j==="root"||j==="."?void 0:j);else if(h.length>0&&!t.yes){let j=[{value:"",label:"Root agent",hint:"agent/skills"},...h.map(_=>({value:_,label:_,hint:`agent/subagents/${_}/skills`}))],N=await I__namespace.multiselect({message:"Where should Eve skills be installed?",options:j,initialValues:[""],required:!0});I__namespace.isCancel(N)&&(I__namespace.cancel("Installation cancelled"),await pe(r),process.exit(0)),B=N.map(_=>_===""?void 0:_);}}let U=Bn(v,B),R=t.copy?"copy":"symlink";if(U.every(h=>h.agent==="eve"))R="copy";else if(t.copy||t.yes)R="copy";else {let h=await I__namespace.select({message:"Installation method",options:[{value:"symlink",label:"Share (Recommended)",hint:"Single source: 1 copy in .agents/skills + symlinks for non-universal agents"},{value:"copy",label:"Independent",hint:"Physical copy in each agent dir; updates must be re-run per agent"}]});I__namespace.isCancel(h)&&(I__namespace.cancel("Installation cancelled"),await pe(r),process.exit(0)),R=h;}let W=process.cwd(),O=[],J=m?null:await chunkJFEBB5CL_cjs.t(W),le=await Promise.all(a.flatMap(h=>U.map(async j=>{let N=await chunkOWG6N2K6_cjs.l(h.name,j.agent,{global:m,eveSubagent:j.subagent}),_=N.installed,E;try{E=await chunkJFEBB5CL_cjs.v(h.path);}catch{E=void 0;}let q=J?.skills[h.name]?.computedHash,Q=!Lt(!1,q,E),ne=_&&N.mode==="copy"&&R==="copy"&&Q,oe=!!_;return {skillName:h.name,target:j,installed:_,installedMode:N.mode,sourceHash:E,upToDate:!!ne,overwrite:oe}}))),X=new Map,ie=new Map;for(let{skillName:h,target:j,overwrite:N,upToDate:_}of le)X.has(h)||(X.set(h,new Map),ie.set(h,new Map)),X.get(h).set(jt(j),N),ie.get(h).set(jt(j),_);let re={},we=[];for(let h of a)if(h.pluginName){let j=h.pluginName;re[j]||(re[j]=[]),re[j].push(h);}else we.push(h);let et=h=>{for(let j of h){O.length>0&&O.push("");let N=U[0];U.length>1&&(N=U.find(ne=>chunkTCFGU43L_cjs.r(ne.agent,m?"global":"project"))??U[0]);let _=chunkOWG6N2K6_cjs.o(j.name,{global:m,agent:N.agent,eveSubagent:N.subagent}),E=ol(_,W);O.push(`${L__default.default.cyan(E)}`),O.push(...Gn(U,R,m,C));let H=X.get(j.name),q=U.filter(Q=>!chunkTCFGU43L_cjs.r(Q.agent,m?"global":"project")&&H?.get(jt(Q))).map(ot);q.length>0&&O.push(` ${L__default.default.yellow("overwrites:")} ${ke(q)}`);}},at=Object.keys(re).sort();for(let h of at){let j=h.split("-").map(N=>N.charAt(0).toUpperCase()+N.slice(1)).join(" ");O.push(""),O.push(L__default.default.bold(j)),et(re[h]);}we.length>0&&(at.length>0&&(O.push(""),O.push(L__default.default.bold("General"))),et(we)),console.log(),I__namespace.note(O.join(`
7
- `),"Installation Summary");try{let h=await Promise.race([S,new Promise(j=>setTimeout(()=>j(null),En))]);if(h&&f){let j=Un(h,a.map(N=>({slug:chunkJFEBB5CL_cjs.C(N),displayName:chunkJFEBB5CL_cjs.C(N)})),f);j.length>0&&I__namespace.note(j.join(`
8
- `),"Security Risk Assessments");}}catch{}if(!t.yes){let h=await I__namespace.confirm({message:"Proceed with installation?"});(I__namespace.isCancel(h)||!h)&&(I__namespace.cancel("Installation cancelled"),await pe(r),process.exit(0));}g.start("Installing skills...");let tt=[],Et=await Promise.all(a.map(async h=>{let j=new Map;for(let _ of U){let E=chunkOWG6N2K6_cjs.g(_.agent,m,W,_.subagent),H=(_.agent==="eve"||_.agent==="easbot")&&R==="symlink",q=R==="copy"||H?E:chunkOWG6N2K6_cjs.e(m,W),Q=chunkOWG6N2K6_cjs.d(h.name||path.basename(h.path)),ne=path.join(q,Q),oe=path.join(E,Q),K=ne,Z=j.get(K);Z||(Z={canonicalDir:ne,members:[]},j.set(K,Z)),Z.members.push({target:_,agentDir:oe});}return (await Promise.all([...j.values()].map(async _=>{let[E,...H]=_.members;if(!E)return [];if(ie.get(h.name)?.get(jt(E.target))??!1)return _.members.map(({target:oe,agentDir:K})=>({skill:chunkJFEBB5CL_cjs.C(h),agent:ot(oe),pluginName:h.pluginName,success:!0,path:K,canonicalPath:K,mode:R,skipped:!0,skippedReason:"up-to-date"}));let Q=await On(h,E.target,E.agentDir,{installMode:R,installGlobally:m,cwd:W,tempDir:r}),ne=await Promise.all(H.map(async({target:oe,agentDir:K})=>{let Z=R==="copy"?await chunkOWG6N2K6_cjs.j(_.canonicalDir,K,{agentType:oe.agent}):await chunkOWG6N2K6_cjs.i(_.canonicalDir,K,{isGlobal:m,agentType:oe.agent,cwd:W,storePath:h.path});return {skill:chunkJFEBB5CL_cjs.C(h),agent:ot(oe),pluginName:h.pluginName,...Z}}));return [Q,...ne]}))).flat()}));for(let h of Et)tt.push(...h);g.stop("Installation complete"),console.log();let xe=tt.filter(h=>h.success),Dt=tt.filter(h=>!h.success),Ie={};for(let h of a)if("repoPath"in h)Ie[h.name]=h.repoPath;else if(r&&h.path===r)Ie[h.name]="SKILL.md";else if(r&&h.path.startsWith(r+path.sep))Ie[h.name]=`${h.path.slice(r.length+1).split(path.sep).join("/")}/SKILL.md`;else if(r&&h.path.startsWith(r)){let j=r.split(path.sep).join("/"),N=h.path.split(path.sep).join("/");N.startsWith(`${j}/`)&&(Ie[h.name]=`${N.slice(j.length+1)}/SKILL.md`);}let Me=chunkJFEBB5CL_cjs.a(d),hl=Nn(d.url,Me);if(Me&&(chunkJFEBB5CL_cjs.b(Me)?k.then(j=>{j===!1&&chunkS6YNGR7S_cjs.d({event:"install",source:Me,skills:a.map(N=>N.name).join(","),agents:v.join(","),...m&&{global:"1"},skillFiles:JSON.stringify(Ie)});}):chunkS6YNGR7S_cjs.d({event:"install",source:Me,skills:a.map(j=>j.name).join(","),agents:v.join(","),...m&&{global:"1"},skillFiles:JSON.stringify(Ie)})),xe.length>0&&m){let h=new Set(xe.map(j=>j.skill));for(let j of a){if(!h.has(chunkJFEBB5CL_cjs.C(j)))continue;let{derivePluginSlug:N,findSkillByLocation:_,readStoreIndex:E}=await import('./store-EHYH46YY.cjs'),H=chunkJFEBB5CL_cjs.M(d),q;{let Z=(await E()).markets[H],ue=Z?.plugins&&Object.keys(Z.plugins).find(ye=>Z.plugins[ye]?.skills[j.name]);ue?q=ue.slice(H.length+1):q=N(d,void 0,j.pluginName);}let Q,ne;{let K=await _(H,`${H}:${q}`,j.name);Q=K?.entry.computedHash,ne=K?.entry.skillPath;}if(ne===void 0){let K=d.type==="local"?d.localPath??d.url:d.url;if(j.path.startsWith(K))ne=utils.Filesystem.relative(K,j.path).replace(/^\/+/,"");else {let Z=Ie[j.name];Z&&(ne=utils.Filesystem.toUnixPath(utils.Filesystem.dirname(Z)));}}Q===void 0&&(Q=await chunkJFEBB5CL_cjs.v(j.path));let oe=`${H}:${q}`;await chunkRWSBKHQ2_cjs.i(j.name,{source:hl||Me||d.url,sourceType:d.type,ref:d.ref,...ne&&{skillPath:ne},computedHash:Q,marketId:H,pluginId:oe});}}if(xe.length>0&&!m){let h=new Set(xe.map(_=>_.skill)),j=v.includes("eve")?B.map(_=>_??""):void 0,N=j&&(j.length>1||j.some(_=>_!==""));for(let _ of a)if(h.has(chunkJFEBB5CL_cjs.C(_)))try{let{derivePluginSlug:E,findSkillByLocation:H,readStoreIndex:q}=await import('./store-EHYH46YY.cjs'),Q=chunkJFEBB5CL_cjs.M(d),ne=a.find(ye=>chunkJFEBB5CL_cjs.C(ye)===_.name),oe;{let Ae=(await q()).markets[Q],fe=Ae?.plugins&&Object.keys(Ae.plugins).find(Le=>Ae.plugins[Le]?.skills[_.name]);fe?oe=fe.slice(Q.length+1):oe=E(d,void 0,ne?.pluginName);}let K,Z;{let ye=await H(Q,`${Q}:${oe}`,_.name);K=ye?.entry.computedHash,Z=ye?.entry.skillPath??Ie[_.name];}K===void 0&&(K=await chunkJFEBB5CL_cjs.v(_.path));let ue=`${Q}:${oe}`;await chunkJFEBB5CL_cjs.w(_.name,{source:hl||d.url,ref:d.ref,sourceType:d.type,...Z&&{skillPath:Z},computedHash:K,marketId:Q,pluginId:ue,...N&&{subagents:j}},W);}catch{}}if(xe.length>0){let h=new Map,j={},N=[];for(let K of xe){let Z=h.get(K.skill)||[];if(Z.push(K),h.set(K.skill,Z),Z.length===1)if(K.pluginName){let ue=K.pluginName;j[ue]||(j[ue]=[]),j[ue].push(K);}else N.push(K);}let _=h.size,E=xe.filter(K=>K.mode==="symlink"&&K.symlinkFailed),H=E.map(K=>K.agent),q=[],Q=K=>{for(let Z of K){let ue=h.get(Z.skill)||[],ye=ue[0];if(q.push(`${L__default.default.green("\u2713")} ${Z.skill}`),ye.canonicalPath){let fe=ol(ye.canonicalPath,W);q.push(` ${L__default.default.dim("source:")} ${fe}`);}let Ae=new Map;for(let fe of ue){if(fe.symlinkFailed||fe.skipped||ye.canonicalPath&&fe.path===ye.canonicalPath)continue;let Le=fe.path;Ae.has(Le)?Ae.get(Le)!=="symlink"&&fe.mode==="symlink"&&Ae.set(Le,"symlink"):Ae.set(Le,fe.mode);}for(let[fe,Le]of Ae){let Ys=ol(fe,W),Js=Le==="symlink"?L__default.default.cyan("(link)"):L__default.default.dim("(copied)");q.push(` ${L__default.default.dim("target:")} ${Ys} ${Js}`);}q.push(...Wn(ue,v,m));}},ne=Object.keys(j).sort();for(let K of ne){let Z=K.split("-").map(ue=>ue.charAt(0).toUpperCase()+ue.slice(1)).join(" ");q.push(""),q.push(L__default.default.bold(Z)),Q(j[K]);}N.length>0&&(ne.length>0&&(q.push(""),q.push(L__default.default.bold("General"))),Q(N));let oe=L__default.default.green(`Installed ${_} skill${_!==1?"s":""}`);I__namespace.note(q.join(`
9
- `),oe),E.length>0&&(I__namespace.log.warn(L__default.default.yellow(`Symlinks failed for: ${ke(H)}`)),I__namespace.log.message(L__default.default.dim(" Files were copied instead. On Windows, enable Developer Mode for symlink support.")));}if(Dt.length>0){console.log(),I__namespace.log.error(L__default.default.red(`Failed to install ${Dt.length}`));for(let h of Dt)I__namespace.log.message(` ${L__default.default.red("\u2717")} ${h.skill} \u2192 ${h.agent}: ${L__default.default.dim(h.error)}`);}console.log(),I__namespace.outro(L__default.default.green("Done!")+L__default.default.dim(" Review skills before use; they run with full agent permissions.")),await Yn(t,v);}catch(g){if(g instanceof chunkJFEBB5CL_cjs.g){I__namespace.log.error(L__default.default.red("Failed to clone repository"));for(let d of g.message.split(`
10
- `))I__namespace.log.message(L__default.default.dim(d));}else I__namespace.log.error(g instanceof Error?g.message:"Unknown error occurred");process.stdin.isTTY||n(),I__namespace.outro(L__default.default.red("Installation failed")),process.exit(1);}finally{await pe(r);}}async function pe(e){if(e){if(chunkJFEBB5CL_cjs.ha(e))return;try{await chunkJFEBB5CL_cjs.l(e);}catch{}}}async function Yn(e,t){if(process.stdin.isTTY&&!e?.yes)try{if(await chunkRWSBKHQ2_cjs.n("findSkillsPrompt"))return;if(await chunkOWG6N2K6_cjs.k("eas-skill-find","claude-code",{global:!0})){await chunkRWSBKHQ2_cjs.p("findSkillsPrompt");return}console.log(),I__namespace.log.message(L__default.default.dim("One-time prompt - you won't be asked again if you dismiss."));let n=await I__namespace.confirm({message:`Install the ${L__default.default.cyan("eas-skill-find")} skill? It helps your agent discover and suggest skills.`});if(I__namespace.isCancel(n)){await chunkRWSBKHQ2_cjs.p("findSkillsPrompt");return}if(n){await chunkRWSBKHQ2_cjs.p("findSkillsPrompt");let o=t?.filter(r=>r!=="replit");if(!o||o.length===0)return;console.log(),I__namespace.log.step("Installing eas-skill-find skill...");try{await it(["houjallen/agent-skills@skills/builtin/eas-skill-find"],{global:!0,yes:!0,agent:o});let r=path.join(chunkOWG6N2K6_cjs.e(!0),"eas-skill-find"),g=await el({skillId:"eas-skill-find",sourceDir:r,targetAgents:o,installGlobally:!0,defaultMode:"symlink",assumeYes:e?.yes===!0});g.reported.length>0&&I__namespace.log.warn(`${g.reported.length} cell(s) reported divergent/orphan (not auto-fixed). Run 'easbot skills repair' to fix.`);}catch{I__namespace.log.warn("Failed to install eas-skill-find. You can try again with:"),I__namespace.log.message(L__default.default.dim(" easbot skills add houjallen/agent-skills@skills/builtin/eas-skill-find -g -y --all"));}}else await chunkRWSBKHQ2_cjs.p("findSkillsPrompt"),I__namespace.log.message(L__default.default.dim("You can install it later with: easbot skills add houjallen/agent-skills@skills/builtin/eas-skill-find"));}catch{}}function _t(e){let t={},s=[];for(let l=0;l<e.length;l++){let n=e[l];if(n==="-g"||n==="--global")t.global=true;else if(n==="-y"||n==="--yes")t.yes=true;else if(n==="-l"||n==="--list")t.list=true;else if(n==="--all")t.all=true;else if(n==="-a"||n==="--agent"){t.agent=t.agent||[],l++;let o=e[l];for(;l<e.length&&o&&!o.startsWith("-");)t.agent.push(o),l++,o=e[l];l--;}else if(n==="-s"||n==="--skill"){t.skill=t.skill||[],l++;let o=e[l];for(;l<e.length&&o&&!o.startsWith("-");)t.skill.push(o),l++,o=e[l];l--;}else if(n==="--full-depth")t.fullDepth=true;else if(n==="--copy")t.copy=true;else if(n==="--subagent"){t.subagent=t.subagent||[],l++;let o=e[l];for(;l<e.length&&o&&!o.startsWith("-");)t.subagent.push(o),l++,o=e[l];l--;}else n&&!n.startsWith("-")&&s.push(n);}return {source:s,options:t}}var ps={languages:[{value:"zh-CN",name:"\u7B80\u4F53\u4E2D\u6587",example:"\u4F60\u597D\uFF0CEASBOT\uFF01",supported:true},{value:"en-US",name:"English (United States)",example:"Hello, EASBOT!",supported:true}]};var Vn=ps.languages,Xn=Vn.filter(e=>e.supported).map(e=>e.value),Ue={defaultLocale:"zh-CN",locales:Xn},rt={},Pt=(e,t)=>{let s=rt[e]||{translation:{}};return rt[e]={translation:{...s.translation,...t.translation}},rt[e]},Ct=(e=Ue.defaultLocale)=>(rt[e]||Pt(e,{translation:{}}),{locale:e,resources:rt[e]||{translation:{}}});var Zn={translation:{"cli.banner.tagline":"easbot-skills \u2014 Agent \u6280\u80FD\u751F\u6001","cli.banner.try_hint":"\u8BD5\u8BD5:","cli.banner.discover":"\u5728 {{url}} \u53D1\u73B0\u66F4\u591A\u6280\u80FD","cli.banner.cmd.add":"{{cmd}} add {{dim}}<package>{{reset}} \u6DFB\u52A0\u65B0\u6280\u80FD","cli.banner.cmd.use":"{{cmd}} use {{dim}}<package>@<skill>{{reset}} \u4E0D\u5B89\u88C5\u76F4\u63A5\u4F7F\u7528\u4E00\u4E2A\u6280\u80FD","cli.banner.cmd.remove":"{{cmd}} remove \u79FB\u9664\u5DF2\u5B89\u88C5\u6280\u80FD","cli.banner.cmd.list":"{{cmd}} list \u5217\u51FA\u5DF2\u5B89\u88C5\u6280\u80FD","cli.banner.cmd.find":"{{cmd}} find {{dim}}[query]{{reset}} \u641C\u7D22\u6280\u80FD","cli.banner.cmd.update":"{{cmd}} update \u66F4\u65B0\u5DF2\u5B89\u88C5\u6280\u80FD","cli.banner.cmd.init":"{{cmd}} init {{dim}}[name]{{reset}} \u521B\u5EFA\u4E00\u4E2A\u65B0\u6280\u80FD","cli.banner.cmd.sync":"{{cmd}} experimental_sync \u4ECE node_modules \u540C\u6B65\u6280\u80FD","cli.help.usage":"\u7528\u6CD5: skills <command> [options]","cli.help.section.manage":"\u6280\u80FD\u7BA1\u7406","cli.help.section.find_options":"Find \u9009\u9879","cli.help.section.updates":"\u66F4\u65B0","cli.help.section.update_options":"Update \u9009\u9879","cli.help.section.project":"\u9879\u76EE","cli.help.section.add_options":"Add \u9009\u9879","cli.help.section.use_options":"Use \u9009\u9879","cli.help.section.remove_options":"Remove \u9009\u9879","cli.help.section.sync_options":"\uFF08\u5DF2\u5E9F\u5F03\uFF09Sync \u9009\u9879","cli.help.section.list_options":"List \u9009\u9879","cli.help.section.options":"\u901A\u7528\u9009\u9879","cli.help.store.desc":"\u8FD0\u7EF4\u5B50\u547D\u4EE4\u65CF\uFF08\u4EE5 store \u4E3A\u4E2D\u5FC3\u7BA1\u7406 store / cache\uFF09","cli.help.store.usage_title":"\u7528\u6CD5","cli.help.store.concepts_title":"\u6838\u5FC3\u6982\u5FF5","cli.help.store.local_protection_title":"local \u6E90\u4FDD\u62A4\uFF08\u786C\u89C4\u5219\uFF0C\u4E0D\u53EF\u7ED5\u8FC7\uFF09","cli.help.store.options_title":"\u9009\u9879","cli.help.store.examples_title":"\u793A\u4F8B","cli.help.store.list_desc":"\u5217\u51FA store skills\uFF08\u53EF\u9009 skill name \u8FC7\u6EE4\uFF09","cli.help.store.clean_desc":"\u91CD\u7F6E store\uFF1A\u5220 store \u7269\u7406 + \u6E05 index.ts\uFF08cache \u4FDD\u7559\uFF09","cli.help.store.clean_force_desc":"\u540C\u4E0A + \u6E05 cache \u7269\u7406\uFF08local \u6E90 cache \u4FDD\u62A4\uFF09","cli.help.store.update_desc":"\u4ECE\u539F\u59CB\u6E90\u91CD\u65B0\u62C9\u53D6 store\uFF08\u4E0D\u52A8 agent \u524D\u7AEF\uFF09","cli.help.store.remove_desc":"\u79FB\u9664 store source\uFF1A\u5220 store \u7269\u7406 + index entries","cli.help.store.remove_force_desc":"\u989D\u5916\u6E05 cache \u7269\u7406\uFF08remote \u6E90\uFF1Blocal \u6E90\u5FFD\u7565\uFF09","cli.help.store.help_desc":"\u672C\u5E2E\u52A9","cli.help.store.concept_store":"\u5F52\u4E00\u5316\u6E90\u76EE\u5F55\uFF08add \u5199\u4E00\u6B21\uFF0Cadd \u590D\u7528\uFF09","cli.help.store.concept_cache":"\u4E0B\u8F7D/\u7269\u5316\u7F13\u5B58\uFF08remote \u6E90\u624D\u6709\uFF1Blocal \u6E90 = \u7528\u6237\u539F\u76EE\u5F55\uFF09","cli.help.store.concept_index":"store defs \u7D22\u5F15\uFF08key = skillName\uFF09","cli.help.store.local_clean":"`store clean --force` \u5BF9 local \u6E90\u8DF3\u8FC7 cache\uFF08\u7528\u6237\u539F\u76EE\u5F55\u7EDD\u4E0D\u5220\uFF09","cli.help.store.local_remove_force":"`store remove --force` \u5BF9 local \u6E90\u7B49\u540C\u9ED8\u8BA4\uFF08cache \u8DF3\u8FC7\uFF09","cli.help.store.local_remove":"`store remove` \u5BF9 local \u6E90\u53EA\u5220 store + index\uFF0C\u7EDD\u4E0D\u5220\u7528\u6237\u539F\u76EE\u5F55","cli.help.store.opt_yes":"\u8DF3\u8FC7\u786E\u8BA4\u63D0\u793A","cli.help.store.opt_force":"`clean` / `remove`\uFF1A\u989D\u5916\u6E05 cache \u7269\u7406\uFF08local \u6E90\u5FFD\u7565\uFF09","cli.help.store.opt_json":"\u8F93\u51FA JSON \u683C\u5F0F\uFF08\u673A\u5668\u53EF\u8BFB\uFF09","cli.store.unknown_subcommand":"\u672A\u77E5 store \u5B50\u547D\u4EE4: {{sub}}","cli.help.add.flag.global":"\u5B89\u88C5\u5230\u5168\u5C40\uFF08\u7528\u6237\u76EE\u5F55\uFF09\uFF0C\u800C\u975E\u9879\u76EE\u7EA7\uFF08\u9ED8\u8BA4\u9879\u76EE\u7EA7\uFF09","cli.help.add.flag.agent":"\u6307\u5B9A Agent\uFF08\u7A7A\u683C\u5206\u9694\u591A\u4E2A\u503C\uFF1B\u7528 * \u8868\u793A\u5168\u90E8\uFF09","cli.help.add.flag.skill":"\u6307\u5B9A\u6280\u80FD\u540D\uFF08\u7A7A\u683C\u5206\u9694\u591A\u4E2A\u503C\uFF1B\u7528 * \u8868\u793A\u5168\u90E8\uFF09","cli.help.add.flag.list":"\u53EA\u5217\u51FA\u4ED3\u5E93\u4E2D\u7684\u6280\u80FD\uFF0C\u4E0D\u5B89\u88C5","cli.help.add.flag.yes":"\u8DF3\u8FC7\u6240\u6709\u786E\u8BA4\u63D0\u793A","cli.help.add.flag.copy":"\u62F7\u8D1D\u6587\u4EF6\u5230 Agent \u76EE\u5F55\uFF08\u9ED8\u8BA4\u4F7F\u7528\u7B26\u53F7\u94FE\u63A5\uFF09","cli.help.add.flag.subagent":"\u5B89\u88C5\u5230 Eve subagent\uFF08\u7528 root \u8868\u793A\u6839 agent\uFF09","cli.help.add.flag.all":"\u7B49\u540C\u4E8E --skill * --agent * -y","cli.help.add.flag.full_depth":"\u904D\u5386\u6240\u6709\u5B50\u76EE\u5F55\uFF0C\u5373\u4F7F\u5B58\u5728\u6839 SKILL.md","cli.help.use.flag.skill":"\u6307\u5B9A\u8981\u4F7F\u7528\u7684\u6280\u80FD\u540D\uFF08\u4EC5\u5355\u503C\uFF09","cli.help.use.flag.agent":"\u6307\u5B9A\u4EA4\u4E92\u542F\u52A8\u7684 Agent\uFF08\u4EC5\u652F\u6301 claude-code / codex\uFF09","cli.help.use.flag.full_depth":"\u904D\u5386\u6240\u6709\u5B50\u76EE\u5F55","cli.help.use.flag.openclaw_risks":"\u5141\u8BB8\u672A\u5BA1\u6838\u7684 OpenClaw \u793E\u533A\u6280\u80FD","cli.help.remove.flag.global":"\u4ECE\u5168\u5C40\uFF08~\uFF09\u79FB\u9664\uFF0C\u800C\u975E\u9879\u76EE\u7EA7\uFF08\u9ED8\u8BA4\u9879\u76EE\u7EA7\uFF09","cli.help.remove.flag.agent":"\u6307\u5B9A Agent\uFF08\u7A7A\u683C\u5206\u9694\u591A\u4E2A\u503C\uFF1B\u7528 * \u8868\u793A\u5168\u90E8\uFF09","cli.help.remove.flag.skill":"\u6307\u5B9A\u6280\u80FD\u540D\uFF08\u7A7A\u683C\u5206\u9694\u591A\u4E2A\u503C\uFF1B\u7528 * \u8868\u793A\u5168\u90E8\uFF09","cli.help.remove.flag.yes":"\u8DF3\u8FC7\u6240\u6709\u786E\u8BA4\u63D0\u793A","cli.help.remove.flag.all":"\u7B49\u540C\u4E8E --skill * --agent * -y","cli.help.list.flag.global":"\u5217\u51FA\u5168\u5C40\u6280\u80FD\uFF08\u9ED8\u8BA4 both \u5168\u5C40 + \u9879\u76EE\uFF09","cli.help.list.flag.project":"\u53EA\u5217\u9879\u76EE\u7EA7\u6280\u80FD\uFF08\u4E0E -g \u4E92\u65A5\uFF1B\u4E24\u8005\u540C\u4F20 = both\uFF09","cli.help.list.flag.agent":"\u6307\u5B9A Agent\uFF08\u53EF\u591A\u6B21\u4F20 / \u7A7A\u683C\u5206\u9694\uFF1B\u7528 * \u8868\u793A\u5168\u90E8\uFF09","cli.help.list.flag.json":"\u4EE5 JSON \u8F93\u51FA\uFF08\u65E0 ANSI\uFF09","cli.help.list.flag.all":"\u7B49\u540C\u4E8E --agent *","cli.help.doctor.flag.global":"\u53EA\u68C0\u67E5\u5168\u5C40\uFF08\u4E0E -p \u4E92\u65A5\uFF1B\u9ED8\u8BA4 both\uFF09","cli.help.doctor.flag.project":"\u53EA\u68C0\u67E5\u9879\u76EE\u7EA7\uFF08\u4E0E -g \u4E92\u65A5\uFF1B\u9ED8\u8BA4 both\uFF09","cli.help.doctor.flag.agent":"\u6307\u5B9A Agent\uFF08\u7A7A\u683C\u5206\u9694\uFF1B\u7528 * \u8868\u793A\u5168\u90E8\uFF09","cli.help.doctor.flag.yes":"\u8DF3\u8FC7\u786E\u8BA4\u76F4\u63A5\u6E05\u7406\u5931\u6548 link\uFF08\u9ED8\u8BA4\u9700 TTY \u786E\u8BA4\uFF09","cli.help.doctor.flag.all":"\u7B49\u540C\u4E8E --agent *","cli.help.doctor.usage":"\u7528\u6CD5: easbot-skills doctor [options]","cli.help.doctor.description":"\u4F53\u68C0 + \u6E05\u7406 agent baseDir \u4E0B\u7684\u5931\u6548 symlink\uFF08\u9ED8\u8BA4\u53EA\u626B\u63CF\uFF1B\u7528 --yes \u76F4\u63A5\u6E05\u7406\uFF09\u3002\u540E\u7EED\u4F1A\u6269\u5C55 skill \u9A8C\u8BC1\u3001LLM \u8BC4\u5BA1\u7B49\u529F\u80FD\u3002","cli.commands.doctor":"\u4F53\u68C0\uFF1A\u626B\u63CF\u5931\u6548 link / \u540E\u7EED\u6269\u5C55\u9A8C\u8BC1","cli.example.doctor":"\u4EA4\u4E92\u5F0F\u4F53\u68C0 + \u6E05\u7406\u5931\u6548 link","cli.example.doctor_agent_yes":"\u68C0\u67E5\u5355\u4E2A agent + \u76F4\u63A5\u6E05\u7406","cli.example.doctor_global":"\u53EA\u68C0\u67E5\u5168\u5C40\u4F5C\u7528\u57DF","cli.help.find.flag.owner":"\u53EA\u5728\u6307\u5B9A GitHub owner \u4E0B\u641C\u7D22","cli.help.update.flag.global":"\u53EA\u66F4\u65B0\u5168\u5C40\u6280\u80FD\uFF08\u4E0E -p \u4E92\u65A5\uFF1B\u9ED8\u8BA4 -y \u8D70 both\uFF09","cli.help.update.flag.project":"\u53EA\u66F4\u65B0\u9879\u76EE\u7EA7\u6280\u80FD\uFF08\u4E0E -g \u4E92\u65A5\uFF1B\u9ED8\u8BA4 -y \u8D70 both\uFF09","cli.help.update.flag.yes":"\u8DF3\u8FC7\u4F5C\u7528\u57DF\u9009\u62E9\u63D0\u793A\uFF08\u9ED8\u8BA4 both \u5168\u5C40 + \u9879\u76EE\uFF09","cli.help.update.flag.all":"\u7B49\u540C\u4E8E --skill * -y","cli.help.sync.flag.agent":"\u6307\u5B9A Agent\uFF08\u7A7A\u683C\u5206\u9694\u591A\u4E2A\u503C\uFF1B\u7528 * \u8868\u793A\u5168\u90E8\uFF09","cli.help.sync.flag.yes":"\u8DF3\u8FC7\u6240\u6709\u786E\u8BA4\u63D0\u793A","cli.help.remove.usage":"\u7528\u6CD5: easbot-skills remove [skills...] [options]","cli.help.remove.description":"\u4ECE Agent \u4E2D\u79FB\u9664\u5DF2\u5B89\u88C5\u6280\u80FD\u3002\u672A\u4F20\u6280\u80FD\u540D\u65F6\u8FDB\u5165\u4EA4\u4E92\u5F0F\u9009\u62E9\u83DC\u5355\u3002","cli.help.remove.arguments":"skills \u53EF\u9009\u6280\u80FD\u540D\uFF08\u7A7A\u683C\u5206\u9694\uFF09","cli.example.add":"\u6DFB\u52A0\u4E00\u4E2A\u6280\u80FD\u5305","cli.example.use":"\u4E00\u6B21\u6027\u4F7F\u7528\u67D0\u4E2A\u6280\u80FD","cli.example.use_with_agent":"\u6307\u5B9A\u6280\u80FD + Agent","cli.example.add_global":"\u5168\u5C40\u5B89\u88C5","cli.example.add_multi_agent":"\u5B89\u88C5\u5230\u591A\u4E2A Agent","cli.example.add_multi_skill":"\u5B89\u88C5\u591A\u4E2A\u6280\u80FD","cli.example.remove_interactive":"\u4EA4\u4E92\u5F0F\u5220\u9664","cli.example.remove_by_name":"\u6309\u540D\u79F0\u5220\u9664","cli.example.remove_global":"\u4ECE\u5168\u5C40\u8303\u56F4\u5220\u9664","cli.example.remove_by_agent":"\u4ECE\u6307\u5B9A Agent \u5220\u9664","cli.example.remove_all":"\u5220\u9664\u5168\u90E8","cli.example.remove_agent_all":"\u5220\u9664\u6307\u5B9A Agent \u7684\u6240\u6709\u6280\u80FD","cli.example.list_project":"\u5217\u51FA\u9879\u76EE\u7EA7\u6280\u80FD","cli.example.list_global":"\u5217\u51FA\u5168\u5C40\u6280\u80FD","cli.example.list_filter_agent":"\u6309 Agent \u8FC7\u6EE4","cli.example.list_json":"JSON \u8F93\u51FA","cli.example.find_interactive":"\u4EA4\u4E92\u5F0F\u641C\u7D22","cli.example.find_keyword":"\u6309\u5173\u952E\u5B57\u641C\u7D22","cli.example.find_owner":"\u5728\u6307\u5B9A owner \u4E0B\u641C\u7D22","cli.example.update_one":"\u66F4\u65B0\u5355\u4E2A\u6280\u80FD","cli.example.update_global":"\u4EC5\u66F4\u65B0\u5168\u5C40\u6280\u80FD","cli.example.init":"\u521B\u5EFA\u65B0\u6280\u80FD","cli.example.sync":"\u4ECE node_modules \u540C\u6B65","cli.example.sync_no_prompt":"\u540C\u6B65\u4E14\u8DF3\u8FC7\u786E\u8BA4","cli.example.store":"\u7BA1\u7406 store / cache \u6E90","cli.example.store_list":"\u5217\u51FA store skills","cli.example.store_clean_force":"\u91CD\u7F6E store + \u6E05 cache","cli.example.help":"\u663E\u793A\u6B64\u5E2E\u52A9","cli.init.exists":"\u6280\u80FD\u5DF2\u5B58\u5728: {{path}}","cli.init.created":"\u5DF2\u521B\u5EFA\u6280\u80FD: {{name}}","cli.init.created_label":"\u5DF2\u521B\u5EFA","cli.init.next.title":"\u4E0B\u4E00\u6B65","cli.init.next.edit":"\u7F16\u8F91 {{path}} \u5B9A\u4E49\u6280\u80FD\u6307\u4EE4","cli.init.next.frontmatter":"\u66F4\u65B0 frontmatter \u4E2D\u7684 name \u4E0E description","cli.init.publish.title":"\u53D1\u5E03\u65B9\u5F0F","cli.init.publish.github":"\u63A8\u9001\u5230\u4ED3\u5E93\u540E\u4F7F\u7528 {{cmd}} add <owner>/<repo>","cli.init.publish.url":"\u6258\u7BA1\u6587\u4EF6\u540E\u4F7F\u7528 {{cmd}} add https://example.com/{{path}}","cli.init.browse_hint":"\u5728 {{url}} \u6D4F\u89C8\u5176\u4ED6\u6280\u80FD\u83B7\u53D6\u7075\u611F","cli.unknown_command":"\u672A\u77E5\u547D\u4EE4: {{command}}","cli.help_hint":"\u8FD0\u884C {{cmd}} --help \u67E5\u770B\u7528\u6CD5"}},us=Zn;var Qn={translation:{"cli.banner.tagline":"easbot-skills \u2014 agent skills ecosystem","cli.banner.try_hint":"try:","cli.banner.discover":"Discover more skills at {{url}}","cli.banner.cmd.add":"{{cmd}} add {{dim}}<package>{{reset}} Add a new skill","cli.banner.cmd.use":"{{cmd}} use {{dim}}<package>@<skill>{{reset}} Use a skill without installing","cli.banner.cmd.remove":"{{cmd}} remove Remove installed skills","cli.banner.cmd.list":"{{cmd}} list List installed skills","cli.banner.cmd.find":"{{cmd}} find {{dim}}[query]{{reset}} Search for skills","cli.banner.cmd.update":"{{cmd}} update Update installed skills","cli.banner.cmd.init":"{{cmd}} init {{dim}}[name]{{reset}} Create a new skill","cli.banner.cmd.sync":"{{cmd}} experimental_sync Sync skills from node_modules","cli.help.usage":"Usage: skills <command> [options]","cli.help.section.manage":"Manage Skills","cli.help.section.find_options":"Find Options","cli.help.section.updates":"Updates","cli.help.section.update_options":"Update Options","cli.help.section.project":"Project","cli.help.section.add_options":"Add Options","cli.help.section.use_options":"Use Options","cli.help.section.remove_options":"Remove Options","cli.help.section.sync_options":"(Deprecated) Sync Options","cli.help.section.list_options":"List Options","cli.help.section.options":"Options","cli.help.store.desc":"Ops subcommands (store / cache management, store-centric)","cli.help.store.usage_title":"Usage","cli.help.store.concepts_title":"Concepts","cli.help.store.local_protection_title":"Local source protection (hard rule)","cli.help.store.options_title":"Options","cli.help.store.examples_title":"Examples","cli.help.store.list_desc":"List store skills (optional name filter)","cli.help.store.clean_desc":"Reset store: delete store dirs + clear index.ts (cache preserved)","cli.help.store.clean_force_desc":"Same + clear cache (local source cache protected)","cli.help.store.update_desc":"Refresh store from source (no agent distribution touched)","cli.help.store.remove_desc":"Remove store source: delete store + index entries","cli.help.store.remove_force_desc":"Extra clear cache (remote sources; local source ignored)","cli.help.store.help_desc":"This help","cli.help.store.concept_store":"normalized source dir (write once, reuse)","cli.help.store.concept_cache":"download/materialize cache (remote only; local = user dir)","cli.help.store.concept_index":"store defs index (key = skillName)","cli.help.store.local_clean":"`store clean --force` skips local source cache (user directory never deleted)","cli.help.store.local_remove_force":"`store remove --force` for local source is same as default (cache skipped)","cli.help.store.local_remove":"`store remove` for local source deletes store + index only, never user directory","cli.help.store.opt_yes":"Skip confirmation prompts","cli.help.store.opt_force":"`clean` / `remove`: extra clear cache (local source ignored)","cli.help.store.opt_json":"Output as JSON (machine-readable)","cli.store.unknown_subcommand":"Unknown store subcommand: {{sub}}","cli.help.add.flag.global":"Install to global (user-level) instead of project-level (default: project)","cli.help.add.flag.agent":"Target agents (repeatable; use * for all)","cli.help.add.flag.skill":"Skill names (repeatable; use * for all)","cli.help.add.flag.list":"Only list available skills in the repo, do not install","cli.help.add.flag.yes":"Skip all confirmation prompts","cli.help.add.flag.copy":"Copy files instead of symlinking","cli.help.add.flag.subagent":"Install to Eve subagents (use root for the root agent)","cli.help.add.flag.all":"Shorthand for --skill * --agent * -y","cli.help.add.flag.full_depth":"Search all subdirectories even when a root SKILL.md exists","cli.help.use.flag.skill":"Specify the skill to use (single value only)","cli.help.use.flag.agent":"Start one supported agent interactively (only claude-code / codex)","cli.help.use.flag.full_depth":"Search all subdirectories","cli.help.use.flag.openclaw_risks":"Allow unverified OpenClaw community skills","cli.help.remove.flag.global":"Remove from global (~) instead of project-level (default: project)","cli.help.remove.flag.agent":"Target agents (repeatable; use * for all)","cli.help.remove.flag.skill":"Skill names (repeatable; use * for all)","cli.help.remove.flag.yes":"Skip all confirmation prompts","cli.help.remove.flag.all":"Shorthand for --skill * --agent * -y","cli.help.list.flag.global":"List global skills (default: both global + project)","cli.help.list.flag.project":"List project-level skills only (mutually exclusive with -g; passing both = both)","cli.help.list.flag.agent":"Target agents (repeatable; use * for all)","cli.help.list.flag.json":"Output as JSON (no ANSI)","cli.help.list.flag.all":"Shorthand for --agent *","cli.help.doctor.flag.global":"Check global scope only (mutually exclusive with -p; default: both)","cli.help.doctor.flag.project":"Check project scope only (mutually exclusive with -g; default: both)","cli.help.doctor.flag.agent":"Target agents (repeatable; use * for all)","cli.help.doctor.flag.yes":"Skip confirmation; unlink dangling symlinks directly","cli.help.doctor.flag.all":"Shorthand for --agent *","cli.help.doctor.usage":"Usage: easbot-skills doctor [options]","cli.help.doctor.description":"Check + cleanup dangling symlinks in agent baseDirs (scan only by default; use --yes to clean). Extensible for skill validation, llm review, etc.","cli.commands.doctor":"Health check: scan dangling symlinks (extensible: validate, llm review, etc.)","cli.example.doctor":"Interactive check + cleanup","cli.example.doctor_agent_yes":"Check one agent + auto-cleanup","cli.example.doctor_global":"Check global scope only","cli.help.find.flag.owner":"Search only repositories from a GitHub owner","cli.help.update.flag.global":"Update global skills only (mutually exclusive with -p; default with -y is both)","cli.help.update.flag.project":"Update project-level skills only (mutually exclusive with -g; default with -y is both)","cli.help.update.flag.yes":"Skip the scope prompt (default: both global + project)","cli.help.update.flag.all":"Shorthand for --skill * -y","cli.help.sync.flag.agent":"Target agents (repeatable; use * for all)","cli.help.sync.flag.yes":"Skip all confirmation prompts","cli.help.remove.usage":"Usage: easbot-skills remove [skills...] [options]","cli.help.remove.description":"Remove installed skills from agents. If no skill names are provided, an interactive selection menu will be shown.","cli.help.remove.arguments":"skills Optional skill names to remove (space-separated)","cli.example.add":"Add a skill package","cli.example.use":"Use a skill one-shot","cli.example.use_with_agent":"Specify skill + agent","cli.example.add_global":"Install globally","cli.example.add_multi_agent":"Install to multiple agents","cli.example.add_multi_skill":"Install multiple skills","cli.example.remove_interactive":"Interactive remove","cli.example.remove_by_name":"Remove by name","cli.example.remove_global":"Remove from global scope","cli.example.remove_by_agent":"Remove from specific agent","cli.example.remove_all":"Remove all skills","cli.example.remove_agent_all":"Remove all skills from one agent","cli.example.list_project":"List project skills","cli.example.list_global":"List global skills","cli.example.list_filter_agent":"Filter by agent","cli.example.list_json":"JSON output","cli.example.find_interactive":"Interactive search","cli.example.find_keyword":"Search by keyword","cli.example.find_owner":"Search within an owner","cli.example.update_one":"Update a single skill","cli.example.update_global":"Update global skills only","cli.example.init":"Create a new skill","cli.example.sync":"Sync from node_modules","cli.example.sync_no_prompt":"Sync without prompts","cli.example.store":"Manage store / cache sources","cli.example.store_list":"List store skills","cli.example.store_clean_force":"Reset store + clear cache","cli.example.help":"Show this help","cli.init.exists":"Skill already exists at {{path}}","cli.init.created":"Initialized skill: {{name}}","cli.init.created_label":"Created","cli.init.next.title":"Next steps","cli.init.next.edit":"Edit {{path}} to define your skill instructions","cli.init.next.frontmatter":"Update the name and description in the frontmatter","cli.init.publish.title":"Publishing","cli.init.publish.github":"Push to a repo, then {{cmd}} add <owner>/<repo>","cli.init.publish.url":"Host the file, then {{cmd}} add https://example.com/{{path}}","cli.init.browse_hint":"Browse existing skills for inspiration at {{url}}","cli.unknown_command":"Unknown command: {{command}}","cli.help_hint":"Run {{cmd}} --help for usage"}},ds=Qn;var eo=()=>{Ct("zh-CN"),Ct("en-US"),Pt("zh-CN",us),Pt("en-US",ds);};eo();var rl=new Map,al=new Map,to=e=>{if(al.has(e))return al.get(e);let t=/{{\s*(\w+)\s*}}/g,s=[],l;for(;(l=t.exec(e))!==null;){let r=l[1];r&&!s.includes(r)&&s.push(r);}let n=new RegExp("{{\\s*("+s.join("|")+")\\s*}}","g"),o={keys:s,regex:n};return al.set(e,o),o},gs=(e,t)=>{if(!e||typeof e!="string")return "";if(!t||Object.keys(t).length===0)return e;let{regex:s,keys:l}=to(e);return l.length===0||!l.some(o=>o in t)?e:e.replace(s,(o,r)=>{let g=t[r];return g==null?"":String(g)})},lo=e=>{if(e&&Ue.locales.includes(e))return e;let t=process.env.EASBOT_LANG?.trim()||process.env.LANG?.trim();if(t){let s=t.replace(/_/g,"-");if(Ue.locales.includes(s))return s;let l=s.split("-")[0];if(l==="zh")return "zh-CN";if(l==="en")return "en-US"}return Ue.defaultLocale},fs=e=>{if(!rl.has(e)){let{resources:t}=Ct(e);rl.set(e,t);}return rl.get(e)},so=(e,t={})=>{let s=lo(t.locale),n=fs(s)?.translation[e];if(n&&typeof n=="string"){let o=gs(n,t.vars);return o!=null?String(o):String(e)}if(s!==Ue.defaultLocale){let r=fs(Ue.defaultLocale)?.translation[e];if(r&&typeof r=="string"){let g=gs(r,t.vars);return g!=null?String(g):String(e)}}return String(t.fallback??e)},y=so;function oo(e){let t=e[0]??"list",s=e.slice(1);return {subcommand:t,restArgs:s}}async function ks(e,t={}){let{subcommand:s,restArgs:l}=oo(e),n=io(l,t);switch(s){case "list":return ro(ms(l),n);case "clean":return co(n);case "update":return go(ms(l),n);case "remove":return mo(l,n);case "--help":case "-h":return hs(),0;default:return console.log(L__default.default.yellow(y("cli.store.unknown_subcommand",{vars:{sub:s},fallback:`Unknown store subcommand: ${s}`}))),hs(),1}}async function $s(e){if(!fs$1.existsSync(e))return;let t=fs$1.readdirSync(e,{withFileTypes:true});for(let s of t){if(s.name==="index.json")continue;let l=utils.Filesystem.join(e,s.name);await promises.rm(l,{recursive:true,force:true}).catch(()=>{});}}function ms(e){for(let t of e)if(t&&!t.startsWith("-"))return t}function io(e,t){let s={...t};for(let l=0;l<e.length;l++){let n=e[l];n!==void 0&&(n==="--force"?s.force=true:n==="--yes"||n==="-y"?s.yes=true:n==="--json"&&(s.json=true));}return s}async function ro(e,t={}){let s=await chunkJFEBB5CL_cjs.T(),l=await chunkJFEBB5CL_cjs.X(),n=e?l.filter(u=>u.skillName.toLowerCase().includes(e.toLowerCase())):l;if(n.length===0)return t.json?(console.log(JSON.stringify([],null,2)),0):(e?I__namespace.outro(L__default.default.dim(`No store skills matching "${e}".`)):I__namespace.outro(L__default.default.dim("No store sources. Run `skills add <source>` first.")),0);if(t.json){let u=new Map(Object.values(s.markets).map($=>[$.id,$])),k=n.map($=>{let b=u.get($.marketId);return {skillName:$.skillName,marketId:$.marketId,pluginId:$.pluginId,sourceKey:$.marketId,type:b?.type??null,url:b?.url??null,storePath:b?.storePath??null,cachePath:b?.cachePath??null,entry:$.entry}});return console.log(JSON.stringify(k,null,2)),0}let o=new Map(Object.values(s.markets).map(u=>[u.id,u]));console.log(),console.log(L__default.default.bold(L__default.default.cyan("Store skills"))),console.log();let r=new Map;for(let u of n){r.has(u.marketId)||r.set(u.marketId,new Map);let k=r.get(u.marketId);k.has(u.pluginId)||k.set(u.pluginId,[]),k.get(u.pluginId).push(u);}let g=Array.from(new Set(n.map(u=>u.marketId))),d=0;for(let u of g){let k=o.get(u),$=u.slice(0,8),b=k?.storePath??utils.Filesystem.join(chunkJFEBB5CL_cjs.K(),u),A=k?.type??"unknown",p=k?.url??"(local)";console.log(`${L__default.default.bold($)} ${L__default.default.dim("("+A+")")} ${p} ${L__default.default.dim("store="+$)} ${L__default.default.dim(b)} ${L__default.default.dim("cache="+(k?.cachePath??"(n/a)"))}`);let a=r.get(u),f=Array.from(a.keys()).sort();for(let S of f){let v=a.get(S),P=S.split(":").slice(1).join(":")||S;console.log(` ${L__default.default.dim("\u2514")} ${L__default.default.cyan(P)} ${L__default.default.dim("("+v.length+" skill"+(v.length>1?"s":"")+")")}`);let m=[...v].sort((w,T)=>w.skillName.localeCompare(T.skillName));for(let w of m)console.log(` ${ao(w.skillName)}`),d++;}console.log();}return console.log(),console.log(L__default.default.dim(`Total: ${d} skill(s)${e?` matching "${e}"`:""}. Use \`skills store clean [--force]\` to reset store, \`skills store update [keyword]\` to refresh from source.`)),console.log(),0}function ao(e){return e.replace(/[\x00-\x1f\x7f]/g,"").trim()}async function co(e={}){return e.force?uo(e):po(e)}async function po(e){await chunkJFEBB5CL_cjs.T();let s=await chunkJFEBB5CL_cjs.X(),l=Array.from(new Set(s.map(g=>g.marketId))),n=s.length;if(!e.yes&&!e.json&&process.stdin.isTTY){n>0&&I__namespace.log.warn(L__default.default.yellow(`This will reset store: ${l.length} source(s) / ${n} skill(s). Cache is preserved; next \`skills add <source>\` will reuse cache if present.`));let g=await I__namespace.confirm({message:"Reset store (delete store contents + clear index.json)?"});if(I__namespace.isCancel(g)||!g)return I__namespace.cancel("Cancelled."),1}let o=chunkJFEBB5CL_cjs.K();await $s(o);let r=utils.Filesystem.join(o,"index.json");if(fs$1.existsSync(r)){let{Filesystem:g}=await import('@easbot/utils');await g.writeJson(r,{version:6,markets:{}});}if(fs$1.existsSync(o)&&await promises.rm(utils.Filesystem.normalize(o),{recursive:true,force:true}).catch(()=>{}),chunkS6YNGR7S_cjs.d({event:"store_clean"}),e.json)console.log(JSON.stringify({cleaned:true,path:o,affectedSources:l.length,affectedSkills:n,cacheCleared:false}));else {let g=n>0?` (${n} skill(s) reset)`:"";I__namespace.outro(L__default.default.green(`\u2713 Reset store: ${o}${g} (cache preserved)`));}return 0}async function uo(e){let t=await chunkJFEBB5CL_cjs.T(),s=await chunkJFEBB5CL_cjs.X(),l=Array.from(new Set(s.map(A=>A.marketId))),n=s.length,o=new Set,r=new Set;for(let A of Object.values(t.markets))A.type==="local"?o.add(A.localPath??A.url):r.add(A.id);if(!e.yes&&!e.json&&process.stdin.isTTY){let A=o.size,p=A>0?L__default.default.yellow(` ${A} local source(s) cache = user directory; will be SKIPPED (never removed by force).`):"";I__namespace.log.warn(L__default.default.yellow(`This will reset store AND clear cache: ${l.length} source(s) / ${n} skill(s).${p}`));let a=await I__namespace.confirm({message:"Reset store + clear cache (local sources protected)?"});if(I__namespace.isCancel(a)||!a)return I__namespace.cancel("Cancelled."),1}let g=chunkJFEBB5CL_cjs.K(),d=utils.Filesystem.normalize(chunkJFEBB5CL_cjs.O()),u=utils.Filesystem.normalize(g);for(let A of o){let p=utils.Filesystem.normalize(A);if(p.startsWith(u+"/")||p===u)throw new Error(`[INVARIANT 0048-yyy] localPath falls inside storeRoot (suspected configuration error): ${p}
11
- This is a program bug: a local source must be the user's original directory and must not live inside storeRoot.`);if(p.startsWith(d+"/")||p===d)throw new Error(`[INVARIANT 0048-yyy] localPath falls inside cacheRoot (suspected configuration error): ${p}
12
- This is a program bug: a local source must not live inside cacheRoot.`)}await $s(g);let k=utils.Filesystem.join(g,"index.json");if(fs$1.existsSync(k)){let{Filesystem:A}=await import('@easbot/utils');await A.writeJson(k,{version:6,markets:{}});}let $=chunkJFEBB5CL_cjs.O(),b=false;if(fs$1.existsSync($)&&r.size>0?(await chunkJFEBB5CL_cjs.ka(),b=true):fs$1.existsSync($)&&(await chunkJFEBB5CL_cjs.ka(),b=true),fs$1.existsSync(g)&&await promises.rm(utils.Filesystem.normalize(g),{recursive:true,force:true}).catch(()=>{}),chunkS6YNGR7S_cjs.d({event:"store_clean_force"}),e.json)console.log(JSON.stringify({cleaned:true,path:g,cachePath:$,affectedSources:l.length,affectedSkills:n,cacheCleared:b,localSourcesSkipped:o.size}));else {let A=o.size>0?L__default.default.dim(` (${o.size} local source(s) cache preserved)`):"";I__namespace.outro(L__default.default.green(`\u2713 Reset store + cleared cache${A}`));}return 0}async function go(e,t={}){let s=await chunkJFEBB5CL_cjs.T(),l=await chunkJFEBB5CL_cjs.X();if(l.length===0)return t.json?(console.log(JSON.stringify({updated:0,reason:"no store sources"})),0):(I__namespace.outro(L__default.default.dim("No store sources to update.")),0);let n=new Set;if(e){let d=e.toLowerCase();for(let u of l)u.skillName.toLowerCase().includes(d)&&n.add(u.marketId);if(n.size===0)return t.json?(console.log(JSON.stringify({updated:0,reason:`no skills matching "${e}"`})),0):(I__namespace.outro(L__default.default.dim(`No store skills matching "${e}".`)),0)}else for(let d of l)n.add(d.marketId);let o=0,r=0,g=[];for(let d of n){let u=await fo(d,s,{...t});u.ok?(o++,g.push({sourceKey:d,skills:u.skills})):(r++,g.push({sourceKey:d,skills:[],cloneError:u.error}));}return chunkS6YNGR7S_cjs.d({event:"store_update",keyword:e??"",sourceCount:String(o+r),successCount:String(o),failCount:String(r)}),t.json?console.log(JSON.stringify({updated:o,failed:r,total:n.size,keyword:e??null,results:g})):(r>0&&I__namespace.log.warn(L__default.default.yellow(`${r} source(s) failed to refresh (clone errors); see above.`)),I__namespace.outro(L__default.default.green(`\u2713 Refreshed ${o}/${n.size} store source(s)${e?` matching "${e}"`:""}`))),r>0?2:0}async function fo(e,t,s){let l=t.markets[e];if(!l)return {ok:false,error:`source key not found: ${e}`};let n=chunkJFEBB5CL_cjs.e(l.url);if(l.subpath&&(n.subpath=l.subpath),l.ref&&(n.ref=l.ref),false);let o=await chunkJFEBB5CL_cjs.ea(n);return o.cloneError?{ok:false,error:o.cloneError.message}:{ok:true,skills:o.skills.map(r=>r.name)}}async function mo(e,t={}){let s=e[0];if(!s)return t.json?(console.log(JSON.stringify({removed:false,reason:"source key required"})),1):(I__namespace.log.error(L__default.default.red("Usage: skills store remove <source-key> [--force]")),1);let l=await chunkJFEBB5CL_cjs.T(),n=(await chunkJFEBB5CL_cjs.X()).filter(u=>u.marketId===s);if(n.length===0)return t.json?(console.log(JSON.stringify({removed:false,reason:`source key not found: ${s}`})),1):(I__namespace.log.error(L__default.default.red(`Source key not found: ${s}`)),I__namespace.outro(L__default.default.dim("Run `skills store list` to see available sources.")),1);let o=l.markets[s],r=utils.Filesystem.join(chunkJFEBB5CL_cjs.K(),s),g=o.type==="local";if(!t.yes&&!t.json&&process.stdin.isTTY){let u=g?" [local source: user directory protected]":"",k=t.force&&!g?" (+ cache)":"",$=await I__namespace.confirm({message:`Remove store source ${s.slice(0,8)}\u2026 (${n.length} skill(s))${u}${k}?`});if(I__namespace.isCancel($)||!$)return I__namespace.cancel("Cancelled."),1}fs$1.existsSync(r)&&await promises.rm(r,{recursive:true,force:true}),!g&&t.force&&await chunkJFEBB5CL_cjs.ja({type:o.type,url:o.url,subpath:o.subpath,ref:o.ref});let d=await chunkJFEBB5CL_cjs.T();if(d.markets[s]){delete d.markets[s];let{Filesystem:u}=await import('@easbot/utils');await u.writeJson(utils.Filesystem.join(chunkJFEBB5CL_cjs.K(),"index.json"),d);}if(chunkS6YNGR7S_cjs.d({event:t.force?"store_remove_force":"store_remove",source:s,sourceType:o.type,removedSkills:n.map(u=>u.skillName).join(",")}),t.json)console.log(JSON.stringify({removed:true,sourceKey:s,sourceType:o.type,isLocal:g,cacheCleared:!g&&t.force===true,skills:n.map(u=>u.skillName)}));else {let u=`\u2713 Removed store source ${s.slice(0,8)}\u2026 (${n.length} skill(s))`;g?u+=L__default.default.dim(" [local: user directory preserved]"):t.force?u+=L__default.default.dim(" (+ cache cleared)"):u+=L__default.default.dim(" (cache preserved; use --force to clear)"),I__namespace.outro(L__default.default.green(u));}return 0}function hs(){let e=(t,s,l)=>y(`cli.help.store.${t}`,{fallback:s,vars:l});console.log(`
13
- ${L__default.default.bold(L__default.default.cyan("skills store"))} - ${e("desc","Ops subcommands (store / cache management, store-centric)")}
14
-
15
- ${L__default.default.bold(e("usage_title","Usage:"))}
16
- skills store list [keyword] ${e("list_desc","List store skills (optional name filter)")}
17
- skills store clean ${e("clean_desc","Reset store: delete store dirs + clear index.ts (cache preserved)")}
18
- skills store clean --force ${e("clean_force_desc","Same + clear cache (local source cache protected)")}
19
- skills store update [keyword] ${e("update_desc","Refresh store from source (no agent distribution touched)")}
20
- skills store remove <key> ${e("remove_desc","Remove store source: delete store + index entries")}
21
- skills store remove <key> --force ${e("remove_force_desc","Extra clear cache (remote sources; local source ignored)")}
22
- skills store --help ${e("help_desc","This help")}
23
-
24
- ${L__default.default.bold(e("concepts_title","Concepts:"))}
25
- - store = \`<storeRoot>/<sourceKey>/\` ${e("concept_store","normalized source dir (write once, reuse)")}
26
- - cache = \`<cacheRoot>/<owner>/<repo>/\` ${e("concept_cache","download/materialize cache (remote only; local = user dir)")}
27
- - index = \`<storeRoot>/index.json\` ${e("concept_index","store defs index (key = skillName)")}
28
-
29
- ${L__default.default.bold(e("local_protection_title","Local source protection (hard rule):"))}
30
- - ${e("local_clean","`store clean --force` skips local source cache (user directory never deleted)")}
31
- - ${e("local_remove_force","`store remove --force` for local source is same as default (cache skipped)")}
32
- - ${e("local_remove","`store remove` for local source deletes store + index only, never user directory")}
33
-
34
- ${L__default.default.bold(e("options_title","Options:"))}
35
- -y, --yes ${e("opt_yes","Skip confirmation prompts")}
36
- --force ${e("opt_force","`clean` / `remove`: extra clear cache (local source ignored)")}
37
- --json ${e("opt_json","Output as JSON (machine-readable)")}
38
-
39
- ${L__default.default.bold(e("examples_title","Examples:"))}
40
- ${L__default.default.dim("$")} skills store list
41
- ${L__default.default.dim("$")} skills store list eas-skill-find
42
- ${L__default.default.dim("$")} skills store list --json
43
- ${L__default.default.dim("$")} skills store clean
44
- ${L__default.default.dim("$")} skills store clean --force
45
- ${L__default.default.dim("$")} skills store update
46
- ${L__default.default.dim("$")} skills store update eas-skill-find
47
- ${L__default.default.dim("$")} skills store remove a1b2c3d4e5f67890
48
- ${L__default.default.dim("$")} skills store remove a1b2c3d4e5f67890 --force
49
- ${L__default.default.dim("$")} skills store clean -y --json
50
- `);}var Nt=utils.Log.create({service:"skills-find"}),yo=process.env.SKILLS_API_URL||"https://skills.sh";function bs(e){return !e||e<=0?"":e>=1e6?`${(e/1e6).toFixed(1).replace(/\.0$/,"")}M installs`:e>=1e3?`${(e/1e3).toFixed(1).replace(/\.0$/,"")}K installs`:`${e} install${e===1?"":"s"}`}var bo=/^[a-z0-9](?:[a-z0-9-]{0,38})$/i;function So(e){let t=[],s={},l=[];for(let n=0;n<e.length;n++){let o=e[n];if(!o)continue;if(o==="--json"){s.json=true;continue}if(o==="--local"){s.local=true;continue}if(o==="--path"&&n+1<e.length){s.path=e[n+1],n++;continue}if(o.startsWith("--path=")){s.path=o.slice(7);continue}let r;if(o==="--owner"){let d=e[n+1];if(!d||d.startsWith("-")){l.push("--owner requires a GitHub owner");continue}r=d,n++;}else if(o.startsWith("--owner=")){if(r=o.slice(8),!r){l.push("--owner requires a GitHub owner");continue}}else {t.push(o);continue}let g=r.trim().toLowerCase();if(!bo.test(g)){l.push("--owner must be a valid GitHub owner");continue}s.owner=g;}return {query:t.join(" "),options:s,errors:l}}async function Ss(e,t){try{let s=new URLSearchParams({q:e,limit:"10"});t&&s.set("owner",t);let l=`${yo}/api/search?${s.toString()}`,n=await fetch(l);return n.ok?(await n.json()).skills.map(r=>({name:chunkTCFGU43L_cjs.b(r.name),slug:chunkTCFGU43L_cjs.b(r.id),source:chunkTCFGU43L_cjs.b(r.source||""),installs:r.installs})).sort((r,g)=>(g.installs||0)-(r.installs||0)):[]}catch(s){return console.warn(`${c}[find] skills.sh search API failed: ${s instanceof Error?s.message:String(s)}${i}`),[]}}async function wo(e){let t=await chunkJFEBB5CL_cjs.X(),s=e?.toLowerCase().trim()??"",l=await chunkJFEBB5CL_cjs.T(),n=[];for(let o of t){if(s&&!o.skillName.toLowerCase().includes(s))continue;let r=l.markets[o.marketId];n.push({skillName:o.skillName,sourceKey:o.marketId,pluginId:o.pluginId,type:r?.type??"unknown",url:r?.url??"",storePath:r?.storePath??""});}return n.sort((o,r)=>o.skillName.localeCompare(r.skillName)),n}async function vo(e,t){let s=[];try{for await(let o of utils.Grep.files({cwd:e,glob:["**/SKILL.md"]}))s.push(o);}catch{return []}let l=t?.toLowerCase().trim()??"",n=[];for(let o of s){let r=xo(e,o),g=await chunkJFEBB5CL_cjs.z(r);if(!g)continue;let d=g.name;if(l&&!d.toLowerCase().includes(l))continue;let u=path.dirname(r);n.push({skillName:d,sourceKey:"",pluginId:"",type:"scan",url:"",storePath:u});}return n.sort((o,r)=>o.skillName.localeCompare(r.skillName)),n}function xo(e,t){let s=process.platform==="win32"?"\\":"/",l=t.replaceAll("/",s);return e.endsWith("/")||e.endsWith("\\")?e+l:e+s+l}var Ao="\x1B[?25l",To="\x1B[?25h",Io="\x1B[J",Lo=e=>`\x1B[${e}A`,jo=e=>`\x1B[${e}G`;async function _o(e="",t){let s=[],l=0,n=e,o=false,r=null,g=0;process.stdin.isTTY&&process.stdin.setRawMode(true),vt__namespace.emitKeypressEvents(process.stdin),process.stdin.resume(),process.stdout.write(Ao);function d(){g>0&&process.stdout.write(Lo(g)+jo(1)),process.stdout.write(Io);let k=[],$=`${F}_${i}`;if(k.push(`${M}Search skills:${i} ${n}${$}`),k.push(""),!n||n.length<2)k.push(`${c}Start typing to search (min 2 chars)${i}`);else if(s.length===0&&o)k.push(`${c}Searching...${i}`);else if(s.length===0)k.push(`${c}No skills found${i}`);else {let A=s.slice(0,8);for(let p=0;p<A.length;p++){let a=A[p],f=p===l,S=f?`${F}>${i}`:" ",v=f?`${F}${a.name}${i}`:`${M}${a.name}${i}`,P=a.source?` ${c}${a.source}${i}`:"",m=bs(a.installs),w=m?` ${he}${m}${i}`:"",T=o&&p===0?` ${c}...${i}`:"";k.push(` ${S} ${v}${P}${w}${T}`);}}k.push(""),k.push(`${c}up/down navigate | enter select | esc cancel${i}`);for(let b of k)process.stdout.write(b+`
51
- `);g=k.length;}function u(k){if(r&&(clearTimeout(r),r=null),o=false,!k||k.length<2){s=[],l=0,d();return}o=true,d();let $=Math.max(150,350-k.length*50);r=setTimeout(async()=>{try{s=await Ss(k,t),l=0;}catch{s=[];}finally{o=false,r=null,d();}},$);}return e&&u(e),d(),new Promise(k=>{function $(){process.stdin.removeListener("keypress",b),process.stdin.isTTY&&process.stdin.setRawMode(false),process.stdout.write(To),process.stdin.pause();}function b(A,p){if(p){if(p.name==="escape"||p.ctrl&&p.name==="c"){$(),k(null);return}if(p.name==="return"){$(),k(s[l]||null);return}if(p.name==="up"){l=Math.max(0,l-1),d();return}if(p.name==="down"){l=Math.min(Math.max(0,s.length-1),l+1),d();return}if(p.name==="backspace"){n.length>0&&(n=n.slice(0,-1),u(n));return}if(p.sequence&&!p.ctrl&&!p.meta&&p.sequence.length===1){let a=p.sequence;a>=" "&&a<="~"&&(n+=a,u(n));}}}process.stdin.on("keypress",b);})}function Po(e){let t=e.lastIndexOf("@"),l=(t>0?e.slice(0,t):e).match(/^([^/]+)\/([^/]+)$/);return l?{owner:l[1],repo:l[2]}:null}async function Co(e,t){return await chunkJFEBB5CL_cjs.c(e,t)===false}async function Ro(e,t,s={}){let l=typeof s.path=="string"&&s.path.length>0,n=l?s.path:chunkJFEBB5CL_cjs.K(),o,r;if(l?(o=await vo(n,e||void 0),r="scan"):(o=await wo(e||void 0),r="index"),chunkS6YNGR7S_cjs.d({event:"find",query:e,resultCount:String(o.length),mode:"local"}),t)return console.log(JSON.stringify({ok:true,data:o,meta:{count:o.length,query:e||null,mode:r,rootDir:l?n:null}},null,2)),0;if(o.length===0){let A=e?` matching "${e}"`:"",p=l?` under "${n}"`:" in store";return console.log(`${c}No skills found${A}${p}.${i}`),0}let g=r==="scan"?` (scanned ${n})`:"";if(console.log(`${F}Local skills${e?` matching "${e}"`:""}${g}${i} (${o.length})`),console.log(),r==="scan"){let A=[...o].sort((a,f)=>a.skillName.localeCompare(f.skillName)),p={};for(let a of A){let f=p[a.skillName]??[];f.push(a),p[a.skillName]=f;}for(let a of Object.keys(p).sort()){let f=p[a];console.log(`${he}${a}${i}`);for(let S of f)console.log(` ${c}\u2514${i} ${S.storePath}`);}return console.log(),console.log(`${c}Run \`skills add <source>\` to install a discovered skill.${i}`),console.log(),0}let d=await chunkJFEBB5CL_cjs.T(),u=new Map(Object.values(d.markets).map(A=>[A.id,A])),k=new Map;for(let A of o){k.has(A.sourceKey)||k.set(A.sourceKey,new Map);let p=k.get(A.sourceKey);p.has(A.pluginId)||p.set(A.pluginId,[]),p.get(A.pluginId).push(A);}let $=Array.from(new Set(o.map(A=>A.sourceKey))),b=0;for(let A of $){let p=u.get(A),a=A.slice(0,8),f=p?.storePath??"",S=p?.type??"unknown",v=p?.url??"(local)";console.log(`${F}${a}${i} ${c}(${S})${i} ${v} ${c}store=${a}${i} ${c}${f}${i}`);let P=k.get(A),m=Array.from(P.keys()).sort();for(let w of m){let T=P.get(w),x=w.includes(":")&&w.split(":").slice(1).join(":")||w;console.log(` ${c}\u2514${i} ${c}plugin:${i} ${he}${x}${i} ${c}(${T.length} skill${T.length>1?"s":""})${i}`);let C=[...T].sort((B,U)=>B.skillName.localeCompare(U.skillName));for(let B of C)console.log(` ${B.skillName}`),b++;}console.log();}return console.log(),console.log(`${c}Total: ${b} skill(s). Use \`skills store clean [--force]\` to reset store, \`skills store update [keyword]\` to refresh from source.${i}`),console.log(),0}async function ws(e){let{query:t,options:s,errors:l}=So(e),n=s.owner,o=!process.stdin.isTTY;Nt.debug("runFind enter",{args:e,query:t,owner:n,errors:l,isNonInteractive:o,stdinTTY:process.stdin.isTTY});let r=`${c}Tip: if running in a coding agent, follow these steps:${i}
52
- ${c} 1) easbot skills find [query] [--owner <owner>]${i}
53
- ${c} 2) easbot skills add <owner/repo@skill>${i}`;if(l.length>0){for(let p of l)console.error(p);return console.error("Usage: easbot skills find <query> [--owner <owner>]"),1}if(s.local)return Ro(t,s.json??false,s);if(t){Nt.debug("runFind enter query branch",{query:t,owner:n,json:s.json});let p=await Ss(t,n);if(Nt.debug("runFind searchSkillsAPI returned",{count:p.length}),chunkS6YNGR7S_cjs.d({event:"find",query:t,resultCount:String(p.length)}),s.json)return console.log(JSON.stringify({ok:true,data:p.map(a=>({name:a.name,slug:a.slug,source:a.source,installs:a.installs,url:`https://skills.sh/${a.slug}`})),meta:{count:p.length,query:t,owner:n??null,truncated:p.length>6}},null,2)),0;if(p.length===0){let a=n?` from owner "${n}"`:"";return console.log(`${c}No skills found for "${t}"${a}${i}`),0}console.log(`${c}Install with${i} easbot skills add <owner/repo@skill>`),console.log();for(let a of p.slice(0,6)){let f=a.source||a.slug,S=bs(a.installs);console.log(`${M}${f}@${a.name}${i}${S?` ${he}${S}${i}`:""}`),console.log(`${c}\u2514 https://skills.sh/${a.slug}${i}`),console.log();}return 0}if(o||await At())return console.log(r),console.log(),console.log(`${c}Usage: easbot skills find <query> [--owner <owner>]${i}`),0;let g=await _o("",n);if(chunkS6YNGR7S_cjs.d({event:"find",query:"",resultCount:g?"1":"0",interactive:"1"}),!g)return console.log(`${c}Search cancelled${i}`),console.log(),0;let d=g.source||g.slug,u=g.name;console.log(),console.log(`${M}Installing ${F}${u}${i} from ${c}${d}${i}...`),console.log();let{source:k,options:$}=_t([d,"--skill",u]),b=0;try{await it(k,$);}catch(p){b=1,Nt.error("runAdd failed during find\u2192install",{err:p});}console.log();let A=Po(d);return A&&await Co(A.owner,A.repo)?console.log(`${c}View the skill at${i} ${M}https://skills.sh/${g.slug}${i}`):console.log(`${c}Discover more skills at${i} ${M}https://skills.sh${i}`),console.log(),b}function cl(e,t){let s=os$1.homedir();return e.startsWith(s)?e.replace(s,"~"):e.startsWith(t)?"."+e.slice(t.length):e}function pl(e,t=5){if(e.length<=t)return e.join(", ");let s=e.slice(0,t),l=e.length-t;return `${s.join(", ")} +${l} more`}function Oo(e){let t={};for(let s=0;s<e.length;s++){let l=e[s];if(l==="-g"||l==="--global")t.global=true;else if(l==="-p"||l==="--project")t.project=true;else if(l==="--json")t.json=true;else if(l==="--all")t.all=true;else if(l==="-y"||l==="--yes")t.yes=true;else if(l==="-a"||l==="--agent")for(t.agent=t.agent||[];s+1<e.length&&!e[s+1].startsWith("-");)t.agent.push(e[++s]);}return t}function Eo(e){return e.global&&e.project?"both":e.global?"global":e.project?"project":(e.all===true,"both")}async function vs(e,t={}){let s=Oo(e),l=t.cwd??process.cwd();s.all===true&&(!s.agent||s.agent.length===0)&&(s.agent=["*"]);let n=Eo(s),o;if(s.agent&&s.agent.length>0){let f=chunkTCFGU43L_cjs.s(s.agent);if(f.length>0){let S=Object.keys(chunkTCFGU43L_cjs.e);console.log(`${nt}Invalid agents: ${f.join(", ")}${i}`),console.log(`${c}Valid agents: ${S.join(", ")}${i}`),process.exit(1);}o=chunkTCFGU43L_cjs.t(s.agent);}let r=await chunkOWG6N2K6_cjs.s({scope:n,agentFilter:o,cwd:l}),g=s.json?await chunkJFEBB5CL_cjs.X():[],d=s.json?await chunkJFEBB5CL_cjs.T():{markets:{}};if(s.json){let f=new Map;for(let P of g)f.has(P.skillName)||f.set(P.skillName,P);let S=new Map(Object.values(d.markets).map(P=>[P.id,P])),v=r.map(P=>{let m=f.get(P.name),w=m?S.get(m.marketId):void 0,T=w?.storePath&&m?`${w.storePath}/${m.entry.skillPath}`:void 0;return {name:P.name,path:T??P.canonicalPath,canonicalPath:P.canonicalPath,scope:P.scope,agents:P.agents.map(x=>chunkTCFGU43L_cjs.e[x].displayName),...m&&{marketId:m.marketId,pluginId:m.pluginId,sourceKey:m.marketId},...m?.entry.computedHash&&{computedHash:m.entry.computedHash},...w?.addedAt&&{addedAt:w.addedAt},...w?.storePath&&{storePath:w.storePath},...w?.localPath&&{sourcePath:w.localPath},...m?.entry.skillPath&&{skillPath:m.entry.skillPath},...w?.type&&{sourceType:w.type},...w?.url&&{sourceUrl:w.url}}});console.log(JSON.stringify({ok:true,data:v,meta:{count:v.length,scope:n,agentFilter:o?[...o]:null}},null,2));return}let u=await chunkRWSBKHQ2_cjs.l(),k=n==="both"?"All":n==="global"?"Global":"Project";if(r.length===0){if(s.json){console.log(JSON.stringify({ok:true,data:[],meta:{count:0,scope:n,agentFilter:o?[...o]:null}},null,2));return}console.log(`${c}No skills found.${i}`);return}console.log(`${F}${k} Skills${i}`),console.log();let b=(f,S)=>{let v=f.name.localeCompare(S.name);return v!==0?v:f.canonicalPath.localeCompare(S.canonicalPath)},A=[...r].sort(b),p={};for(let f of A){let S=p[f.name]??[];S.push(f),p[f.name]=S;}let a=Object.keys(p).sort();for(let f of a){let S=p[f],v=u[f],P=v?.pluginId?.includes(":")?v.pluginId.split(":",2)[1]:void 0,m=P?` ${c}(${P})${i}`:"",w=S.length>1?` ${c}(${S.length} paths)${i}`:"";if(S.length===1){let T=S[0],x=cl(T.canonicalPath,l),C=T.agents.map(U=>chunkTCFGU43L_cjs.e[U].displayName),B=T.agents.length>0?pl(C):`${nt}not linked${i}`;console.log(`${he}${chunkTCFGU43L_cjs.b(T.name)}${i}${m} ${c}${x}${i} ${c}Agents:${i} ${B}`);}else {console.log(`${he}${chunkTCFGU43L_cjs.b(f)}${i}${m}${w}`);for(let T of S){let x=cl(T.canonicalPath,l),C=T.agents.map(U=>chunkTCFGU43L_cjs.e[U].displayName),B=T.agents.length>0?pl(C):`${nt}not linked${i}`;console.log(` ${c}\u2514${i} ${x} ${c}Agents:${i} ${B}`);}}console.log();}}async function Ts(e,t){let s=await Ye(),l=t.yes||s.isAgent;if(s.isAgent&&I__namespace.log.info(xt(s.agent.name)+" Agent detected \u2014 removing non-interactively"),t.global===void 0&&!l&&process.stdin.isTTY&&!s.isAgent){let m=await I__namespace.select({message:"Removal scope (use --global to switch)",options:[{value:false,label:"Project",hint:"Remove from current directory (committed with your project)"},{value:true,label:"Global",hint:"Remove from home directory (available across all projects)"}]});I__namespace.isCancel(m)&&(I__namespace.cancel("Removal cancelled"),process.exit(0)),t.global=m;}let n=t.global??false,o=process.cwd(),r=I__namespace.spinner();r.start("Scanning for installed skills...");let{scanInstalledSkillDirs:g}=await import('./scan-XWU3FCE3.cjs'),d;if(t.agent&&t.agent.length>0){let m=chunkTCFGU43L_cjs.t(t.agent),w=chunkTCFGU43L_cjs.s(t.agent);w.length>0&&(console.log(`Invalid agents: ${w.join(", ")}`),console.log(`Valid agents: ${Object.keys(chunkTCFGU43L_cjs.e).join(", ")}`),process.exit(1)),d=m;}let u=await g({scope:n?"global":"project",cwd:o,agentFilter:d}),k=new Set;for(let m of u)k.add(m.name);let $=Array.from(k).sort();if(r.stop(`Found ${$.length} unique installed skill(s)`),$.length===0){console.log("No skills found to remove.");return}if(t.skill&&t.skill.length>0&&t.all!==true){let m=chunkJFEBB5CL_cjs.E(t.skill,$);m.length>0&&(process.stdout.write(`Invalid skills: ${m.join(", ")}
54
- `),process.stdout.write(`Installed skills: ${$.join(", ")||"(none)"}
55
- `),process.exit(1));}let b=[];if(t.all)b=$;else if(e.length>0||t.skill&&t.skill.length>0){let m=[...e];if(t.skill&&t.skill.length>0){let w=chunkJFEBB5CL_cjs.F(t.skill,$);if(w.wildcard)b=$;else for(let T of w.matched)m.push(T);}if(b.length===0){let w=new Set;b=[];for(let T of m){let x=$.find(C=>C.toLowerCase()===T.toLowerCase());x&&!w.has(x)&&(w.add(x),b.push(x));}}if(b.length===0){console.log(`No matching skills found for: ${m.join(", ")}`);return}}else {let m=$.map(T=>({value:T,label:T})),w=await I__namespace.multiselect({message:`Select skills to remove ${L__default.default.dim("(space to toggle)")}`,options:m,required:true});I__namespace.isCancel(w)&&(I__namespace.cancel("Removal cancelled"),process.exit(0)),b=w;}let A=new Map;for(let m of u){let w=A.get(m.name);w||(w=new Set,A.set(m.name,w));for(let T of m.agents)w.add(T);}let p=new Set;for(let m of b){let w=A.get(m);if(w)for(let T of w)p.add(T);}let a=Array.from(p);if(a.length===0){console.log("No installed agents match the filter for the selected skill(s).");return}if(!t.yes){let m=n?"Global (use --project to switch)":"Project (use --global to switch)",w=a.map(C=>chunkTCFGU43L_cjs.e[C]?.displayName??C),T=C=>C.length<=5?C.join(", "):`${C.slice(0,5).join(", ")} +${C.length-5} more`;console.log(),I__namespace.log.warn(L__default.default.yellow(`About to remove ${b.length} skill(s) from ${a.length} agent(s):`)),console.log(),console.log(` ${L__default.default.dim("Scope:")} ${m}`),console.log(` ${L__default.default.dim("Agents ("+a.length+"):")}`),console.log(` ${L__default.default.red("\u2022")} ${T(w)}`),console.log(` ${L__default.default.dim("Skills ("+b.length+"):")}`);for(let C of b)console.log(` ${L__default.default.red("\u2022")} ${C}`);console.log(),console.log(L__default.default.dim(" Each skill will be uninstalled from every targeted agent.")),console.log();let x=await I__namespace.confirm({message:"Continue? (y/N)"});(I__namespace.isCancel(x)||!x)&&(I__namespace.cancel("Removal cancelled"),process.exit(0));}r.start("Removing skills...");let f=[];for(let m of b)try{let w=chunkOWG6N2K6_cjs.o(m,{global:n,cwd:o});for(let O of a){let J=chunkTCFGU43L_cjs.e[O],le=chunkOWG6N2K6_cjs.m(m,O,{global:n,cwd:o}),X=new Set([le]),ie=chunkOWG6N2K6_cjs.d(m);if(n&&J.globalSkillsDir)X.add(path.join(J.globalSkillsDir,ie));else if(X.add(path.join(o,J.skillsDir,ie)),O==="eve")for(let re of chunkTCFGU43L_cjs.i(o))X.add(path.join(chunkOWG6N2K6_cjs.f(re,o),ie));for(let re of X)if(re!==w)try{await promises.lstat(re).catch(()=>null)&&await promises.rm(re,{recursive:!0,force:!0});}catch(we){I__namespace.log.warn(`Could not remove skill from ${J.displayName}: ${we instanceof Error?we.message:String(we)}`);}}let x=(await chunkTCFGU43L_cjs.f()).filter(O=>!a.includes(O)),C=!1;for(let O of x){let J=chunkOWG6N2K6_cjs.m(m,O,{global:n,cwd:o});if(await promises.lstat(J).catch(()=>null)){C=!0;break}}C||await promises.rm(w,{recursive:!0,force:!0});let B=n?await chunkRWSBKHQ2_cjs.k(m):null,U=await Do(m),R=U?(await chunkJFEBB5CL_cjs.T()).markets[U.marketId]:void 0,z=R?.url??B?.source??"local",W=R?.type??B?.sourceType??"local";n?await chunkRWSBKHQ2_cjs.j(m):await chunkJFEBB5CL_cjs.x(m,o),f.push({skill:m,success:!0,source:z,sourceType:W,...U?.marketId&&{sourceKey:U.marketId},...R?.storePath&&{storePath:R.storePath}});}catch(w){f.push({skill:m,success:false,error:w instanceof Error?w.message:String(w)});}r.stop("Removal process complete");let S=f.filter(m=>m.success),v=f.filter(m=>!m.success);if(S.length>0){let m=new Map;for(let w of S){let T=w.source||"local",x=m.get(T)||{skills:[]};x.skills.push(w.skill),x.sourceType=w.sourceType,m.set(T,x);}for(let[w,T]of m)chunkS6YNGR7S_cjs.d({event:"remove",source:w,skills:T.skills.join(","),agents:a.join(","),...n&&{global:"1"},sourceType:T.sourceType});}let P=n?"Global Skills":"Project Skills";console.log(),console.log(` ${L__default.default.dim(L__default.default.bold(P))}`);for(let m of S)console.log(` ${L__default.default.green("\u2713")} ${m.skill}`);if(S.length>0&&(console.log(),I__namespace.log.success(L__default.default.green(`Successfully removed ${S.length} skill(s)`))),v.length>0){console.log(),I__namespace.log.error(L__default.default.red(`Failed to remove ${v.length} skill(s)`));for(let m of v)I__namespace.log.message(` ${L__default.default.red("\u2717")} ${m.skill}: ${m.error}`);}console.log(),I__namespace.outro(L__default.default.green("Done!"));}async function Do(e){return (await chunkJFEBB5CL_cjs.Y(e))[0]}function Is(e){let t={},s=[];for(let l=0;l<e.length;l++){let n=e[l];if(n==="-g"||n==="--global")t.global=true;else if(n==="-y"||n==="--yes")t.yes=true;else if(n==="--all")t.all=true;else if(n==="-a"||n==="--agent"){t.agent=t.agent||[],l++;let o=e[l];for(;l<e.length&&o&&!o.startsWith("-");)t.agent.push(o),l++,o=e[l];l--;}else if(n==="-s"||n==="--skill"){t.skill=t.skill||[],l++;let o=e[l];for(;l<e.length&&o&&!o.startsWith("-");)t.skill.push(o),l++,o=e[l];l--;}else n&&!n.startsWith("-")&&s.push(n);}return {skills:s,options:t}}function Bo(e){let t={};for(let s=0;s<e.length;s++){let l=e[s];if(l==="-g"||l==="--global")t.global=true;else if(l==="-p"||l==="--project")t.project=true;else if(l==="-y"||l==="--yes")t.yes=true;else if(l==="--all")t.all=true;else if(l==="-a"||l==="--agent")for(t.agent=t.agent??[];s+1<e.length&&!e[s+1].startsWith("-");)t.agent.push(e[++s]);}return t}function Go(e){return e.global&&e.project?"both":e.global?"global":e.project?"project":("both")}function Wo(e,t,s){let l=chunkTCFGU43L_cjs.e[e];if(t){if(l.globalSkillsDir!==void 0)return l.globalSkillsDir;let n=chunkVRHWDHQV_cjs.a("os").homedir();return utils.Filesystem.join(n,l.skillsDir)}return utils.Filesystem.join(s,l.skillsDir)}async function Ls(e,t={}){let s=t.cwd??process.cwd(),l=Bo(e),n=Go(l),o=l.agent??["*"],r=o.includes("*")?null:new Set(o),g=n==="both"?["project","global"]:[n],d=[];for(let p of g){let a=chunkTCFGU43L_cjs.l(p);for(let f of a){if(f==="eve"||r&&!r.has(f))continue;let S=p==="global";try{let v=Wo(f,S,s);d.push({agent:f,isGlobal:S,baseDir:v});}catch{}}}let u=[];for(let p of d){let a;try{a=fs$1.readdirSync(p.baseDir);}catch{continue}for(let f of a){if(f.startsWith("."))continue;let S=utils.Filesystem.join(p.baseDir,f),v;try{v=fs$1.lstatSync(S);}catch{continue}if(!v.isSymbolicLink())continue;let P;try{P=fs$1.realpathSync(S);}catch{P="<unreadable>";}P==="<unreadable>"&&u.push({agent:p.agent,isGlobal:p.isGlobal,baseDir:p.baseDir,name:f,target:P});}}if(u.length===0){console.log(`${M}Doctor check: no dangling symlinks found across ${d.length} baseDir(s).${i}
56
- `);return}console.log(`${F}${he}Doctor check: ${u.length} dangling symlink(s) found${i}
57
- `);for(let p of u){let a=p.isGlobal?"global":"project";console.log(` ${M}${p.name}${i} ${c}(${p.agent} \xB7 ${a})${i}`),console.log(` ${c}${p.baseDir}${i}`),console.log(` ${c}\u2192 ${p.target}${i}`);}if(console.log(),l.yes!==true&&!process.stdin.isTTY){console.log(`${c}Skipping cleanup (non-TTY environment; re-run with --yes to clean, or use a TTY).${i}
58
- `);return}if(!await(await import('@clack/prompts')).confirm({message:`Unlink these ${u.length} dangling symlink(s)?`,initialValue:true})){console.log(`${c}Skipped cleanup.${i}
59
- `);return}let b=0,A=0;for(let p of u){let a=utils.Filesystem.join(p.baseDir,p.name);try{fs$1.unlinkSync(a);let f=p.isGlobal?"global":"project";console.log(` ${M}\u2713 unlinked ${p.name}${i} ${c}(${p.agent} \xB7 ${f})${i}`),b++;}catch(f){let S=f instanceof Error?f.message:String(f);console.log(` ${c}\u2717 failed ${p.name}: ${S}${i}`),A++;}}console.log(),console.log(`${M}Doctor cleanup: ${b} unlinked, ${A} failed.${i}
60
- `);}var Qo=new Set(["metadata.json"]),ei=new Set([".git","__pycache__","__pypackages__"]),gl={"claude-code":{command:"claude",args:[]},codex:{command:"codex",args:[]}},Es=Object.keys(gl);function Ds(e){let t=[],s={},l=[];for(let n=0;n<e.length;n++){let o=e[n];if(o)if(o==="--help"||o==="-h")s.help=true;else if(o==="--full-depth")s.fullDepth=true;else if(o==="--dangerously-accept-openclaw-risks")s.dangerouslyAcceptOpenclawRisks=true;else if(o==="--skill"||o==="-s"){let r=e[n+1];!r||r.startsWith("-")?l.push(`${o} requires a skill name`):s.skill?(l.push("Only one --skill value can be provided"),n++):(s.skill=r,n++);}else if(o==="--agent"||o==="-a"){s.agent=s.agent||[],n++;let r=e[n],g=s.agent.length;for(;n<e.length&&r&&!r.startsWith("-");)s.agent.push(r),n++,r=e[n];s.agent.length===g&&l.push(`${o} requires an agent name`),n--;}else o.startsWith("-")?l.push(`Unknown option: ${o}`):t.push(o);}return l.push(...ri(s.agent)),{source:t,options:s,errors:l}}function ti(e){let t=["You are being given a Skill to execute for the user's next request.","Use the following SKILL.md as your instructions:",`<SKILL.md>
61
- ${e.skillMd}
62
- </SKILL.md>`];return e.hasSupportingFiles&&e.supportDir&&t.push(`Supporting files for this skill were downloaded to:
63
- ${e.supportDir}
64
-
65
- When the SKILL.md references relative paths, read them from that directory.`),t.join(`
66
-
67
- `)+`
68
- `}async function li(e){let t=await promises.mkdtemp(path.join(os$1.tmpdir(),"skills-use-")),s=path.join(t,chunkOWG6N2K6_cjs.d(e.directoryName||e.name));if(!fl(t,s))throw new Error("Invalid skill name: potential path traversal detected");await promises.mkdir(s,{recursive:true}),e.kind==="blob"?await ai(s,e.files):e.kind==="well-known"?await ci(s,e.files):await Gs(e.path,s);let l=e.rawContent??await promises.readFile(path.join(s,"SKILL.md"),"utf-8"),n=await Ws(s,s);return {tempRoot:t,skillDir:s,skillMd:l,hasSupportingFiles:n}}async function Us(e,t={},s=[]){let l=null;try{if(t.help){console.log(Cs());return}s.length>0&&Te(s.join(`
69
- `)),e.length===0&&Te(`Missing required argument: source
70
-
71
- ${Cs()}`),e.length>1&&Te(`Expected one source, received ${e.length}: ${e.join(", ")}`);let n=t.agent?.[0];n&&!gl[n]&&Te(Ks(n));let o=e[0],r=chunkJFEBB5CL_cjs.e(o);chunkJFEBB5CL_cjs.a(r)?.split("/")[0]?.toLowerCase()==="openclaw"&&!t.dangerouslyAcceptOpenclawRisks&&Te(["OpenClaw skills are unverified community submissions.","Skills run with full agent permissions and could be malicious.",`If you understand the risks, re-run with: skills use ${o} --dangerously-accept-openclaw-risks`].join(`
72
- `));let u=t.skill,k=!!(u||t.fullDepth||r.subpath),$;if(r.type==="well-known"){let p=await chunkJFEBB5CL_cjs.n.fetchAllSkills(r.url);$=ii(p,u,o);}else {let p,a=null;if(r.type==="local")fs$1.existsSync(r.localPath)||Te(`Local path does not exist: ${r.localPath}`),p=await chunkJFEBB5CL_cjs.B(r.localPath,r.subpath,{includeInternal:k,fullDepth:t.fullDepth});else if(r.type==="github"&&!t.fullDepth){let S=chunkJFEBB5CL_cjs.a(r),v=S?.split("/")[0]?.toLowerCase();S&&v&&chunkTCFGU43L_cjs.x.includes(v)&&(a=await chunkTCFGU43L_cjs.D(S,{subpath:r.subpath,ref:r.ref,getToken:chunkRWSBKHQ2_cjs.g,includeInternal:k})),a?p=a.skills:(l=await chunkJFEBB5CL_cjs.k(r.url,r.ref),p=await chunkJFEBB5CL_cjs.B(l,r.subpath,{includeInternal:k,fullDepth:t.fullDepth}));}else l=await chunkJFEBB5CL_cjs.k(r.url,r.ref),p=await chunkJFEBB5CL_cjs.B(l,r.subpath,{includeInternal:k,fullDepth:t.fullDepth});let f=oi(p,u,o);a&&pi(f)?$={kind:"blob",name:f.name,directoryName:f.name,rawContent:f.rawContent??ui(f.files),files:f.files}:$={kind:"disk",name:f.name,directoryName:f.name,rawContent:f.rawContent,path:f.path};}let b=await li($);await Rs(l),l=null;let A=ti({skillMd:b.skillMd,supportDir:b.skillDir,hasSupportingFiles:b.hasSupportingFiles});if(n){let p=await si(n,A);p!==0&&process.exit(p);return}process.stdout.write(A);}catch(n){await Rs(l),n instanceof chunkJFEBB5CL_cjs.g&&Te(n.message),n instanceof $e&&Te(n.message),Te(n instanceof Error?n.message:"Unknown error");}}async function si(e,t,s=ni){let l=gl[e];if(!l)throw new $e(Ks(e));return new Promise((n,o)=>{let r=s(l.command,[...l.args,t],{stdio:"inherit"}),g=false;r.on("error",d=>{if(!g){if(g=true,d.code==="ENOENT"){o(new $e(`Could not launch ${chunkTCFGU43L_cjs.e[e].displayName}: command not found: ${l.command}`));return}o(d);}}),r.on("close",d=>{g||(g=true,n(d??1));});})}function ni(e,t){return child_process.spawn(e,t,{stdio:"inherit"})}function Cs(){return `Usage: skills use <source>[@<skill>] [options]
73
-
74
- Generate a prompt for using one skill without installing it.
75
-
76
- Options:
77
- -s, --skill <skill> Select the skill to use
78
- -a, --agent <agent> Start one supported agent interactively (${Es.join(", ")})
79
- --full-depth Search nested directories like skills add --full-depth
80
- --dangerously-accept-openclaw-risks
81
- Allow unverified OpenClaw community skills
82
- -h, --help Show this help message
83
-
84
- Examples:
85
- skills use houjallen/agent-skills@web-design-guidelines | claude
86
- skills use houjallen/agent-skills --skill web-design-guidelines --agent claude-code
87
- skills use houjallen/agent-skills@web-design-guidelines --agent codex`}function oi(e,t,s){if(e.length===0)throw new $e("No valid skills found. Skills require a SKILL.md with name and description.");if(!t){if(e.length===1)return e[0];throw new $e(Fs(s,e.map(chunkJFEBB5CL_cjs.C)))}let l=chunkJFEBB5CL_cjs.D(e,[t]);if(l.length===0)throw new $e(Ms(t,e.map(chunkJFEBB5CL_cjs.C)));if(l.length>1)throw new $e(`Skill selector "${t}" matched multiple skills.`);return l[0]}function ii(e,t,s){if(e.length===0)throw new $e("No skills found at this URL. Make sure the server has a /.well-known/agent-skills/index.json or /.well-known/skills/index.json file.");let l;if(t){if(l=e.filter(o=>o.installName.toLowerCase()===t.toLowerCase()||o.name.toLowerCase()===t.toLowerCase()),l.length===0)throw new $e(Ms(t,e.map(o=>o.installName)));if(l.length>1)throw new $e(`Skill selector "${t}" matched multiple skills.`)}else {if(e.length!==1)throw new $e(Fs(s,e.map(o=>o.installName)));l=e;}let n=l[0];return {kind:"well-known",name:n.name,directoryName:n.installName,rawContent:n.content,files:n.files}}function Fs(e,t){return ["This source contains multiple skills. Specify exactly one skill:",...t.map(s=>` - ${s}`),"",`Examples:
88
- skills use ${e}@${t[0]??"<skill>"}
89
- skills use ${e} --skill ${t[0]??"<skill>"}`].join(`
90
- `)}function Ms(e,t){return [`No matching skill found for: ${e}`,"Available skills:",...t.map(s=>` - ${s}`)].join(`
91
- `)}function ri(e){if(!e||e.length===0)return [];let t=[];e.includes("*")&&t.push("skills use --agent does not support '*'; specify exactly one agent."),e.length>1&&t.push("skills use --agent accepts exactly one agent.");let s=chunkTCFGU43L_cjs.s(e);if(s.length>0){let l=Object.keys(chunkTCFGU43L_cjs.e);t.push(`Invalid agents: ${s.join(", ")}
92
- Valid agents: ${l.join(", ")}`);}return t}function Ks(e){return [`Running ${chunkTCFGU43L_cjs.e[e].displayName} is not supported yet.`,`Supported agents for skills use --agent: ${Es.join(", ")}`].join(`
93
- `)}async function ai(e,t){for(let s of t)await Bs(e,s.path,s.contents);}async function ci(e,t){for(let[s,l]of t)await Bs(e,s,l);}async function Bs(e,t,s){let l=path.join(e,t);fl(e,l)&&(await promises.mkdir(path.dirname(l),{recursive:true}),typeof s=="string"?await promises.writeFile(l,s,"utf-8"):await promises.writeFile(l,s));}async function Gs(e,t){await promises.mkdir(t,{recursive:true});let s=await promises.readdir(e,{withFileTypes:true});await Promise.all(s.filter(l=>!di(l.name,l.isDirectory())).map(async l=>{let n=path.join(e,l.name),o=path.join(t,l.name);if(fl(t,o)){if(l.isDirectory()){await Gs(n,o);return}try{await promises.cp(n,o,{dereference:!0,recursive:!0});}catch(r){if(r instanceof Error&&"code"in r&&r.code==="ENOENT"&&l.isSymbolicLink()){console.error(`Skipping broken symlink: ${n}`);return}throw r}}}));}async function Ws(e,t){let s=await promises.readdir(t,{withFileTypes:true});for(let l of s){let n=path.join(t,l.name),o=path.relative(e,n).split(path.sep).join("/");if(l.isDirectory()){if(await Ws(e,n))return true}else if(o.toLowerCase()!=="skill.md")return true}return false}function pi(e){return Array.isArray(e.files)}function ui(e){return e.find(s=>s.path.toLowerCase()==="skill.md")?.contents??""}function di(e,t){return Qo.has(e)||t&&ei.has(e)}function fl(e,t){let s=path.normalize(path.resolve(e)),l=path.normalize(path.resolve(t));return l.startsWith(s+path.sep)||l===s}async function Rs(e){e&&await chunkJFEBB5CL_cjs.l(e).catch(()=>{});}function Te(e){console.error(e),process.exit(1);}var $e=class extends Error{};var fi={"zh-CN":utils.loadTextFile("./template/skill-template-zh-CN.txt",chunkVRHWDHQV_cjs.c),"en-US":utils.loadTextFile("./template/skill-template-en-US.txt",chunkVRHWDHQV_cjs.c)};function mi(e){return e.split(/[-_\s]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}function hi(e){return fi[e]()}var ki=/\{\{\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\}\}/g;function zs(e,t){let s=utils.formatLocalISO(new Date,false).slice(0,10),l={skill_name:t,skill_title:mi(t),version:"1.0.0",date:s};return hi(e).replace(ki,(o,r)=>Object.hasOwn(l,r)?l[r]:o)}function vi(e){return e&&cs(e),e??"0.0.0"}function Qe(e){return utils.resolveLocaleLang(e?.locale)}function xi(e){let t=Qe(e);console.log(),console.log(`${c}${y("cli.banner.tagline",{locale:t,fallback:"easbot-skills \u2014 agent skills ecosystem"})}${i}`),console.log(),console.log(` ${c}$${i} ${M}easbot-skills add ${c}<package>${i} ${c}${y("cli.banner.cmd.add",{locale:t,vars:{cmd:"",dim:"",reset:""},fallback:"Add a new skill"})}${i}`),console.log(` ${c}$${i} ${M}easbot-skills use ${c}<package>@<skill>${i} ${c}${y("cli.banner.cmd.use",{locale:t,vars:{cmd:"",dim:"",reset:""},fallback:"Use a skill without installing"})}${i}`),console.log(` ${c}$${i} ${M}easbot-skills remove${i} ${c}${y("cli.example.remove_interactive",{locale:t,fallback:"Remove installed skills"})}${i}`),console.log(` ${c}$${i} ${M}easbot-skills list${i} ${c}${y("cli.example.list_project",{locale:t,fallback:"List installed skills"})}${i}`),console.log(` ${c}$${i} ${M}easbot-skills find ${c}[query]${i} ${c}${y("cli.example.find_interactive",{locale:t,fallback:"Search for skills"})}${i}`),console.log(),console.log(` ${c}$${i} ${M}easbot-skills update${i} ${c}${y("cli.example.update_global",{locale:t,fallback:"Update installed skills"})}${i}`),console.log(),console.log(` ${c}$${i} ${M}easbot-skills doctor${i} ${c}${y("cli.commands.doctor",{locale:t,fallback:"Check + cleanup broken links & more"})}${i}`),console.log(),console.log(` ${c}$${i} ${M}easbot-skills init ${c}[name]${i} ${c}${y("cli.example.init",{locale:t,fallback:"Create a new skill"})}${i}`),console.log(` ${c}$${i} ${M}easbot-skills store ${c}<sub>${i} ${c}${y("cli.example.store",{locale:t,fallback:"Manage store / cache sources"})}${i}`),console.log(),console.log(`${c}${y("cli.banner.try_hint",{locale:t,fallback:"try:"})}${i} easbot-skills add houjallen/agent-skills`),console.log(),console.log(`${c}${y("cli.banner.discover",{locale:t,vars:{url:"https://skills.sh/"},fallback:"Discover more skills at https://skills.sh/"})}${i}`),console.log();}function Xc(e){let t=Qe(e),s=(l,n)=>c+y(l,{locale:t,fallback:n})+i;console.log(`
94
- ${F}${y("cli.help.usage",{locale:t,fallback:"Usage: skills <command> [options]"})}${i}
95
-
96
- ${F}${y("cli.help.section.manage",{locale:t,fallback:"Manage Skills"})}${i}:
97
- add <source> Add a skill package (alias: a).
98
- <source> accepts 4 forms:
99
- <owner>/<repo> e.g. houjallen/agent-skills
100
- GitHub URL e.g. https://github.com/houjallen/agent-skills
101
- local path e.g. ./skills/foo or /abs/path/to/skills
102
- .well-known URL served from /.well-known/agent-skills/index.json
103
- use <package>@<skill>
104
- Generate a prompt for using one skill without installing it
105
- remove [skills] Remove installed skills
106
- list, ls List installed skills
107
- find [query] Search for skills interactively
108
- doctor, dr Check & cleanup broken links (scope: -g/-p, default both)
109
-
110
- ${F}${y("cli.help.section.updates",{locale:t,fallback:"Updates"})}${i}:
111
- update [skills...] Update skills to latest versions (alias: upgrade)
112
-
113
- ${F}${y("cli.help.section.maintenance",{locale:t,fallback:"Maintenance (Operations)"})}${i}:
114
- store <subcommand> Manage store sources (store + cache + index):
115
- list [keyword] List store skills (optional name filter)
116
- clean [--force] Reset store (--force also clears cache)
117
- update [keyword] Refresh store from source
118
- remove <key> [--force] Drop store source (--force also clears cache)
119
-
120
- ${F}${y("cli.help.section.update_options",{locale:t,fallback:"Update Options"})}${i}:
121
- -g, --global ${y("cli.help.update.flag.global",{locale:t,fallback:"Update global skills only"})}
122
- -p, --project ${y("cli.help.update.flag.project",{locale:t,fallback:"Update project skills only"})}
123
- -y, --yes ${y("cli.help.update.flag.yes",{locale:t,fallback:"Skip scope prompt (defaults to both project + global)"})}
124
- --all ${y("cli.help.update.flag.all",{locale:t,fallback:"Shorthand for --skill '*' -y (update all installed skills)"})}
125
- --force ${y("cli.help.update.flag.force",{locale:t,fallback:"Skip SKILL.md hash check; reinstall every selected skill"})}
126
-
127
- ${F}${y("cli.help.section.project",{locale:t,fallback:"Project"})}${i}:
128
- init [name] Initialize a skill (creates <name>/SKILL.md or ./SKILL.md)
129
- store <subcommand> Manage store sources (store + cache + index; --force clears cache)
130
-
131
- ${F}${y("cli.help.section.add_options",{locale:t,fallback:"Add Options"})}${i}:
132
- -g, --global ${y("cli.help.add.flag.global",{locale:t,fallback:"Install skill globally (user-level) instead of project-level"})}
133
- -a, --agent <agents> ${y("cli.help.add.flag.agent",{locale:t,fallback:"Specify agents to install to (use '*' for all agents)"})}
134
- -s, --skill <skills> ${y("cli.help.add.flag.skill",{locale:t,fallback:"Specify skill names to install (use '*' for all skills)"})}
135
- -l, --list ${y("cli.help.add.flag.list",{locale:t,fallback:"List available skills in the repository without installing"})}
136
- -y, --yes ${y("cli.help.add.flag.yes",{locale:t,fallback:"Skip confirmation prompts"})}
137
- --copy ${y("cli.help.add.flag.copy",{locale:t,fallback:"Copy files instead of symlinking to agent directories"})}
138
- --subagent <names> ${y("cli.help.add.flag.subagent",{locale:t,fallback:"Install to Eve subagents (use 'root' for the root agent)"})}
139
- --all ${y("cli.help.add.flag.all",{locale:t,fallback:"Shorthand for --skill '*' --agent '*' -y"})}
140
- --full-depth ${y("cli.help.add.flag.full_depth",{locale:t,fallback:"Search all subdirectories even when a root SKILL.md exists"})}
141
-
142
- ${F}${y("cli.help.section.use_options",{locale:t,fallback:"Use Options"})}${i}:
143
- -s, --skill <skill> ${y("cli.help.use.flag.skill",{locale:t,fallback:"Specify the skill to use"})}
144
- -a, --agent <agent> ${y("cli.help.use.flag.agent",{locale:t,fallback:"Start one supported agent interactively"})}
145
- --full-depth ${y("cli.help.use.flag.full_depth",{locale:t,fallback:"Search all subdirectories even when a root SKILL.md exists"})}
146
- --dangerously-accept-openclaw-risks
147
- ${y("cli.help.use.flag.openclaw_risks",{locale:t,fallback:"Allow unverified OpenClaw community skills"})}
148
-
149
- ${F}${y("cli.help.section.remove_options",{locale:t,fallback:"Remove Options"})}${i}:
150
- -g, --global ${y("cli.help.remove.flag.global",{locale:t,fallback:"Remove from global scope"})}
151
- -a, --agent <agents> ${y("cli.help.remove.flag.agent",{locale:t,fallback:"Remove from specific agents (use '*' for all agents)"})}
152
- -s, --skill <skills> ${y("cli.help.remove.flag.skill",{locale:t,fallback:"Specify skills to remove (use '*' for all skills)"})}
153
- -y, --yes ${y("cli.help.remove.flag.yes",{locale:t,fallback:"Skip confirmation prompts"})}
154
- --all ${y("cli.help.remove.flag.all",{locale:t,fallback:"Shorthand for --skill '*' --agent '*' -y"})}
155
-
156
- ${F}${y("cli.help.section.doctor_options",{locale:t,fallback:"Doctor Options"})}${i}:
157
- -g, --global ${y("cli.help.doctor.flag.global",{locale:t,fallback:"Check global scope only"})}
158
- -p, --project ${y("cli.help.doctor.flag.project",{locale:t,fallback:"Check project scope only"})}
159
- -a, --agent <agents> ${y("cli.help.doctor.flag.agent",{locale:t,fallback:"Check specific agents (use '*' for all)"})}
160
- -y, --yes ${y("cli.help.doctor.flag.yes",{locale:t,fallback:"Skip confirm; remove broken links directly"})}
161
- --all ${y("cli.help.doctor.flag.all",{locale:t,fallback:"Shorthand for --agent *"})}
162
-
163
- ${F}${y("cli.help.section.list_options",{locale:t,fallback:"List Options"})}${i}:
164
- -g, --global ${y("cli.help.list.flag.global",{locale:t,fallback:"List global skills (default: project)"})}
165
- -p, --project ${y("cli.help.list.flag.project",{locale:t,fallback:"List project skills only"})}
166
- -a, --agent <agents> ${y("cli.help.list.flag.agent",{locale:t,fallback:"Filter by specific agents (use '*' for all agents)"})}
167
- --json ${y("cli.help.list.flag.json",{locale:t,fallback:"Output as JSON (machine-readable, no ANSI codes)"})}
168
- --all ${y("cli.help.list.flag.all",{locale:t,fallback:"Shorthand for --agent *"})}
169
-
170
- ${F}${y("cli.help.section.find_options",{locale:t,fallback:"Find Options"})}${i}:
171
- --owner <owner> ${y("cli.help.find.flag.owner",{locale:t,fallback:"Search only repositories from a GitHub owner"})}
172
- --json Output as JSON (machine-readable, no ANSI codes)
173
-
174
- ${F}${y("cli.help.section.options",{locale:t,fallback:"Options"})}${i}:
175
- --help, -h Show this help message
176
- --version, -v Show version number
177
-
178
- ${F}Examples:${i}
179
- ${c}$${i} easbot-skills add houjallen/agent-skills ${s("cli.example.add","Add a skill package")}
180
- ${c}$${i} easbot-skills use houjallen/agent-skills@houjallen | claude ${s("cli.example.use","Use a skill one-shot")}
181
- ${c}$${i} easbot-skills use houjallen/agent-skills --skill houjallen --agent claude ${s("cli.example.use_with_agent","Specify skill + agent")}
182
- ${c}$${i} easbot-skills add houjallen/agent-skills -g ${s("cli.example.add_global","Install globally")}
183
- ${c}$${i} easbot-skills add houjallen/agent-skills --agent claude-code cursor ${s("cli.example.add_multi_agent","Install to multiple agents")}
184
- ${c}$${i} easbot-skills add houjallen/agent-skills --skill pr-review commit ${s("cli.example.add_multi_skill","Install multiple skills")}
185
- ${c}$${i} easbot-skills remove ${c}# ${s("cli.example.remove_interactive","Interactive remove")}${i}
186
- ${c}$${i} easbot-skills remove web-design ${c}# ${s("cli.example.remove_by_name","Remove by name")}${i}
187
- ${c}$${i} easbot-skills rm --global frontend-design
188
- ${c}$${i} easbot-skills list ${c}# ${s("cli.example.list_project","List project skills")}${i}
189
- ${c}$${i} easbot-skills ls -g ${c}# ${s("cli.example.list_global","List global skills")}${i}
190
- ${c}$${i} easbot-skills ls -a claude-code ${c}# ${s("cli.example.list_filter_agent","Filter by agent")}${i}
191
- ${c}$${i} easbot-skills ls --json ${c}# ${s("cli.example.list_json","JSON output")}${i}
192
- ${c}$${i} easbot-skills find ${c}# ${s("cli.example.find_interactive","Interactive search")}${i}
193
- ${c}$${i} easbot-skills find typescript ${c}# ${s("cli.example.find_keyword","Search by keyword")}${i}
194
- ${c}$${i} easbot-skills find react --owner houjallen ${c}# ${s("cli.example.find_owner","Search within an owner")}${i}
195
- ${c}$${i} easbot-skills update
196
- ${c}$${i} easbot-skills update my-skill ${c}# ${s("cli.example.update_one","Update a single skill")}${i}
197
- ${c}$${i} easbot-skills update -g ${c}# ${s("cli.example.update_global","Update global skills only")}${i}
198
- ${c}$${i} easbot-skills init my-skill ${c}# ${s("cli.example.init","Create a new skill")}${i}
199
- ${c}$${i} easbot-skills store list ${c}# ${s("cli.example.store_list","List store skills")}${i}
200
- ${c}$${i} easbot-skills store clean --force ${c}# ${s("cli.example.store_clean_force","Reset store + clear cache")}${i}
201
- ${c}$${i} easbot-skills doctor ${c}# ${s("cli.example.doctor","Check & cleanup dangling symlinks (interactive)")}${i}
202
- ${c}$${i} easbot-skills doctor -a easbot -y ${c}# ${s("cli.example.doctor_agent_yes","Check one agent + auto-cleanup")}${i}
203
-
204
- ${c}${y("cli.banner.discover",{locale:t,vars:{url:"https://skills.sh/"},fallback:"Discover more skills at https://skills.sh/"})}${i}
205
- `);}function Ai(e){let t=Qe(e);console.log(`
206
- ${F}${y("cli.help.doctor.usage",{locale:t,fallback:"Usage: easbot skills doctor [options]"})}${i}
207
-
208
- ${F}Description:${i}
209
- ${y("cli.help.doctor.description",{locale:t,fallback:"Check + cleanup dangling symlinks in agent baseDirs (scan only by default; use --yes to clean). Future: skill validation, llm review, etc."})}
210
-
211
- ${F}Scope (tri-state, same as list / update):${i}
212
- -g, --global ${y("cli.help.doctor.flag.global",{locale:t,fallback:"Check global scope only"})}
213
- -p, --project ${y("cli.help.doctor.flag.project",{locale:t,fallback:"Check project scope only"})}
214
- ${c}(default: both \u2014 scan project + global)${i}
215
-
216
- ${F}Filter:${i}
217
- -a, --agent <agents> ${y("cli.help.doctor.flag.agent",{locale:t,fallback:"Target agents (repeatable; use * for all)"})}
218
- --all ${y("cli.help.doctor.flag.all",{locale:t,fallback:"Shorthand for --agent *"})}
219
-
220
- ${F}Cleanup:${i}
221
- -y, --yes ${y("cli.help.doctor.flag.yes",{locale:t,fallback:"Skip confirm; unlink dangling symlinks directly"})}
222
- ${c}(TTY: confirm prompt; non-TTY: report only)${i}
223
-
224
- ${F}Examples:${i}
225
- ${c}$${i} easbot-skills doctor ${c}# ${y("cli.example.doctor",{locale:t,fallback:"Interactive check + cleanup"})}${i}
226
- ${c}$${i} easbot-skills doctor -a easbot -y ${c}# ${y("cli.example.doctor_agent_yes",{locale:t,fallback:"Check one agent + auto-cleanup"})}${i}
227
- ${c}$${i} easbot-skills dr -g ${c}# ${y("cli.example.doctor_global",{locale:t,fallback:"Check global scope only"})}${i}
228
- `);}function Ti(e){let t=Qe(e);console.log(`
229
- ${F}${y("cli.help.remove.usage",{locale:t,fallback:"Usage: easbot skills remove [skills...] [options]"})}${i}
230
-
231
- ${F}Description:${i}
232
- ${y("cli.help.remove.description",{locale:t,fallback:"Remove installed skills from agents. If no skill names are provided, an interactive selection menu will be shown."})}
233
-
234
- ${F}Arguments:${i}
235
- ${y("cli.help.remove.arguments",{locale:t,fallback:"skills Optional skill names to remove (space-separated)"})}
236
-
237
- ${F}Options:${i}
238
- -g, --global ${y("cli.help.remove.flag.global",{locale:t,fallback:"Remove from global scope (~/) instead of project scope"})}
239
- -a, --agent ${y("cli.help.remove.flag.agent",{locale:t,fallback:"Remove from specific agents (use '*' for all agents)"})}
240
- -s, --skill ${y("cli.help.remove.flag.skill",{locale:t,fallback:"Specify skills to remove (use '*' for all skills)"})}
241
- -y, --yes ${y("cli.help.remove.flag.yes",{locale:t,fallback:"Skip confirmation prompts"})}
242
- --all ${y("cli.help.remove.flag.all",{locale:t,fallback:"Shorthand for --skill '*' --agent '*' -y"})}
243
-
244
- ${F}Examples:${i}
245
- ${c}$${i} easbot-skills remove ${c}# ${y("cli.example.remove_interactive",{locale:t,fallback:"Interactive remove"})}${i}
246
- ${c}$${i} easbot-skills remove my-skill ${c}# ${y("cli.example.remove_by_name",{locale:t,fallback:"Remove by name"})}${i}
247
- ${c}$${i} easbot-skills remove skill1 skill2 -y ${c}# ${y("cli.example.remove_all",{locale:t,fallback:"Remove multiple skills"})}${i}
248
- ${c}$${i} easbot-skills remove --global my-skill ${c}# ${y("cli.example.remove_global",{locale:t,fallback:"Remove from global scope"})}${i}
249
- ${c}$${i} easbot-skills rm --agent claude-code my-skill ${c}# ${y("cli.example.remove_by_agent",{locale:t,fallback:"Remove from specific agent"})}${i}
250
- ${c}$${i} easbot-skills remove --all ${c}# ${y("cli.example.remove_all",{locale:t,fallback:"Remove all skills"})}${i}
251
- ${c}$${i} easbot-skills remove --skill '*' -a cursor ${c}# ${y("cli.example.remove_agent_all",{locale:t,fallback:"Remove all skills from one agent"})}${i}
252
-
253
- ${c}${y("cli.banner.discover",{locale:t,vars:{url:"https://skills.sh/"},fallback:"Discover more skills at https://skills.sh/"})}${i}
254
- `);}function ml(){console.log();}function Ii(e,t){let s=Qe(t),l=t?.cwd??chunkXGUPIAAF_cjs.p()??process.cwd(),n=e[0]||path.basename(l),o=e[0]!==void 0,r=o?path.join(l,n):l,g=path.join(r,"SKILL.md"),d=o?`${n}/SKILL.md`:"SKILL.md";if(fs$1.existsSync(g))return console.log(`${M}${y("cli.init.exists",{locale:s,vars:{path:d},fallback:`Skill already exists at ${d}`})}${i}`),0;o&&fs$1.mkdirSync(r,{recursive:true});let u=zs(s,n);return fs$1.writeFileSync(g,u),console.log(`${M}${y("cli.init.created",{locale:s,vars:{name:n},fallback:`Initialized skill: ${n}`})}${i}`),console.log(),console.log(`${c}${y("cli.init.created_label",{locale:s,fallback:"Created"})}${i}:`),console.log(` ${d}`),console.log(),console.log(`${c}${y("cli.init.next.title",{locale:s,fallback:"Next steps"})}${i}:`),console.log(` 1. ${y("cli.init.next.edit",{locale:s,vars:{path:d},fallback:`Edit ${d} to define your skill instructions`})}`),console.log(` 2. ${y("cli.init.next.frontmatter",{locale:s,fallback:"Update the name and description in the frontmatter"})}`),console.log(),console.log(`${c}${y("cli.init.publish.title",{locale:s,fallback:"Publishing"})}${i}:`),console.log(` ${c}GitHub:${i} ${y("cli.init.publish.github",{locale:s,vars:{cmd:"easbot skills"},fallback:"Push to a repo, then easbot skills add <owner>/<repo>"})}`),console.log(` ${c}URL:${i} ${y("cli.init.publish.url",{locale:s,vars:{cmd:"easbot skills",path:d},fallback:"Host the file, then easbot skills add https://example.com/"+d})}`),console.log(),console.log(`${c}${y("cli.init.browse_hint",{locale:s,vars:{url:"https://skills.sh/"},fallback:"Browse existing skills for inspiration at https://skills.sh/"})}${i}`),console.log(),0}async function Zc(e,t){vi(t?.version);let s=t?.inAgent??await At();if(e.length===0)return s||xi(t),{code:0,handled:false};let l=e[0],n=e.slice(1);switch(l){case "find":case "search":case "f":case "s":return s||ml(),console.log(),{code:await ws(n),handled:true,command:l};case "init":return s||ml(),console.log(),{code:Ii(n,t),handled:true,command:l};case "a":case "add":{s||ml();let{source:o,options:r}=_t(n);return await it(o,r),{code:0,handled:true,command:l}}case "use":{let{source:o,options:r,errors:g}=Ds(n);return await Us(o,r,g),{code:0,handled:true,command:l}}case "remove":case "rm":case "r":{if(n.includes("--help")||n.includes("-h"))return Ti(t),{code:0,handled:true,command:l};let{skills:o,options:r}=Is(n);return await Ts(o,r),{code:0,handled:true,command:l}}case "list":case "ls":return await vs(n,{cwd:t?.cwd}),{code:0,handled:true,command:l};case "doctor":case "dr":return n.includes("--help")||n.includes("-h")?(Ai(t),{code:0,handled:true,command:l}):(await Ls(n,t?.cwd?{cwd:t.cwd}:void 0),{code:0,handled:true,command:l});case "check":case "update":case "upgrade":return await ss(n,{cwd:t?.cwd}),{code:0,handled:true,command:l};case "store":return {code:await ks(n),handled:true,command:l};default:{let o=Qe(t);return console.log(y("cli.unknown_command",{locale:o,vars:{command:l??""},fallback:`Unknown command: ${l}`})),console.log(y("cli.help_hint",{locale:o,vars:{cmd:"skills"},fallback:"Run skills --help for usage."})),{code:1,handled:true,command:l}}}}
255
- exports.A=Oo;exports.B=vs;exports.C=Ts;exports.D=Is;exports.E=Ls;exports.F=Ds;exports.G=ti;exports.H=li;exports.I=Us;exports.J=si;exports.K=xi;exports.L=Xc;exports.M=Zc;exports.a=Zt;exports.b=Gl;exports.c=Wl;exports.d=Hl;exports.e=el;exports.f=Ye;exports.g=At;exports.h=Zi;exports.i=zl;exports.j=vn;exports.k=Pr;exports.l=xn;exports.m=es;exports.n=ss;exports.o=cs;exports.p=it;exports.q=_t;exports.r=oo;exports.s=ks;exports.t=ro;exports.u=co;exports.v=go;exports.w=mo;exports.x=So;exports.y=Ss;exports.z=ws;
@@ -1,3 +0,0 @@
1
- 'use strict';var chunkJFEBB5CL_cjs=require('./chunk-JFEBB5CL.cjs'),chunkXGUPIAAF_cjs=require('./chunk-XGUPIAAF.cjs'),promises=require('fs/promises'),path=require('path'),crypto=require('crypto'),child_process=require('child_process'),n=require('picocolors');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var n__default=/*#__PURE__*/_interopDefault(n);var x=".skill-lock.json",d=6;function m(){return path.join(chunkXGUPIAAF_cjs.m(),"skills",x)}async function o(){let t=m();return await E(t)??F()}async function E(t){try{let i=await promises.readFile(t,"utf-8"),e=JSON.parse(i);return typeof e.version!="number"||!e.skills||e.version<d?null:e}catch{return null}}async function c(t){let i=m();await promises.mkdir(path.dirname(i),{recursive:true});let e=JSON.stringify(t,null,2);await promises.writeFile(i,e,"utf-8");}function R(t){return crypto.createHash("sha256").update(t,"utf-8").digest("hex")}var l=false;function _(){l=false;}function D(){if(process.env.GITHUB_TOKEN)return process.env.GITHUB_TOKEN;if(process.env.GH_TOKEN)return process.env.GH_TOKEN;l||(process.stderr.write(`${n__default.default.yellow("\u2502")} ${n__default.default.yellow("GitHub rate limit reached")} \u2014 using your ${n__default.default.cyan("gh")} login to continue.
2
- ${n__default.default.yellow("\u2502")} ${n__default.default.dim(`Tip: set ${n__default.default.cyan("GITHUB_TOKEN")} to avoid this prompt, or use ${n__default.default.cyan("--full-depth")} to clone instead.
3
- `)}`),l=true);try{let t=child_process.execSync("gh auth token",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();if(t)return t}catch{}return null}async function $(t,i,e,r){let{fetchRepoTree:s,getSkillFolderHashFromTree:f}=await import('./blob-DOVEGVIE.cjs'),a=await s(t,r,e??void 0);return a?f(a,i):null}async function K(t,i){let e=await o(),r=new Date().toISOString(),s=e.skills[t];e.skills[t]={...i,installedAt:s?.installedAt??r,updatedAt:r},await c(e);}async function B(t){let i=await o();return t in i.skills?(delete i.skills[t],await c(i),true):false}async function U(t){return (await o()).skills[t]??null}async function j(){return (await o()).skills}async function C(){let t=await o(),i=new Map;for(let[e,r]of Object.entries(t.skills)){let s=i.get(r.source);s?s.skills.push(e):i.set(r.source,{skills:[e],entry:r});}return i}function F(){return {version:d,skills:{},dismissed:{}}}async function J(t){return (await o()).dismissed?.[t]===true}function M(t,i){return t?chunkJFEBB5CL_cjs.p(t,chunkJFEBB5CL_cjs.K(),i):null}async function W(t){let i=await o();i.dismissed||(i.dismissed={}),i.dismissed[t]=true,await c(i);}exports.a=d;exports.b=m;exports.c=o;exports.d=c;exports.e=R;exports.f=_;exports.g=D;exports.h=$;exports.i=K;exports.j=B;exports.k=U;exports.l=j;exports.m=C;exports.n=J;exports.o=M;exports.p=W;