claudeskill-cli 1.0.0 → 1.0.2
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/index.js +71 -91
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7625,12 +7625,12 @@ var init_dist2 = __esm(() => {
|
|
|
7625
7625
|
|
|
7626
7626
|
// src/types/kit.ts
|
|
7627
7627
|
function isValidKitType(value) {
|
|
7628
|
-
return value === "engineer"
|
|
7628
|
+
return value === "engineer";
|
|
7629
7629
|
}
|
|
7630
7630
|
var KitType, KitConfigSchema, AVAILABLE_KITS, NEVER_COPY_PATTERNS, USER_CONFIG_PATTERNS, PROTECTED_PATTERNS;
|
|
7631
7631
|
var init_kit = __esm(() => {
|
|
7632
7632
|
init_zod();
|
|
7633
|
-
KitType = exports_external.enum(["engineer"
|
|
7633
|
+
KitType = exports_external.enum(["engineer"]);
|
|
7634
7634
|
KitConfigSchema = exports_external.object({
|
|
7635
7635
|
name: exports_external.string(),
|
|
7636
7636
|
repo: exports_external.string(),
|
|
@@ -7641,14 +7641,8 @@ var init_kit = __esm(() => {
|
|
|
7641
7641
|
engineer: {
|
|
7642
7642
|
name: "ClaudeSkill Engineer",
|
|
7643
7643
|
repo: "claudeskill-engineer",
|
|
7644
|
-
owner: "
|
|
7644
|
+
owner: "luan-thnh",
|
|
7645
7645
|
description: "Engineering toolkit for building with Claude"
|
|
7646
|
-
},
|
|
7647
|
-
marketing: {
|
|
7648
|
-
name: "ClaudeSkill Marketing",
|
|
7649
|
-
repo: "claudeskill-marketing",
|
|
7650
|
-
owner: "claudeskill",
|
|
7651
|
-
description: "Marketing automation toolkit for Claude"
|
|
7652
7646
|
}
|
|
7653
7647
|
};
|
|
7654
7648
|
NEVER_COPY_PATTERNS = [
|
|
@@ -7674,7 +7668,7 @@ var init_kit = __esm(() => {
|
|
|
7674
7668
|
".repomixignore",
|
|
7675
7669
|
".mcp.json",
|
|
7676
7670
|
".ckignore",
|
|
7677
|
-
".
|
|
7671
|
+
".cs.json",
|
|
7678
7672
|
"CLAUDE.md"
|
|
7679
7673
|
];
|
|
7680
7674
|
PROTECTED_PATTERNS = [...NEVER_COPY_PATTERNS, ...USER_CONFIG_PATTERNS];
|
|
@@ -17685,7 +17679,7 @@ var init_new_command_help = __esm(() => {
|
|
|
17685
17679
|
},
|
|
17686
17680
|
{
|
|
17687
17681
|
flags: "--prefix",
|
|
17688
|
-
description: "Add /
|
|
17682
|
+
description: "Add /cs: prefix to all slash commands"
|
|
17689
17683
|
}
|
|
17690
17684
|
]
|
|
17691
17685
|
},
|
|
@@ -17790,7 +17784,7 @@ var init_init_command_help = __esm(() => {
|
|
|
17790
17784
|
},
|
|
17791
17785
|
{
|
|
17792
17786
|
flags: "--prefix",
|
|
17793
|
-
description: "Add /
|
|
17787
|
+
description: "Add /cs: prefix to all slash commands"
|
|
17794
17788
|
},
|
|
17795
17789
|
{
|
|
17796
17790
|
flags: "--skip-setup",
|
|
@@ -20122,7 +20116,7 @@ function checkGlobalInstall(setup) {
|
|
|
20122
20116
|
const kitName = metadata?.name || "ClaudeSkill";
|
|
20123
20117
|
const version = formatVersion(metadata?.version);
|
|
20124
20118
|
return {
|
|
20125
|
-
id: "
|
|
20119
|
+
id: "cs-global-install",
|
|
20126
20120
|
name: "Global CK",
|
|
20127
20121
|
group: "claudeskill",
|
|
20128
20122
|
priority: "critical",
|
|
@@ -20139,7 +20133,7 @@ function checkProjectInstall(setup) {
|
|
|
20139
20133
|
const kitName = metadata?.name || "ClaudeSkill";
|
|
20140
20134
|
const version = formatVersion(metadata?.version);
|
|
20141
20135
|
return {
|
|
20142
|
-
id: "
|
|
20136
|
+
id: "cs-project-install",
|
|
20143
20137
|
name: "Project CK",
|
|
20144
20138
|
group: "claudeskill",
|
|
20145
20139
|
priority: "standard",
|
|
@@ -20536,7 +20530,7 @@ async function checkCliInstallMethod() {
|
|
|
20536
20530
|
const pmVersion = await PackageManagerDetector.getVersion(pm);
|
|
20537
20531
|
const displayName = PackageManagerDetector.getDisplayName(pm);
|
|
20538
20532
|
return {
|
|
20539
|
-
id: "
|
|
20533
|
+
id: "cs-cli-install-method",
|
|
20540
20534
|
name: "CLI Installed Via",
|
|
20541
20535
|
group: "claudeskill",
|
|
20542
20536
|
priority: "standard",
|
|
@@ -20619,7 +20613,7 @@ function checkActivePlan(projectDir) {
|
|
|
20619
20613
|
const activePlanPath = join5(projectDir, ".claude", "active-plan");
|
|
20620
20614
|
if (!existsSync5(activePlanPath)) {
|
|
20621
20615
|
return {
|
|
20622
|
-
id: "
|
|
20616
|
+
id: "cs-active-plan",
|
|
20623
20617
|
name: "Active Plan",
|
|
20624
20618
|
group: "claudeskill",
|
|
20625
20619
|
priority: "standard",
|
|
@@ -20633,7 +20627,7 @@ function checkActivePlan(projectDir) {
|
|
|
20633
20627
|
const fullPath = join5(projectDir, targetPath);
|
|
20634
20628
|
if (!existsSync5(fullPath)) {
|
|
20635
20629
|
return {
|
|
20636
|
-
id: "
|
|
20630
|
+
id: "cs-active-plan",
|
|
20637
20631
|
name: "Active Plan",
|
|
20638
20632
|
group: "claudeskill",
|
|
20639
20633
|
priority: "standard",
|
|
@@ -20645,7 +20639,7 @@ function checkActivePlan(projectDir) {
|
|
|
20645
20639
|
};
|
|
20646
20640
|
}
|
|
20647
20641
|
return {
|
|
20648
|
-
id: "
|
|
20642
|
+
id: "cs-active-plan",
|
|
20649
20643
|
name: "Active Plan",
|
|
20650
20644
|
group: "claudeskill",
|
|
20651
20645
|
priority: "standard",
|
|
@@ -20655,7 +20649,7 @@ function checkActivePlan(projectDir) {
|
|
|
20655
20649
|
};
|
|
20656
20650
|
} catch {
|
|
20657
20651
|
return {
|
|
20658
|
-
id: "
|
|
20652
|
+
id: "cs-active-plan",
|
|
20659
20653
|
name: "Active Plan",
|
|
20660
20654
|
group: "claudeskill",
|
|
20661
20655
|
priority: "standard",
|
|
@@ -20677,7 +20671,7 @@ function checkSkillsScripts(setup) {
|
|
|
20677
20671
|
const globalScriptPath = join6(setup.global.path, "skills", scriptName);
|
|
20678
20672
|
const hasGlobalScript = existsSync6(globalScriptPath);
|
|
20679
20673
|
results.push({
|
|
20680
|
-
id: "
|
|
20674
|
+
id: "cs-global-skills-script",
|
|
20681
20675
|
name: "Global Skills Script",
|
|
20682
20676
|
group: "claudeskill",
|
|
20683
20677
|
priority: "standard",
|
|
@@ -20692,7 +20686,7 @@ function checkSkillsScripts(setup) {
|
|
|
20692
20686
|
const projectScriptPath = join6(setup.project.path, "skills", scriptName);
|
|
20693
20687
|
const hasProjectScript = existsSync6(projectScriptPath);
|
|
20694
20688
|
results.push({
|
|
20695
|
-
id: "
|
|
20689
|
+
id: "cs-project-skills-script",
|
|
20696
20690
|
name: "Project Skills Script",
|
|
20697
20691
|
group: "claudeskill",
|
|
20698
20692
|
priority: "standard",
|
|
@@ -20714,7 +20708,7 @@ function checkComponentCounts(setup) {
|
|
|
20714
20708
|
const totalSkills = global2.skills + project.skills;
|
|
20715
20709
|
const totalComponents = totalAgents + totalCommands + totalRules + totalSkills;
|
|
20716
20710
|
return {
|
|
20717
|
-
id: "
|
|
20711
|
+
id: "cs-component-counts",
|
|
20718
20712
|
name: "ClaudeSkill Components",
|
|
20719
20713
|
group: "claudeskill",
|
|
20720
20714
|
priority: "standard",
|
|
@@ -20744,7 +20738,7 @@ async function checkGlobalDirReadable() {
|
|
|
20744
20738
|
const globalDir = PathResolver.getGlobalKitDir();
|
|
20745
20739
|
if (shouldSkipExpensiveOperations3()) {
|
|
20746
20740
|
return {
|
|
20747
|
-
id: "
|
|
20741
|
+
id: "cs-global-dir-readable",
|
|
20748
20742
|
name: "Global Dir Readable",
|
|
20749
20743
|
group: "claudeskill",
|
|
20750
20744
|
priority: "standard",
|
|
@@ -20757,7 +20751,7 @@ async function checkGlobalDirReadable() {
|
|
|
20757
20751
|
try {
|
|
20758
20752
|
await access(globalDir, constants.R_OK);
|
|
20759
20753
|
return {
|
|
20760
|
-
id: "
|
|
20754
|
+
id: "cs-global-dir-readable",
|
|
20761
20755
|
name: "Global Dir Readable",
|
|
20762
20756
|
group: "claudeskill",
|
|
20763
20757
|
priority: "standard",
|
|
@@ -20768,7 +20762,7 @@ async function checkGlobalDirReadable() {
|
|
|
20768
20762
|
};
|
|
20769
20763
|
} catch (error) {
|
|
20770
20764
|
return {
|
|
20771
|
-
id: "
|
|
20765
|
+
id: "cs-global-dir-readable",
|
|
20772
20766
|
name: "Global Dir Readable",
|
|
20773
20767
|
group: "claudeskill",
|
|
20774
20768
|
priority: "standard",
|
|
@@ -20784,7 +20778,7 @@ async function checkGlobalDirWritable() {
|
|
|
20784
20778
|
const globalDir = PathResolver.getGlobalKitDir();
|
|
20785
20779
|
if (shouldSkipExpensiveOperations3()) {
|
|
20786
20780
|
return {
|
|
20787
|
-
id: "
|
|
20781
|
+
id: "cs-global-dir-writable",
|
|
20788
20782
|
name: "Global Dir Writable",
|
|
20789
20783
|
group: "claudeskill",
|
|
20790
20784
|
priority: "standard",
|
|
@@ -20796,12 +20790,12 @@ async function checkGlobalDirWritable() {
|
|
|
20796
20790
|
}
|
|
20797
20791
|
const timestamp = Date.now();
|
|
20798
20792
|
const random = Math.random().toString(36).substring(2);
|
|
20799
|
-
const testFile = join7(globalDir, `.
|
|
20793
|
+
const testFile = join7(globalDir, `.cs-write-test-${timestamp}-${random}`);
|
|
20800
20794
|
try {
|
|
20801
20795
|
await writeFile2(testFile, "test", { encoding: "utf-8", flag: "wx" });
|
|
20802
20796
|
} catch (error) {
|
|
20803
20797
|
return {
|
|
20804
|
-
id: "
|
|
20798
|
+
id: "cs-global-dir-writable",
|
|
20805
20799
|
name: "Global Dir Writable",
|
|
20806
20800
|
group: "claudeskill",
|
|
20807
20801
|
priority: "standard",
|
|
@@ -20818,7 +20812,7 @@ async function checkGlobalDirWritable() {
|
|
|
20818
20812
|
logger.verbose("Failed to cleanup write test file", { testFile });
|
|
20819
20813
|
}
|
|
20820
20814
|
return {
|
|
20821
|
-
id: "
|
|
20815
|
+
id: "cs-global-dir-writable",
|
|
20822
20816
|
name: "Global Dir Writable",
|
|
20823
20817
|
group: "claudeskill",
|
|
20824
20818
|
priority: "standard",
|
|
@@ -20871,7 +20865,7 @@ async function checkHooksExist(projectDir) {
|
|
|
20871
20865
|
hookCount = checkedFiles.size;
|
|
20872
20866
|
if (!globalExists && !projectExists) {
|
|
20873
20867
|
return {
|
|
20874
|
-
id: "
|
|
20868
|
+
id: "cs-hooks-exist",
|
|
20875
20869
|
name: "Hooks Directory",
|
|
20876
20870
|
group: "claudeskill",
|
|
20877
20871
|
priority: "standard",
|
|
@@ -20881,7 +20875,7 @@ async function checkHooksExist(projectDir) {
|
|
|
20881
20875
|
};
|
|
20882
20876
|
}
|
|
20883
20877
|
return {
|
|
20884
|
-
id: "
|
|
20878
|
+
id: "cs-hooks-exist",
|
|
20885
20879
|
name: "Hooks Directory",
|
|
20886
20880
|
group: "claudeskill",
|
|
20887
20881
|
priority: "standard",
|
|
@@ -20903,7 +20897,7 @@ async function checkSettingsValid(projectDir) {
|
|
|
20903
20897
|
const settingsPath = existsSync8(globalSettings) ? globalSettings : existsSync8(projectSettings) ? projectSettings : null;
|
|
20904
20898
|
if (!settingsPath) {
|
|
20905
20899
|
return {
|
|
20906
|
-
id: "
|
|
20900
|
+
id: "cs-settings-valid",
|
|
20907
20901
|
name: "Settings.json",
|
|
20908
20902
|
group: "claudeskill",
|
|
20909
20903
|
priority: "extended",
|
|
@@ -20916,7 +20910,7 @@ async function checkSettingsValid(projectDir) {
|
|
|
20916
20910
|
const content = await readFile3(settingsPath, "utf-8");
|
|
20917
20911
|
JSON.parse(content);
|
|
20918
20912
|
return {
|
|
20919
|
-
id: "
|
|
20913
|
+
id: "cs-settings-valid",
|
|
20920
20914
|
name: "Settings.json",
|
|
20921
20915
|
group: "claudeskill",
|
|
20922
20916
|
priority: "extended",
|
|
@@ -20954,7 +20948,7 @@ async function checkSettingsValid(projectDir) {
|
|
|
20954
20948
|
});
|
|
20955
20949
|
}
|
|
20956
20950
|
return {
|
|
20957
|
-
id: "
|
|
20951
|
+
id: "cs-settings-valid",
|
|
20958
20952
|
name: "Settings.json",
|
|
20959
20953
|
group: "claudeskill",
|
|
20960
20954
|
priority: "extended",
|
|
@@ -20979,7 +20973,7 @@ async function checkPathRefsValid(projectDir) {
|
|
|
20979
20973
|
const claudeMdPath = existsSync9(globalClaudeMd) ? globalClaudeMd : existsSync9(projectClaudeMd) ? projectClaudeMd : null;
|
|
20980
20974
|
if (!claudeMdPath) {
|
|
20981
20975
|
return {
|
|
20982
|
-
id: "
|
|
20976
|
+
id: "cs-path-refs-valid",
|
|
20983
20977
|
name: "Path References",
|
|
20984
20978
|
group: "claudeskill",
|
|
20985
20979
|
priority: "extended",
|
|
@@ -20994,7 +20988,7 @@ async function checkPathRefsValid(projectDir) {
|
|
|
20994
20988
|
const refs = [...content.matchAll(refPattern)].map((m) => m[1]);
|
|
20995
20989
|
if (refs.length === 0) {
|
|
20996
20990
|
return {
|
|
20997
|
-
id: "
|
|
20991
|
+
id: "cs-path-refs-valid",
|
|
20998
20992
|
name: "Path References",
|
|
20999
20993
|
group: "claudeskill",
|
|
21000
20994
|
priority: "extended",
|
|
@@ -21035,7 +21029,7 @@ async function checkPathRefsValid(projectDir) {
|
|
|
21035
21029
|
}
|
|
21036
21030
|
if (broken.length > 0) {
|
|
21037
21031
|
return {
|
|
21038
|
-
id: "
|
|
21032
|
+
id: "cs-path-refs-valid",
|
|
21039
21033
|
name: "Path References",
|
|
21040
21034
|
group: "claudeskill",
|
|
21041
21035
|
priority: "extended",
|
|
@@ -21047,7 +21041,7 @@ async function checkPathRefsValid(projectDir) {
|
|
|
21047
21041
|
};
|
|
21048
21042
|
}
|
|
21049
21043
|
return {
|
|
21050
|
-
id: "
|
|
21044
|
+
id: "cs-path-refs-valid",
|
|
21051
21045
|
name: "Path References",
|
|
21052
21046
|
group: "claudeskill",
|
|
21053
21047
|
priority: "extended",
|
|
@@ -21057,7 +21051,7 @@ async function checkPathRefsValid(projectDir) {
|
|
|
21057
21051
|
};
|
|
21058
21052
|
} catch (error) {
|
|
21059
21053
|
return {
|
|
21060
|
-
id: "
|
|
21054
|
+
id: "cs-path-refs-valid",
|
|
21061
21055
|
name: "Path References",
|
|
21062
21056
|
group: "claudeskill",
|
|
21063
21057
|
priority: "extended",
|
|
@@ -21074,7 +21068,7 @@ import { join as join11 } from "node:path";
|
|
|
21074
21068
|
async function checkProjectConfigCompleteness(setup, projectDir) {
|
|
21075
21069
|
if (setup.project.path === setup.global.path) {
|
|
21076
21070
|
return {
|
|
21077
|
-
id: "
|
|
21071
|
+
id: "cs-project-config-complete",
|
|
21078
21072
|
name: "Project Config Completeness",
|
|
21079
21073
|
group: "claudeskill",
|
|
21080
21074
|
priority: "standard",
|
|
@@ -21101,7 +21095,7 @@ async function checkProjectConfigCompleteness(setup, projectDir) {
|
|
|
21101
21095
|
const totalRequired = requiredDirs.length + 1;
|
|
21102
21096
|
if (hasOnlyClaudeMd || missingDirs.length === totalRequired) {
|
|
21103
21097
|
return {
|
|
21104
|
-
id: "
|
|
21098
|
+
id: "cs-project-config-complete",
|
|
21105
21099
|
name: "Project Config Completeness",
|
|
21106
21100
|
group: "claudeskill",
|
|
21107
21101
|
priority: "standard",
|
|
@@ -21114,7 +21108,7 @@ async function checkProjectConfigCompleteness(setup, projectDir) {
|
|
|
21114
21108
|
}
|
|
21115
21109
|
if (missingDirs.length > 0) {
|
|
21116
21110
|
return {
|
|
21117
|
-
id: "
|
|
21111
|
+
id: "cs-project-config-complete",
|
|
21118
21112
|
name: "Project Config Completeness",
|
|
21119
21113
|
group: "claudeskill",
|
|
21120
21114
|
priority: "standard",
|
|
@@ -21126,7 +21120,7 @@ async function checkProjectConfigCompleteness(setup, projectDir) {
|
|
|
21126
21120
|
};
|
|
21127
21121
|
}
|
|
21128
21122
|
return {
|
|
21129
|
-
id: "
|
|
21123
|
+
id: "cs-project-config-complete",
|
|
21130
21124
|
name: "Project Config Completeness",
|
|
21131
21125
|
group: "claudeskill",
|
|
21132
21126
|
priority: "standard",
|
|
@@ -21442,7 +21436,7 @@ async function checkEnvKeys(setup) {
|
|
|
21442
21436
|
if (!globalCheck.allPresent) {
|
|
21443
21437
|
const missingKeys = globalCheck.missing.map((m2) => m2.label).join(", ");
|
|
21444
21438
|
results.push({
|
|
21445
|
-
id: "
|
|
21439
|
+
id: "cs-global-env-keys",
|
|
21446
21440
|
name: "Global Environment Keys",
|
|
21447
21441
|
group: "claudeskill",
|
|
21448
21442
|
priority: "standard",
|
|
@@ -21454,7 +21448,7 @@ async function checkEnvKeys(setup) {
|
|
|
21454
21448
|
});
|
|
21455
21449
|
} else {
|
|
21456
21450
|
results.push({
|
|
21457
|
-
id: "
|
|
21451
|
+
id: "cs-global-env-keys",
|
|
21458
21452
|
name: "Global Environment Keys",
|
|
21459
21453
|
group: "claudeskill",
|
|
21460
21454
|
priority: "standard",
|
|
@@ -21471,7 +21465,7 @@ async function checkEnvKeys(setup) {
|
|
|
21471
21465
|
if (!projectCheck.allPresent) {
|
|
21472
21466
|
const missingKeys = projectCheck.missing.map((m2) => m2.label).join(", ");
|
|
21473
21467
|
results.push({
|
|
21474
|
-
id: "
|
|
21468
|
+
id: "cs-project-env-keys",
|
|
21475
21469
|
name: "Project Environment Keys",
|
|
21476
21470
|
group: "claudeskill",
|
|
21477
21471
|
priority: "standard",
|
|
@@ -21483,7 +21477,7 @@ async function checkEnvKeys(setup) {
|
|
|
21483
21477
|
});
|
|
21484
21478
|
} else {
|
|
21485
21479
|
results.push({
|
|
21486
|
-
id: "
|
|
21480
|
+
id: "cs-project-env-keys",
|
|
21487
21481
|
name: "Project Environment Keys",
|
|
21488
21482
|
group: "claudeskill",
|
|
21489
21483
|
priority: "standard",
|
|
@@ -21579,7 +21573,7 @@ Error: ${msg}
|
|
|
21579
21573
|
|
|
21580
21574
|
Check disk space and directory permissions.`);
|
|
21581
21575
|
}
|
|
21582
|
-
const tempDir = await fs2.promises.mkdtemp(path.join(this.tempBaseDir, `
|
|
21576
|
+
const tempDir = await fs2.promises.mkdtemp(path.join(this.tempBaseDir, `cs-git-${kit.repo}-`));
|
|
21583
21577
|
const url = preferSsh ? `git@github.com:${kit.owner}/${kit.repo}.git` : `https://github.com/${kit.owner}/${kit.repo}.git`;
|
|
21584
21578
|
const method = preferSsh ? "ssh" : "https";
|
|
21585
21579
|
logger.verbose("Git clone", { url, tag, tempDir, method });
|
|
@@ -21984,7 +21978,7 @@ async function checkGlobalDirAccess() {
|
|
|
21984
21978
|
autoFixable: false
|
|
21985
21979
|
};
|
|
21986
21980
|
}
|
|
21987
|
-
const testFile = join17(globalDir, ".
|
|
21981
|
+
const testFile = join17(globalDir, ".cs-doctor-access-test");
|
|
21988
21982
|
try {
|
|
21989
21983
|
await mkdir3(globalDir, { recursive: true });
|
|
21990
21984
|
await writeFile5(testFile, "test", "utf-8");
|
|
@@ -22114,8 +22108,8 @@ async function checkSymlinkSupport() {
|
|
|
22114
22108
|
};
|
|
22115
22109
|
}
|
|
22116
22110
|
const testDir = PathResolver.getGlobalKitDir();
|
|
22117
|
-
const target = join18(testDir, ".
|
|
22118
|
-
const link = join18(testDir, ".
|
|
22111
|
+
const target = join18(testDir, ".cs-symlink-test-target");
|
|
22112
|
+
const link = join18(testDir, ".cs-symlink-test-link");
|
|
22119
22113
|
try {
|
|
22120
22114
|
await mkdir4(testDir, { recursive: true });
|
|
22121
22115
|
await writeFile6(target, "test", "utf-8");
|
|
@@ -22548,7 +22542,7 @@ class ReportGenerator {
|
|
|
22548
22542
|
return null;
|
|
22549
22543
|
}
|
|
22550
22544
|
}
|
|
22551
|
-
const tmpFile = join19(tmpdir2(), `
|
|
22545
|
+
const tmpFile = join19(tmpdir2(), `cs-report-${Date.now()}.txt`);
|
|
22552
22546
|
writeFileSync(tmpFile, report);
|
|
22553
22547
|
try {
|
|
22554
22548
|
const result = spawnSync3("gh", ["gist", "create", tmpFile, "--desc", "ClaudeSkill Diagnostic Report"], {
|
|
@@ -23172,15 +23166,7 @@ async function detectMetadataFormat(claudeDir) {
|
|
|
23172
23166
|
};
|
|
23173
23167
|
}
|
|
23174
23168
|
if (parsed.name || parsed.version || parsed.files) {
|
|
23175
|
-
|
|
23176
|
-
const nameToCheck = parsed.name || "";
|
|
23177
|
-
if (/\bengineer\b/i.test(nameToCheck)) {
|
|
23178
|
-
detectedKit = "engineer";
|
|
23179
|
-
} else if (/\bmarketing\b/i.test(nameToCheck)) {
|
|
23180
|
-
detectedKit = "marketing";
|
|
23181
|
-
} else {
|
|
23182
|
-
detectedKit = "engineer";
|
|
23183
|
-
}
|
|
23169
|
+
const detectedKit = "engineer";
|
|
23184
23170
|
return { format: "legacy", metadata: parsed, detectedKit };
|
|
23185
23171
|
}
|
|
23186
23172
|
logger.warning("Metadata file exists but has unrecognized format (missing kits, name, version, or files)");
|
|
@@ -23292,9 +23278,6 @@ function getInstalledKits(metadata) {
|
|
|
23292
23278
|
if (/\bengineer\b/i.test(nameToCheck)) {
|
|
23293
23279
|
kits.push("engineer");
|
|
23294
23280
|
}
|
|
23295
|
-
if (/\bmarketing\b/i.test(nameToCheck)) {
|
|
23296
|
-
kits.push("marketing");
|
|
23297
|
-
}
|
|
23298
23281
|
if (kits.length > 0) {
|
|
23299
23282
|
return kits;
|
|
23300
23283
|
}
|
|
@@ -27583,14 +27566,20 @@ class FileDownloader {
|
|
|
27583
27566
|
await mkdir9(destDir, { recursive: true });
|
|
27584
27567
|
output.info(`Downloading ${name}${size ? ` (${formatBytes(size)})` : ""}...`);
|
|
27585
27568
|
const headers = {};
|
|
27569
|
+
const isGitHubTarballUrl = url.includes("api.github.com") && (url.includes("/tarball/") || url.includes("/zipball/"));
|
|
27586
27570
|
if (token && url.includes("api.github.com")) {
|
|
27587
27571
|
headers.Authorization = `Bearer ${token}`;
|
|
27588
|
-
headers.Accept = "application/octet-stream";
|
|
27589
27572
|
headers["X-GitHub-Api-Version"] = "2022-11-28";
|
|
27573
|
+
if (!isGitHubTarballUrl) {
|
|
27574
|
+
headers.Accept = "application/octet-stream";
|
|
27575
|
+
}
|
|
27590
27576
|
} else {
|
|
27591
27577
|
headers.Accept = "application/octet-stream";
|
|
27592
27578
|
}
|
|
27593
|
-
const response = await fetch(url, {
|
|
27579
|
+
const response = await fetch(url, {
|
|
27580
|
+
headers,
|
|
27581
|
+
redirect: "follow"
|
|
27582
|
+
});
|
|
27594
27583
|
if (!response.ok) {
|
|
27595
27584
|
throw new DownloadError(`Failed to download: ${response.statusText}`);
|
|
27596
27585
|
}
|
|
@@ -37239,7 +37228,7 @@ function normalizeCommand(cmd) {
|
|
|
37239
37228
|
return normalized;
|
|
37240
37229
|
}
|
|
37241
37230
|
// src/domains/config/installed-settings-tracker.ts
|
|
37242
|
-
var CK_JSON_FILE = ".
|
|
37231
|
+
var CK_JSON_FILE = ".cs.json";
|
|
37243
37232
|
|
|
37244
37233
|
class InstalledSettingsTracker {
|
|
37245
37234
|
projectDir;
|
|
@@ -38289,7 +38278,7 @@ var import_fs_extra13 = __toESM(require_lib(), 1);
|
|
|
38289
38278
|
var import_proper_lockfile2 = __toESM(require_proper_lockfile(), 1);
|
|
38290
38279
|
async function writeManifest(claudeDir, kitName, version, scope, kitType, trackedFiles, userConfigFiles) {
|
|
38291
38280
|
const metadataPath = join46(claudeDir, "metadata.json");
|
|
38292
|
-
const kit = kitType ||
|
|
38281
|
+
const kit = kitType || "engineer";
|
|
38293
38282
|
await import_fs_extra13.ensureFile(metadataPath);
|
|
38294
38283
|
let release = null;
|
|
38295
38284
|
try {
|
|
@@ -39054,7 +39043,7 @@ async function applyPrefix(extractDir) {
|
|
|
39054
39043
|
logger.verbose("No commands directory found, skipping prefix application");
|
|
39055
39044
|
return;
|
|
39056
39045
|
}
|
|
39057
|
-
logger.info("Applying /
|
|
39046
|
+
logger.info("Applying /cs: prefix to slash commands...");
|
|
39058
39047
|
const backupDir = join51(extractDir, ".commands-backup");
|
|
39059
39048
|
const tempDir = join51(extractDir, ".commands-prefix-temp");
|
|
39060
39049
|
try {
|
|
@@ -39067,7 +39056,7 @@ async function applyPrefix(extractDir) {
|
|
|
39067
39056
|
const ckDir2 = join51(commandsDir, "ck");
|
|
39068
39057
|
const ckStat = await stat8(ckDir2);
|
|
39069
39058
|
if (ckStat.isDirectory()) {
|
|
39070
|
-
logger.verbose("Commands already have /
|
|
39059
|
+
logger.verbose("Commands already have /cs: prefix, skipping");
|
|
39071
39060
|
return;
|
|
39072
39061
|
}
|
|
39073
39062
|
}
|
|
@@ -39101,7 +39090,7 @@ async function applyPrefix(extractDir) {
|
|
|
39101
39090
|
await import_fs_extra16.remove(commandsDir);
|
|
39102
39091
|
await import_fs_extra16.move(tempDir, commandsDir);
|
|
39103
39092
|
await import_fs_extra16.remove(backupDir);
|
|
39104
|
-
logger.success("Successfully reorganized commands to /
|
|
39093
|
+
logger.success("Successfully reorganized commands to /cs: prefix");
|
|
39105
39094
|
const claudeDir = join51(extractDir, ".claude");
|
|
39106
39095
|
logger.info("Transforming command references in file contents...");
|
|
39107
39096
|
const transformResult = await transformCommandReferences(claudeDir, {
|
|
@@ -39125,7 +39114,7 @@ async function applyPrefix(extractDir) {
|
|
|
39125
39114
|
if (await import_fs_extra16.pathExists(tempDir)) {
|
|
39126
39115
|
await import_fs_extra16.remove(tempDir).catch(() => {});
|
|
39127
39116
|
}
|
|
39128
|
-
logger.error("Failed to apply /
|
|
39117
|
+
logger.error("Failed to apply /cs: prefix to commands");
|
|
39129
39118
|
throw error;
|
|
39130
39119
|
} finally {
|
|
39131
39120
|
if (await import_fs_extra16.pathExists(backupDir)) {
|
|
@@ -40841,7 +40830,7 @@ import { mkdir as mkdir19, readFile as readFile24, rename as rename2, rm as rm6,
|
|
|
40841
40830
|
import { chmod as chmod2 } from "node:fs/promises";
|
|
40842
40831
|
import { platform as platform11 } from "node:os";
|
|
40843
40832
|
import { join as join65 } from "node:path";
|
|
40844
|
-
var PROJECT_CONFIG_FILE = ".
|
|
40833
|
+
var PROJECT_CONFIG_FILE = ".cs.json";
|
|
40845
40834
|
|
|
40846
40835
|
class ConfigManager {
|
|
40847
40836
|
static config = null;
|
|
@@ -40990,7 +40979,7 @@ class ConfigManager {
|
|
|
40990
40979
|
}
|
|
40991
40980
|
if (existsSync19(incorrectPath)) {
|
|
40992
40981
|
try {
|
|
40993
|
-
logger.info("Migrating .
|
|
40982
|
+
logger.info("Migrating .cs.json from nested location to correct location...");
|
|
40994
40983
|
await rename2(incorrectPath, correctPath);
|
|
40995
40984
|
logger.success(`Migrated ${PROJECT_CONFIG_FILE} to ${correctPath}`);
|
|
40996
40985
|
const nestedClaudeDir = join65(globalDir, ".claude");
|
|
@@ -41692,7 +41681,8 @@ async function handleSelection(ctx) {
|
|
|
41692
41681
|
const existingKitTypes = Object.keys(existingMetadata.kits);
|
|
41693
41682
|
const otherKits = existingKitTypes.filter((k2) => k2 !== kitType);
|
|
41694
41683
|
if (otherKits.length > 0) {
|
|
41695
|
-
const
|
|
41684
|
+
const kitsRecord = existingMetadata.kits;
|
|
41685
|
+
const existingKitsDisplay = otherKits.map((k2) => `${k2}@${kitsRecord[k2]?.version || "unknown"}`).join(", ");
|
|
41696
41686
|
if (!ctx.options.yes && !ctx.isNonInteractive) {
|
|
41697
41687
|
try {
|
|
41698
41688
|
const confirmAdd = await ctx.prompts.confirm(`${existingKitsDisplay} already installed. Add ${kit.name} alongside?`);
|
|
@@ -41837,18 +41827,8 @@ Run 'cs init' to update.`, "Legacy Installation");
|
|
|
41837
41827
|
let kitType = ctx.options.kit;
|
|
41838
41828
|
if (!kitType) {
|
|
41839
41829
|
const engineerMeta = await readKitManifest(claudeDir, "engineer");
|
|
41840
|
-
|
|
41841
|
-
if (engineerMeta && marketingMeta) {
|
|
41842
|
-
if (!ctx.isNonInteractive) {
|
|
41843
|
-
kitType = await ctx.prompts.selectKit();
|
|
41844
|
-
} else {
|
|
41845
|
-
logger.error("Multiple kits installed. Please specify --kit engineer or --kit marketing");
|
|
41846
|
-
return { ...ctx, cancelled: true };
|
|
41847
|
-
}
|
|
41848
|
-
} else if (engineerMeta) {
|
|
41830
|
+
if (engineerMeta) {
|
|
41849
41831
|
kitType = "engineer";
|
|
41850
|
-
} else if (marketingMeta) {
|
|
41851
|
-
kitType = "marketing";
|
|
41852
41832
|
} else {
|
|
41853
41833
|
logger.error("Cannot sync: no kit installation found in metadata");
|
|
41854
41834
|
return { ...ctx, cancelled: true };
|
|
@@ -42633,7 +42613,7 @@ async function handleTransforms(ctx) {
|
|
|
42633
42613
|
docs: foldersConfig.docs,
|
|
42634
42614
|
plans: foldersConfig.plans
|
|
42635
42615
|
}, ctx.options.global);
|
|
42636
|
-
logger.debug(ctx.options.global ? "Saved folder configuration to ~/.claude/.
|
|
42616
|
+
logger.debug(ctx.options.global ? "Saved folder configuration to ~/.claude/.cs.json" : "Saved folder configuration to .claude/.cs.json");
|
|
42637
42617
|
}
|
|
42638
42618
|
}
|
|
42639
42619
|
const claudeDir = ctx.options.global ? ctx.resolvedDir : join73(ctx.resolvedDir, ".claude");
|
|
@@ -43088,7 +43068,7 @@ async function projectCreation(kit, resolvedDir, validOptions, isNonInteractive2
|
|
|
43088
43068
|
docs: foldersConfig.docs,
|
|
43089
43069
|
plans: foldersConfig.plans
|
|
43090
43070
|
});
|
|
43091
|
-
logger.debug("Saved folder configuration to .claude/.
|
|
43071
|
+
logger.debug("Saved folder configuration to .claude/.cs.json");
|
|
43092
43072
|
}
|
|
43093
43073
|
output.section("Installing");
|
|
43094
43074
|
logger.verbose("Installation target", { directory: resolvedDir });
|
|
@@ -43730,7 +43710,7 @@ var import_fs_extra37 = __toESM(require_lib(), 1);
|
|
|
43730
43710
|
// package.json
|
|
43731
43711
|
var package_default = {
|
|
43732
43712
|
name: "claudeskill-cli",
|
|
43733
|
-
version: "1.0.
|
|
43713
|
+
version: "1.0.1",
|
|
43734
43714
|
description: "CLI tool for bootstrapping and updating ClaudeSkill projects",
|
|
43735
43715
|
type: "module",
|
|
43736
43716
|
repository: {
|
|
@@ -44155,13 +44135,13 @@ ${import_picocolors23.default.bold(import_picocolors23.default.cyan(result.kitCo
|
|
|
44155
44135
|
// src/cli/command-registry.ts
|
|
44156
44136
|
init_logger();
|
|
44157
44137
|
function registerCommands(cli) {
|
|
44158
|
-
cli.command("new", "Bootstrap a new ClaudeSkill project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit to use: engineer, marketing, all, or comma-separated").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--force", "Overwrite existing files without confirmation").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--opencode", "Install OpenCode CLI package (non-interactive mode)").option("--gemini", "Install Google Gemini CLI package (non-interactive mode)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--with-sudo", "Include system packages requiring sudo (Linux: ffmpeg, imagemagick)").option("--prefix", "Add /
|
|
44138
|
+
cli.command("new", "Bootstrap a new ClaudeSkill project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit to use: engineer, marketing, all, or comma-separated").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--force", "Overwrite existing files without confirmation").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--opencode", "Install OpenCode CLI package (non-interactive mode)").option("--gemini", "Install Google Gemini CLI package (non-interactive mode)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--with-sudo", "Include system packages requiring sudo (Linux: ffmpeg, imagemagick)").option("--prefix", "Add /cs: prefix to all slash commands by moving them to commands/ck/ subdirectory").option("--beta", "Show beta versions in selection prompt").option("--refresh", "Bypass release cache to fetch latest versions from GitHub").option("--docs-dir <name>", "Custom docs folder name (default: docs)").option("--plans-dir <name>", "Custom plans folder name (default: plans)").option("-y, --yes", "Non-interactive mode with sensible defaults (skip all prompts)").option("--use-git", "Use git clone instead of GitHub API (uses SSH/HTTPS credentials)").option("--archive <path>", "Use local archive file instead of downloading (zip/tar.gz)").option("--kit-path <path>", "Use local kit directory instead of downloading").action(async (options) => {
|
|
44159
44139
|
if (options.exclude && !Array.isArray(options.exclude)) {
|
|
44160
44140
|
options.exclude = [options.exclude];
|
|
44161
44141
|
}
|
|
44162
44142
|
await newCommand(options);
|
|
44163
44143
|
});
|
|
44164
|
-
cli.command("init", "Initialize or update ClaudeSkill project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit to use: engineer, marketing, all, or comma-separated").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--only <pattern>", "Include only files matching glob pattern (can be used multiple times)").option("-g, --global", "Use platform-specific user configuration directory").option("--fresh", "Completely remove .claude directory before downloading (requires confirmation)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--with-sudo", "Include system packages requiring sudo (Linux: ffmpeg, imagemagick)").option("--prefix", "Add /
|
|
44144
|
+
cli.command("init", "Initialize or update ClaudeSkill project (with interactive version selection)").option("--dir <dir>", "Target directory (default: .)").option("--kit <kit>", "Kit to use: engineer, marketing, all, or comma-separated").option("-r, --release <version>", "Skip version selection, use specific version (e.g., latest, v1.0.0)").option("--exclude <pattern>", "Exclude files matching glob pattern (can be used multiple times)").option("--only <pattern>", "Include only files matching glob pattern (can be used multiple times)").option("-g, --global", "Use platform-specific user configuration directory").option("--fresh", "Completely remove .claude directory before downloading (requires confirmation)").option("--install-skills", "Install skills dependencies (non-interactive mode)").option("--with-sudo", "Include system packages requiring sudo (Linux: ffmpeg, imagemagick)").option("--prefix", "Add /cs: prefix to all slash commands by moving them to commands/ck/ subdirectory").option("--beta", "Show beta versions in selection prompt").option("--refresh", "Bypass release cache to fetch latest versions from GitHub").option("--dry-run", "Preview changes without applying them (requires --prefix)").option("--force-overwrite", "Override ownership protections and delete user-modified files (requires --prefix)").option("--force-overwrite-settings", "Fully replace settings.json instead of selective merge (destroys user customizations)").option("--skip-setup", "Skip interactive configuration wizard").option("--docs-dir <name>", "Custom docs folder name (default: docs)").option("--plans-dir <name>", "Custom plans folder name (default: plans)").option("-y, --yes", "Non-interactive mode with sensible defaults (skip all prompts)").option("--sync", "Sync config files from upstream with interactive hunk-by-hunk merge").option("--use-git", "Use git clone instead of GitHub API (uses SSH/HTTPS credentials)").option("--archive <path>", "Use local archive file instead of downloading (zip/tar.gz)").option("--kit-path <path>", "Use local kit directory instead of downloading").action(async (options) => {
|
|
44165
44145
|
if (options.exclude && !Array.isArray(options.exclude)) {
|
|
44166
44146
|
options.exclude = [options.exclude];
|
|
44167
44147
|
}
|