luckiest-co 1.0.37 → 1.0.38
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/bin/install.js +26 -5
- package/package.json +1 -1
- /package/skills/{luckiest-charms → charms}/SKILL.md +0 -0
- /package/skills/{luckiest-finish → finish}/SKILL.md +0 -0
- /package/skills/{luckiest-go → go}/SKILL.md +0 -0
- /package/skills/{luckiest-helpers → helpers}/SKILL.md +0 -0
- /package/skills/{luckiest-home → home}/SKILL.md +0 -0
- /package/skills/{luckiest-leaderboard → leaderboard}/SKILL.md +0 -0
- /package/skills/{luckiest-merge → merge}/SKILL.md +0 -0
- /package/skills/{luckiest-next → next}/SKILL.md +0 -0
- /package/skills/{luckiest-overlaps → overlaps}/SKILL.md +0 -0
- /package/skills/{luckiest-plan → plan}/SKILL.md +0 -0
- /package/skills/{luckiest-skills → skills}/SKILL.md +0 -0
- /package/skills/{luckiest-start → start}/SKILL.md +0 -0
- /package/skills/{luckiest-status → status}/SKILL.md +0 -0
- /package/skills/{luckiest-updates → updates}/SKILL.md +0 -0
- /package/skills/{luckiest-vouch → vouch}/SKILL.md +0 -0
- /package/skills/{luckiest-wishes → wishes}/SKILL.md +0 -0
package/bin/install.js
CHANGED
|
@@ -135,6 +135,27 @@ function copyWithPathReplacement(srcDir, destDir, pathPrefix) {
|
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
// The plan/go/finish skills live in short folders (skills/plan) so the plugin
|
|
139
|
+
// menu shows /luckiest:plan with no folder alias. Outside the plugin there is
|
|
140
|
+
// no namespace, so they go to ~/.claude/skills as luckiest-plan instead of a
|
|
141
|
+
// bare plan that could overwrite or clash with the user's own skills.
|
|
142
|
+
const COMMAND_SKILLS = new Set(['plan', 'go', 'finish', 'next', 'status', 'home', 'start', 'charms',
|
|
143
|
+
'helpers', 'leaderboard', 'merge', 'overlaps', 'skills', 'updates', 'vouch', 'wishes']);
|
|
144
|
+
const homeName = (folder) => (COMMAND_SKILLS.has(folder) ? `luckiest-${folder}` : folder);
|
|
145
|
+
|
|
146
|
+
/** Copy each plugin skill folder into skillsRoot under its home name, then fix its name line. */
|
|
147
|
+
function copySkills(srcDir, skillsRoot, pathPrefix) {
|
|
148
|
+
const placed = [];
|
|
149
|
+
for (const folder of fs.readdirSync(srcDir)) {
|
|
150
|
+
if (!fs.statSync(path.join(srcDir, folder)).isDirectory()) continue;
|
|
151
|
+
const dest = homeName(folder);
|
|
152
|
+
copyWithPathReplacement(path.join(srcDir, folder), path.join(skillsRoot, dest), pathPrefix);
|
|
153
|
+
placed.push(dest);
|
|
154
|
+
}
|
|
155
|
+
restoreSkillNames(skillsRoot, placed);
|
|
156
|
+
return placed;
|
|
157
|
+
}
|
|
158
|
+
|
|
138
159
|
/**
|
|
139
160
|
* Plugin skills carry short names (name: ads) so the plugin menu shows
|
|
140
161
|
* /luckiest:ads. A copy in ~/.claude/skills has no namespace, so a bare /ads
|
|
@@ -264,7 +285,7 @@ function pluginSkillNames(globalClaudeDir) {
|
|
|
264
285
|
// A desktop plugin has no folder to read; it ships the same skills as this package.
|
|
265
286
|
if (desktopPlugin(globalClaudeDir)) {
|
|
266
287
|
const own = path.join(__dirname, '..', 'skills');
|
|
267
|
-
if (fs.existsSync(own)) fs.readdirSync(own).forEach((n) => names.add(n));
|
|
288
|
+
if (fs.existsSync(own)) fs.readdirSync(own).forEach((n) => names.add(homeName(n)));
|
|
268
289
|
}
|
|
269
290
|
try {
|
|
270
291
|
const manifest = JSON.parse(
|
|
@@ -274,7 +295,7 @@ function pluginSkillNames(globalClaudeDir) {
|
|
|
274
295
|
if (!key.startsWith('luckiest@')) continue;
|
|
275
296
|
for (const item of Array.isArray(value) ? value : [value]) {
|
|
276
297
|
const dir = item && item.installPath && path.join(item.installPath, 'skills');
|
|
277
|
-
if (dir && fs.existsSync(dir)) fs.readdirSync(dir).forEach((n) => names.add(n));
|
|
298
|
+
if (dir && fs.existsSync(dir)) fs.readdirSync(dir).forEach((n) => names.add(homeName(n)));
|
|
278
299
|
}
|
|
279
300
|
}
|
|
280
301
|
} catch {
|
|
@@ -536,8 +557,8 @@ function install(isGlobal) {
|
|
|
536
557
|
const dirSrc = path.join(src, dir);
|
|
537
558
|
const dirDest = path.join(claudeDir, dir);
|
|
538
559
|
if (fs.existsSync(dirSrc)) {
|
|
539
|
-
|
|
540
|
-
|
|
560
|
+
if (dir === 'skills') copySkills(dirSrc, dirDest, pathPrefix);
|
|
561
|
+
else copyWithPathReplacement(dirSrc, dirDest, pathPrefix);
|
|
541
562
|
console.log(` ${green}✓${reset} Installed ${dir}`);
|
|
542
563
|
}
|
|
543
564
|
}
|
|
@@ -822,4 +843,4 @@ if (require.main === module) {
|
|
|
822
843
|
});
|
|
823
844
|
}
|
|
824
845
|
|
|
825
|
-
module.exports = { placeSkills, dropPluginDuplicates, restoreSkillNames, hasMarketplacePlugin, pluginSkillNames };
|
|
846
|
+
module.exports = { placeSkills, dropPluginDuplicates, restoreSkillNames, hasMarketplacePlugin, pluginSkillNames, copySkills, homeName };
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|