next-issue 17.0.0 → 17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/skills.mjs +23 -1
- package/package.json +1 -1
package/dist/cli/skills.mjs
CHANGED
|
@@ -87,6 +87,22 @@ async function skillHash(folder) {
|
|
|
87
87
|
}
|
|
88
88
|
return hash.digest('hex');
|
|
89
89
|
}
|
|
90
|
+
async function isOwnSkill(folder) {
|
|
91
|
+
let text;
|
|
92
|
+
try {
|
|
93
|
+
text = await readFile(join(folder, 'SKILL.md'), 'utf8');
|
|
94
|
+
}
|
|
95
|
+
catch (error) {
|
|
96
|
+
if (hasCode(error, 'ENOENT')) {
|
|
97
|
+
return false;
|
|
98
|
+
}
|
|
99
|
+
throw error;
|
|
100
|
+
}
|
|
101
|
+
const frontmatter = /^---\r?\n([\s\S]*?)\r?\n---/.exec(text)?.[1] ?? '';
|
|
102
|
+
return frontmatter
|
|
103
|
+
.split(/\r?\n/)
|
|
104
|
+
.some((line) => line.startsWith('description:') && line.includes('next-issue'));
|
|
105
|
+
}
|
|
90
106
|
export async function refreshSkills(root) {
|
|
91
107
|
const folders = [
|
|
92
108
|
...new Set([join(homedir(), '.claude', 'skills'), join(root, '.claude', 'skills')]),
|
|
@@ -101,9 +117,15 @@ export async function refreshSkills(root) {
|
|
|
101
117
|
continue;
|
|
102
118
|
}
|
|
103
119
|
installed = true;
|
|
104
|
-
if (hash
|
|
120
|
+
if (hash === shipped) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (await isOwnSkill(join(folder, name))) {
|
|
105
124
|
notes.push(`updated ${await replaceSkill(folder, name)}`);
|
|
106
125
|
}
|
|
126
|
+
else {
|
|
127
|
+
notes.push(`kept ${join(folder, name)}: not a next-issue skill`);
|
|
128
|
+
}
|
|
107
129
|
}
|
|
108
130
|
if (!installed) {
|
|
109
131
|
notes.push(`wrote ${await replaceSkill(join(root, '.claude', 'skills'), name)}`);
|