@stacksjs/skills 0.70.84 → 0.70.85

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 (2) hide show
  1. package/dist/index.js +1 -2
  2. package/package.json +5 -4
package/dist/index.js CHANGED
@@ -1,3 +1,2 @@
1
1
  // @bun
2
- import{join as s,resolve as k}from"@stacksjs/path";import{existsSync as r,readFileSync as f,readdirSync as d,statSync as h}from"fs";var o=k(s(import.meta.dir,"..","..","..","..","..",".claude","skills"));function p(n){let t=n.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);if(!t)return{metadata:{name:"",description:""},body:n};let[,i,a]=t,l={};for(let e of(i??"").split(`
3
- `)){let c=e.indexOf(":");if(c===-1)continue;let u=e.slice(0,c).trim(),m=e.slice(c+1).trim();l[u]=m}return{metadata:l,body:a??""}}function y(){if(!r(o))return[];return d(o).filter((n)=>{let t=s(o,n);return h(t).isDirectory()&&r(s(t,"SKILL.md"))})}function S(n){let t=s(o,n,"SKILL.md");if(!r(t))return null;let i=f(t,"utf-8"),{metadata:a,body:l}=p(i),e=s(o,n),c=r(s(e,"scripts"))?d(s(e,"scripts")):[],u=r(s(e,"references"))?d(s(e,"references")):[],m=r(s(e,"assets"))?d(s(e,"assets")):[];return{metadata:a,instructions:l,path:t,scripts:c,references:u,assets:m}}function g(n){return S(n)?.metadata??null}function b(n){let t=[],i=s(o,n);if(!r(i))return t.push(`Skill directory not found: ${i}`),{valid:!1,errors:t};let a=s(i,"SKILL.md");if(!r(a))return t.push(`SKILL.md not found in ${i}`),{valid:!1,errors:t};let l=f(a,"utf-8"),{metadata:e}=p(l);if(!e.name)t.push("Missing required field: name");else{if(e.name.length>64)t.push("Name must be 1-64 characters");if(!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(e.name))t.push("Name must be lowercase letters, numbers, and hyphens only");if(e.name!==n)t.push(`Name "${e.name}" must match directory name "${n}"`)}if(!e.description)t.push("Missing required field: description");else if(e.description.length>1024)t.push("Description must be 1-1024 characters");return{valid:t.length===0,errors:t}}export{b as validateSkill,g as loadSkillMetadata,y as listSkills,S as getSkill};
2
+ export{e as validateSkill,k as loadSkillMetadata,a as listSkills,i as getSkill};
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@stacksjs/skills",
3
3
  "type": "module",
4
- "version": "0.70.84",
4
+ "sideEffects": false,
5
+ "version": "0.70.85",
5
6
  "description": "Agent skills for the Stacks framework, following the agentskills.io standard.",
6
7
  "author": "Chris Breuer",
7
8
  "contributors": [
@@ -53,11 +54,11 @@
53
54
  "prepublishOnly": "bun run build"
54
55
  },
55
56
  "dependencies": {
56
- "@stacksjs/path": "0.70.84",
57
- "@stacksjs/storage": "0.70.84"
57
+ "@stacksjs/path": "0.70.85",
58
+ "@stacksjs/storage": "0.70.85"
58
59
  },
59
60
  "devDependencies": {
60
61
  "better-dx": "^0.2.16",
61
- "@stacksjs/types": "0.70.84"
62
+ "@stacksjs/types": "0.70.85"
62
63
  }
63
64
  }