kenmark-skills 1.0.1 → 1.0.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 CHANGED
@@ -45,6 +45,12 @@ npx kenmark-skills setup
45
45
  - Rovo Dev: `~/.rovodev/skills`
46
46
  - Qoder: `~/.qoder/skills`
47
47
 
48
+ For Claude Code specifically, setup also installs slash-command wrappers in `~/.claude/commands`:
49
+
50
+ - `/kenmark-init-brain`
51
+ - `/kenmark-commit-push`
52
+ - `/kenmark-issues-list` (and matching wrappers for all shipped skills)
53
+
48
54
  Useful flags:
49
55
 
50
56
  ```bash
@@ -74,6 +80,72 @@ Use `--global` to force user-level install mode explicitly:
74
80
  npx kenmark-skills setup --global --ide all
75
81
  ```
76
82
 
83
+ If new Claude slash commands do not appear immediately, restart Claude Code.
84
+
85
+ ## Uninstall
86
+
87
+ `npm uninstall -g kenmark-skills` removes only the CLI package; it does **not** remove skills already copied into your IDE folders.
88
+
89
+ Use the built-in uninstall command to remove installed Kenmark skills:
90
+
91
+ ### Global uninstall
92
+
93
+ ```bash
94
+ npx kenmark-skills uninstall --global
95
+ ```
96
+
97
+ Remove only Claude installs (skills + `/kenmark-*` wrappers):
98
+
99
+ ```bash
100
+ npx kenmark-skills uninstall --global --ide claude
101
+ ```
102
+
103
+ ### Project-local uninstall
104
+
105
+ ```bash
106
+ npx kenmark-skills uninstall --project
107
+ npx kenmark-skills uninstall --project --ide all
108
+ ```
109
+
110
+ After uninstalling from Claude paths, restart Claude Code.
111
+
112
+ ### Troubleshooting: `Unknown command: uninstall`
113
+
114
+ If you see:
115
+
116
+ ```text
117
+ Unknown command: uninstall
118
+ ```
119
+
120
+ you are likely running an older cached package version through `npx`.
121
+
122
+ Use an explicit latest version:
123
+
124
+ ```bash
125
+ npx kenmark-skills@latest uninstall --global --ide claude
126
+ ```
127
+
128
+ If your npm cache still serves an older version:
129
+
130
+ ```bash
131
+ npm cache clean --force
132
+ npx kenmark-skills@latest uninstall --global --ide claude
133
+ ```
134
+
135
+ Manual fallback (Claude global):
136
+
137
+ ```bash
138
+ rm -rf ~/.claude/skills/init-brain \
139
+ ~/.claude/skills/skill-router \
140
+ ~/.claude/skills/commit-push \
141
+ ~/.claude/skills/issues-setup \
142
+ ~/.claude/skills/issues-list \
143
+ ~/.claude/skills/issues-check \
144
+ ~/.claude/skills/issues-scan \
145
+ ~/.claude/skills/issues-maintenance
146
+ rm -f ~/.claude/commands/kenmark-*.md
147
+ ```
148
+
77
149
  Verify what will ship before publishing:
78
150
 
79
151
  ```bash
@@ -1,5 +1,20 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v2026.06.02-1955-uninstall-version-lag-troubleshooting
4
+ - Added uninstall troubleshooting to README for `Unknown command: uninstall` caused by older `npx` package versions.
5
+ - Documented explicit `npx kenmark-skills@latest` usage, npm cache clean fallback, and manual Claude cleanup commands.
6
+
7
+ ## v2026.06.02-1945-uninstall-command-support
8
+ - Added `uninstall` support to the package CLI (`npx kenmark-skills uninstall`) with `--global|--project` and `--ide` targeting.
9
+ - Setup installer now supports `--uninstall` mode and removes only Kenmark-installed skill directories from target paths.
10
+ - Claude-specific uninstall also removes generated `/kenmark-*` command wrappers from `.claude/commands`.
11
+ - Added `uninstall:skills` npm script and documented global/project uninstall flows in README.
12
+
13
+ ## v2026.06.02-1938-claude-command-wrappers
14
+ - Updated setup installer to generate Claude Code slash-command wrappers under `.claude/commands` for every shipped Kenmark skill.
15
+ - This enables direct slash usage (for example `/kenmark-init-brain`) in addition to selecting skills from `/skills`.
16
+ - Updated README to document Claude wrapper commands and restart note.
17
+
3
18
  ## v2026.06.02-1930-readme-npx-first-install
4
19
  - Updated README install guidance to remove the clone-based setup path.
5
20
  - Reframed Option B as local/project installation via `npx kenmark-skills setup --project`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kenmark-skills",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Skills by Kenmark ITan Solutions — Cursor/Codex agent skills from our development workflows. Created by Tanooj Mehra & Adwait Date.",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -15,6 +15,7 @@
15
15
  ],
16
16
  "scripts": {
17
17
  "setup": "node scripts/cli.js setup",
18
+ "uninstall:skills": "node scripts/cli.js uninstall",
18
19
  "setup:skills": "node scripts/setup-skills.js",
19
20
  "pack:check": "npm pack --dry-run",
20
21
  "publish:public": "npm publish --access public"
package/scripts/cli.js CHANGED
@@ -11,12 +11,14 @@ function printUsage() {
11
11
  console.log("");
12
12
  console.log("Usage:");
13
13
  console.log(" kenmark-skills setup [--global|--project] [--ide <target>]");
14
+ console.log(" kenmark-skills uninstall [--global|--project] [--ide <target>]");
14
15
  console.log(" kenmark-skills help");
15
16
  console.log("");
16
17
  console.log("Examples:");
17
18
  console.log(" npx kenmark-skills setup");
18
19
  console.log(" npx kenmark-skills setup --project --ide cursor");
19
20
  console.log(" npx kenmark-skills setup --global --ide all");
21
+ console.log(" npx kenmark-skills uninstall --global --ide claude");
20
22
  }
21
23
 
22
24
  if (!command || command === "help" || command === "--help" || command === "-h") {
@@ -33,6 +35,15 @@ if (command === "setup") {
33
35
  process.exit(result.status === null ? 1 : result.status);
34
36
  }
35
37
 
38
+ if (command === "uninstall") {
39
+ const scriptPath = path.join(__dirname, "setup-skills.js");
40
+ const forwardedArgs = ["--uninstall", ...args.slice(1)];
41
+ const result = spawnSync(process.execPath, [scriptPath, ...forwardedArgs], {
42
+ stdio: "inherit"
43
+ });
44
+ process.exit(result.status === null ? 1 : result.status);
45
+ }
46
+
36
47
  console.error(`Unknown command: ${command}`);
37
48
  printUsage();
38
49
  process.exit(1);
@@ -36,18 +36,22 @@ const projectTargets = {
36
36
  };
37
37
 
38
38
  function printUsage() {
39
- console.log("Usage: kenmark-skills-setup [--global|--project] [--ide <target>]");
39
+ console.log(
40
+ "Usage: kenmark-skills-setup [--install|--uninstall] [--global|--project] [--ide <target>]"
41
+ );
40
42
  console.log("Targets: cursor, codex, claude, gemini, opencode, kiro, trae, trae-cn, rovo, qoder, all");
41
43
  console.log("Examples:");
42
44
  console.log(" kenmark-skills-setup");
45
+ console.log(" kenmark-skills-setup --uninstall --ide claude");
43
46
  console.log(" kenmark-skills-setup --ide cursor");
44
47
  console.log(" kenmark-skills-setup --project --ide all");
45
48
  console.log(" npx kenmark-skills setup --global --ide gemini");
49
+ console.log(" npx kenmark-skills uninstall --project --ide all");
46
50
  console.log(" npm run setup:skills -- --ide all");
47
51
  }
48
52
 
49
53
  function parseArgs(argv) {
50
- const args = { ide: null, mode: "global" };
54
+ const args = { ide: null, mode: "global", action: "install" };
51
55
  for (let i = 0; i < argv.length; i += 1) {
52
56
  const token = argv[i];
53
57
  if (token === "--help" || token === "-h") {
@@ -67,6 +71,14 @@ function parseArgs(argv) {
67
71
  args.mode = "global";
68
72
  continue;
69
73
  }
74
+ if (token === "--uninstall") {
75
+ args.action = "uninstall";
76
+ continue;
77
+ }
78
+ if (token === "--install") {
79
+ args.action = "install";
80
+ continue;
81
+ }
70
82
  }
71
83
  return args;
72
84
  }
@@ -86,6 +98,10 @@ function ensureTargetPath(targetPath) {
86
98
  fs.mkdirSync(targetPath, { recursive: true });
87
99
  }
88
100
 
101
+ function ensureParentDir(filePath) {
102
+ fs.mkdirSync(path.dirname(filePath), { recursive: true });
103
+ }
104
+
89
105
  function copyDirectoryContents(sourcePath, targetPath) {
90
106
  const entries = fs.readdirSync(sourcePath, { withFileTypes: true });
91
107
  for (const entry of entries) {
@@ -100,6 +116,68 @@ function copyDirectoryContents(sourcePath, targetPath) {
100
116
  }
101
117
  }
102
118
 
119
+ function createClaudeCommandWrappers(basePath) {
120
+ const commandsDir = path.join(path.dirname(basePath), "commands");
121
+ const skills = fs
122
+ .readdirSync(sourceDir, { withFileTypes: true })
123
+ .filter((entry) => entry.isDirectory())
124
+ .map((entry) => entry.name)
125
+ .sort();
126
+
127
+ for (const skillName of skills) {
128
+ const commandFile = path.join(commandsDir, `kenmark-${skillName}.md`);
129
+ const commandBody = [
130
+ `# Kenmark ${skillName}`,
131
+ "",
132
+ `Use the \`${skillName}\` skill from installed user skills.`,
133
+ "",
134
+ "Instructions:",
135
+ `- Invoke and follow the \`${skillName}\` skill from the user skills directory.`,
136
+ "- Execute the skill workflow end-to-end for the current request.",
137
+ "- If required context is missing, ask concise clarifying questions first."
138
+ ].join("\n");
139
+ ensureParentDir(commandFile);
140
+ fs.writeFileSync(commandFile, `${commandBody}\n`, "utf8");
141
+ }
142
+
143
+ return { commandsDir, count: skills.length };
144
+ }
145
+
146
+ function removeKenmarkSkillDirs(targetPath) {
147
+ const skills = fs
148
+ .readdirSync(sourceDir, { withFileTypes: true })
149
+ .filter((entry) => entry.isDirectory())
150
+ .map((entry) => entry.name);
151
+
152
+ let removed = 0;
153
+ for (const skillName of skills) {
154
+ const installedSkillPath = path.join(targetPath, skillName);
155
+ if (fs.existsSync(installedSkillPath)) {
156
+ fs.rmSync(installedSkillPath, { recursive: true, force: true });
157
+ removed += 1;
158
+ }
159
+ }
160
+ return removed;
161
+ }
162
+
163
+ function removeClaudeCommandWrappers(basePath) {
164
+ const commandsDir = path.join(path.dirname(basePath), "commands");
165
+ const skills = fs
166
+ .readdirSync(sourceDir, { withFileTypes: true })
167
+ .filter((entry) => entry.isDirectory())
168
+ .map((entry) => entry.name);
169
+
170
+ let removed = 0;
171
+ for (const skillName of skills) {
172
+ const commandFile = path.join(commandsDir, `kenmark-${skillName}.md`);
173
+ if (fs.existsSync(commandFile)) {
174
+ fs.rmSync(commandFile, { force: true });
175
+ removed += 1;
176
+ }
177
+ }
178
+ return { commandsDir, removed };
179
+ }
180
+
103
181
  function run() {
104
182
  const args = parseArgs(process.argv.slice(2));
105
183
  if (args.help) {
@@ -139,14 +217,35 @@ function run() {
139
217
  }
140
218
 
141
219
  console.log(`Operating system: ${process.platform}`);
220
+ console.log(`Action: ${args.action}`);
142
221
  console.log(`Install mode: ${args.mode}`);
143
- console.log(`Installing skills from: ${sourceDir}`);
222
+ if (args.action === "install") {
223
+ console.log(`Installing skills from: ${sourceDir}`);
224
+ }
144
225
 
145
226
  for (const ide of targetIdes) {
146
227
  const targetPath = targetMap[ide];
147
- ensureTargetPath(targetPath);
148
- copyDirectoryContents(sourceDir, targetPath);
149
- console.log(`Installed skills for ${ide}: ${targetPath}`);
228
+ if (args.action === "install") {
229
+ ensureTargetPath(targetPath);
230
+ copyDirectoryContents(sourceDir, targetPath);
231
+ console.log(`Installed skills for ${ide}: ${targetPath}`);
232
+ if (ide === "claude") {
233
+ const result = createClaudeCommandWrappers(targetPath);
234
+ console.log(
235
+ `Installed Claude command wrappers (${result.count}): ${result.commandsDir}`
236
+ );
237
+ }
238
+ continue;
239
+ }
240
+
241
+ const removedSkillCount = removeKenmarkSkillDirs(targetPath);
242
+ console.log(`Uninstalled ${removedSkillCount} Kenmark skills for ${ide}: ${targetPath}`);
243
+ if (ide === "claude") {
244
+ const wrapperResult = removeClaudeCommandWrappers(targetPath);
245
+ console.log(
246
+ `Removed Claude command wrappers (${wrapperResult.removed}): ${wrapperResult.commandsDir}`
247
+ );
248
+ }
150
249
  }
151
250
 
152
251
  console.log("Done.");