@ichintansoni/skills-master 0.1.17 → 0.1.19
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.
- package/dist/bin.js +24 -3
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
|
-
var version = "0.1.
|
|
7
|
+
var version = "0.1.19";
|
|
8
8
|
|
|
9
9
|
// src/schema/projectConfig.ts
|
|
10
10
|
import { z } from "zod";
|
|
@@ -72,6 +72,11 @@ import YAML from "yaml";
|
|
|
72
72
|
function toYaml(obj) {
|
|
73
73
|
return YAML.stringify(obj, { lineWidth: 0 }).trimEnd();
|
|
74
74
|
}
|
|
75
|
+
function quoted(value) {
|
|
76
|
+
const node = new YAML.Scalar(value);
|
|
77
|
+
node.type = "QUOTE_DOUBLE";
|
|
78
|
+
return node;
|
|
79
|
+
}
|
|
75
80
|
function frontmatterBlock(obj) {
|
|
76
81
|
return `---
|
|
77
82
|
${toYaml(obj)}
|
|
@@ -167,7 +172,12 @@ var claudeEmitter = {
|
|
|
167
172
|
const note = stabilityNote(xm.stability, xm.snapshot_date);
|
|
168
173
|
const fm = {
|
|
169
174
|
name: skill.frontmatter.name,
|
|
170
|
-
description: skill.frontmatter.description
|
|
175
|
+
description: skill.frontmatter.description,
|
|
176
|
+
...skill.frontmatter.license ? { license: skill.frontmatter.license } : {},
|
|
177
|
+
metadata: {
|
|
178
|
+
version: quoted(xm.version),
|
|
179
|
+
"snapshot-date": quoted(xm.snapshot_date)
|
|
180
|
+
}
|
|
171
181
|
};
|
|
172
182
|
const files = [
|
|
173
183
|
{
|
|
@@ -564,6 +574,13 @@ var GlobsSchema = z4.union([z4.string(), z4.array(z4.string())]).transform((g) =
|
|
|
564
574
|
var FrontmatterSchema = z4.looseObject({
|
|
565
575
|
name: SkillNameSchema,
|
|
566
576
|
description: z4.string().min(1, "description is required").max(1024, "description must be <= 1024 characters"),
|
|
577
|
+
/**
|
|
578
|
+
* Spec field, projected verbatim onto the Claude target. Authored per skill
|
|
579
|
+
* rather than stamped by the emitter: an emitter cannot know the license of
|
|
580
|
+
* whatever content root it was pointed at, and inventing one would be a
|
|
581
|
+
* false claim about someone else's work.
|
|
582
|
+
*/
|
|
583
|
+
license: z4.string().min(1, "license must be a non-empty string").optional(),
|
|
567
584
|
globs: GlobsSchema,
|
|
568
585
|
tags: z4.array(z4.string()).default([]),
|
|
569
586
|
"x-skills-master": XSkillsMasterSchema
|
|
@@ -1776,6 +1793,9 @@ function lintSkills(skillsRoot) {
|
|
|
1776
1793
|
if (!/use when/i.test(fm.description)) {
|
|
1777
1794
|
push("warn", `description should include a "Use when ..." trigger clause`);
|
|
1778
1795
|
}
|
|
1796
|
+
if (fm.license == null) {
|
|
1797
|
+
push("warn", `no license \u2014 add a "license" field (this library uses MIT)`);
|
|
1798
|
+
}
|
|
1779
1799
|
const tagAt = fm.description.search(XML_TAG_RE);
|
|
1780
1800
|
if (tagAt !== -1) {
|
|
1781
1801
|
const end = fm.description.indexOf(">", tagAt);
|
|
@@ -2072,7 +2092,8 @@ function template(domain, cls, category, name) {
|
|
|
2072
2092
|
const today2 = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
2073
2093
|
return `---
|
|
2074
2094
|
name: ${name}
|
|
2075
|
-
description: TODO \u2014 one-line, third person. Use when
|
|
2095
|
+
description: TODO \u2014 one-line, third person. Use when the triggers go here.
|
|
2096
|
+
license: MIT
|
|
2076
2097
|
globs:
|
|
2077
2098
|
- "**/*"
|
|
2078
2099
|
tags: []
|
package/package.json
CHANGED