@csark0812/skeleton 1.5.1 → 1.5.3
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/README.md +51 -36
- package/dist/cli.js +605 -293
- package/dist/hooks/customize-on-skill-read.js +11 -14
- package/package.json +1 -1
- package/schemas/config.schema.json +22 -0
- package/templates/skeleton-init/config.yaml +6 -0
|
@@ -13552,7 +13552,7 @@ function resolveCustomizeFromRoot(slug, startDir) {
|
|
|
13552
13552
|
return resolveCustomize(root, slug);
|
|
13553
13553
|
}
|
|
13554
13554
|
|
|
13555
|
-
// src/hooks/
|
|
13555
|
+
// src/hooks/run.ts
|
|
13556
13556
|
function parsePayload(raw) {
|
|
13557
13557
|
if (!raw.trim())
|
|
13558
13558
|
return {};
|
|
@@ -13611,20 +13611,15 @@ function formatResponse(payload, content) {
|
|
|
13611
13611
|
return claudeResponse(content);
|
|
13612
13612
|
return cursorResponse(content);
|
|
13613
13613
|
}
|
|
13614
|
-
function
|
|
13614
|
+
function runCustomizeHook(raw) {
|
|
13615
13615
|
try {
|
|
13616
|
-
const raw = readFileSync4(0, "utf8");
|
|
13617
13616
|
const payload = parsePayload(raw);
|
|
13618
13617
|
const slug = extractSkillSlug(payload);
|
|
13619
|
-
if (!slug)
|
|
13620
|
-
|
|
13621
|
-
return;
|
|
13622
|
-
}
|
|
13618
|
+
if (!slug)
|
|
13619
|
+
return "{}";
|
|
13623
13620
|
const resolved = resolveCustomizeFromRoot(slug);
|
|
13624
|
-
if (!resolved.content)
|
|
13625
|
-
|
|
13626
|
-
return;
|
|
13627
|
-
}
|
|
13621
|
+
if (!resolved.content)
|
|
13622
|
+
return "{}";
|
|
13628
13623
|
const from = resolved.included.length > 0 ? resolved.included.join(", ") : resolved.path ?? ".skeleton/customize";
|
|
13629
13624
|
const prefix = `
|
|
13630
13625
|
|
|
@@ -13632,10 +13627,12 @@ function main() {
|
|
|
13632
13627
|
Customize override for /${slug} (from ${from}):
|
|
13633
13628
|
|
|
13634
13629
|
`;
|
|
13635
|
-
|
|
13630
|
+
return formatResponse(payload, prefix + resolved.content);
|
|
13636
13631
|
} catch (error) {
|
|
13637
13632
|
console.error(`customize hook error: ${error}`);
|
|
13638
|
-
|
|
13633
|
+
return "{}";
|
|
13639
13634
|
}
|
|
13640
13635
|
}
|
|
13641
|
-
|
|
13636
|
+
|
|
13637
|
+
// src/hooks/customize-on-skill-read.ts
|
|
13638
|
+
process.stdout.write(runCustomizeHook(readFileSync4(0, "utf8")));
|
package/package.json
CHANGED
|
@@ -55,6 +55,28 @@
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
|
+
"skillOwnership": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"additionalProperties": false,
|
|
61
|
+
"description": "Provenance-aware skill body linting: foreign (synced) skills are skipped; owned local skills and .skeleton/customize stay audited",
|
|
62
|
+
"properties": {
|
|
63
|
+
"lockfile": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"minLength": 1,
|
|
66
|
+
"description": "Repo-relative skills lock path (default: skills-lock.json)"
|
|
67
|
+
},
|
|
68
|
+
"ownedSlugs": {
|
|
69
|
+
"type": "array",
|
|
70
|
+
"items": { "type": "string", "pattern": "^[a-z0-9-]+$" },
|
|
71
|
+
"description": "Force these skill slugs to be treated as owned (lint here) even when the lockfile marks them foreign"
|
|
72
|
+
},
|
|
73
|
+
"foreignSlugs": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": { "type": "string", "pattern": "^[a-z0-9-]+$" },
|
|
76
|
+
"description": "Force these skill slugs to be treated as foreign (skip body lint) even when absent from the lockfile"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
58
80
|
"plugins": {
|
|
59
81
|
"type": "array",
|
|
60
82
|
"items": { "type": "string", "minLength": 1 },
|
|
@@ -18,6 +18,12 @@ daysUntilStale: 180
|
|
|
18
18
|
# alwaysInclude:
|
|
19
19
|
# - shared-agent-references.md
|
|
20
20
|
|
|
21
|
+
# Optional: skill body ownership (skills-lock.json github entries are foreign by default)
|
|
22
|
+
# skillOwnership:
|
|
23
|
+
# lockfile: skills-lock.json
|
|
24
|
+
# ownedSlugs: []
|
|
25
|
+
# foreignSlugs: []
|
|
26
|
+
|
|
21
27
|
# Optional: plugin `.ts` entries relative to .skeleton/ (built sibling `.mjs` required)
|
|
22
28
|
# plugins: []
|
|
23
29
|
# Optional: draft-marker allow-list prefixes (plus `_draft-*.md` filenames)
|