kenmark-skills 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/README.md CHANGED
@@ -26,37 +26,61 @@ These skills assume a **`brain/`** knowledge base (standards, changelog, optiona
26
26
 
27
27
  ## Install
28
28
 
29
- ### Option A — Clone into your skills directory
30
-
31
- **Cursor (user-level):**
29
+ ### Option A — Global npm install (recommended)
32
30
 
33
31
  ```bash
34
- git clone https://github.com/TanoojMehra/kenmark-skills.git
35
- cp -R kenmark-skills/skills/user-skills/* ~/.cursor/skills/
32
+ npm install -g kenmark-skills
33
+ npx kenmark-skills setup
36
34
  ```
37
35
 
38
- **Codex / shared agent skills (`~/.agents/skills`):**
36
+ `npx kenmark-skills setup` (or `kenmark-skills-setup`) auto-detects your platform and copies skills to detected global IDE paths:
37
+
38
+ - Cursor: `~/.cursor/skills`
39
+ - Codex/shared agents: `~/.agents/skills`
40
+ - Claude Code: `~/.claude/skills`
41
+ - Gemini CLI: `~/.gemini/skills`
42
+ - OpenCode: `~/.opencode/skills`
43
+ - Kiro: `~/.kiro/skills`
44
+ - Trae: `~/.trae/skills` / `~/.trae-cn/skills`
45
+ - Rovo Dev: `~/.rovodev/skills`
46
+ - Qoder: `~/.qoder/skills`
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
+
54
+ Useful flags:
39
55
 
40
56
  ```bash
41
- cp -R kenmark-skills/skills/user-skills/* ~/.agents/skills/
57
+ npx kenmark-skills setup --ide cursor
58
+ npx kenmark-skills setup --ide codex
59
+ npx kenmark-skills setup --ide claude
60
+ npx kenmark-skills setup --ide gemini
61
+ npx kenmark-skills setup --ide all
42
62
  ```
43
63
 
44
- **Project-scoped (team repo):**
64
+ ### Option B — Local/project install with npx (no global install)
45
65
 
46
66
  ```bash
47
- mkdir -p .cursor/skills
48
- cp -R /path/to/kenmark-skills/skills/user-skills/* .cursor/skills/
67
+ npx kenmark-skills setup --project
49
68
  ```
50
69
 
51
- Commit project-scoped skills only if the whole team should use the same versions.
70
+ For project-local installation (repo-scoped skill folders), use:
71
+
72
+ ```bash
73
+ npx kenmark-skills setup --project
74
+ npx kenmark-skills setup --project --ide all
75
+ ```
52
76
 
53
- ### Option B npm package
77
+ Use `--global` to force user-level install mode explicitly:
54
78
 
55
79
  ```bash
56
- npm install kenmark-skills
80
+ npx kenmark-skills setup --global --ide all
57
81
  ```
58
82
 
59
- Published files live under `node_modules/kenmark-skills/skills/user-skills/`. Copy that folder into `~/.cursor/skills/`, `~/.agents/skills/`, or your project's skills path (same as Option A).
83
+ If new Claude slash commands do not appear immediately, restart Claude Code.
60
84
 
61
85
  Verify what will ship before publishing:
62
86
 
@@ -1,5 +1,26 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## v2026.06.02-1938-claude-command-wrappers
4
+ - Updated setup installer to generate Claude Code slash-command wrappers under `.claude/commands` for every shipped Kenmark skill.
5
+ - This enables direct slash usage (for example `/kenmark-init-brain`) in addition to selecting skills from `/skills`.
6
+ - Updated README to document Claude wrapper commands and restart note.
7
+
8
+ ## v2026.06.02-1930-readme-npx-first-install
9
+ - Updated README install guidance to remove the clone-based setup path.
10
+ - Reframed Option B as local/project installation via `npx kenmark-skills setup --project`.
11
+ - Kept install flow focused on global npm install and npx-based usage.
12
+
13
+ ## v2026.06.02-1925-cli-setup-modes-targets
14
+ - Added package CLI entrypoint so setup can run as `npx kenmark-skills setup` (plus existing `kenmark-skills-setup` bin).
15
+ - Expanded setup script to support install modes: `--global` (default) and `--project`.
16
+ - Added broader harness target mappings: Cursor, Codex, Claude, Gemini, OpenCode, Kiro, Trae (`trae` and `trae-cn`), Rovo, and Qoder.
17
+ - Updated README install docs with new command syntax, install modes, and expanded target list.
18
+
19
+ ## v2026.06.02-1920-global-setup-script
20
+ - Updated install docs so Option A is now global npm install with a one-command setup flow.
21
+ - Added `scripts/setup-skills.js` to auto-copy packaged skills to detected IDE paths (`~/.cursor/skills`, `~/.agents/skills`, `~/.claude/skills`) with `--ide` override flags.
22
+ - Wired setup into `package.json` via `setup:skills` script and global `kenmark-skills-setup` bin.
23
+
3
24
  ## v2026.06.02-1912-init-brain-user-choice
4
25
  - init-brain now asks which agent config files to sync instead of creating all targets by default.
5
26
  - Brain scaffold still always runs; only user-selected files (CLAUDE.md, AGENTS.md, Cursor, GEMINI.md) are written.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kenmark-skills",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
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,
@@ -9,12 +9,20 @@
9
9
  "skills/user-skills/**/*",
10
10
  "skills/user-skills-manifest.md",
11
11
  "skills/COPIED_SKILLS.md",
12
- "brain/CHANGELOG.md"
12
+ "brain/CHANGELOG.md",
13
+ "scripts/setup-skills.js",
14
+ "scripts/cli.js"
13
15
  ],
14
16
  "scripts": {
17
+ "setup": "node scripts/cli.js setup",
18
+ "setup:skills": "node scripts/setup-skills.js",
15
19
  "pack:check": "npm pack --dry-run",
16
20
  "publish:public": "npm publish --access public"
17
21
  },
22
+ "bin": {
23
+ "kenmark-skills": "scripts/cli.js",
24
+ "kenmark-skills-setup": "scripts/setup-skills.js"
25
+ },
18
26
  "keywords": [
19
27
  "kenmark",
20
28
  "cursor",
package/scripts/cli.js ADDED
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require("child_process");
4
+ const path = require("path");
5
+
6
+ const args = process.argv.slice(2);
7
+ const command = args[0];
8
+
9
+ function printUsage() {
10
+ console.log("kenmark-skills CLI");
11
+ console.log("");
12
+ console.log("Usage:");
13
+ console.log(" kenmark-skills setup [--global|--project] [--ide <target>]");
14
+ console.log(" kenmark-skills help");
15
+ console.log("");
16
+ console.log("Examples:");
17
+ console.log(" npx kenmark-skills setup");
18
+ console.log(" npx kenmark-skills setup --project --ide cursor");
19
+ console.log(" npx kenmark-skills setup --global --ide all");
20
+ }
21
+
22
+ if (!command || command === "help" || command === "--help" || command === "-h") {
23
+ printUsage();
24
+ process.exit(0);
25
+ }
26
+
27
+ if (command === "setup") {
28
+ const scriptPath = path.join(__dirname, "setup-skills.js");
29
+ const forwardedArgs = args.slice(1);
30
+ const result = spawnSync(process.execPath, [scriptPath, ...forwardedArgs], {
31
+ stdio: "inherit"
32
+ });
33
+ process.exit(result.status === null ? 1 : result.status);
34
+ }
35
+
36
+ console.error(`Unknown command: ${command}`);
37
+ printUsage();
38
+ process.exit(1);
@@ -0,0 +1,192 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+ const os = require("os");
6
+
7
+ const homeDir = os.homedir();
8
+ const projectDir = process.cwd();
9
+ const repoRoot = path.resolve(__dirname, "..");
10
+ const sourceDir = path.join(repoRoot, "skills", "user-skills");
11
+
12
+ const globalTargets = {
13
+ cursor: path.join(homeDir, ".cursor", "skills"),
14
+ codex: path.join(homeDir, ".agents", "skills"),
15
+ claude: path.join(homeDir, ".claude", "skills"),
16
+ gemini: path.join(homeDir, ".gemini", "skills"),
17
+ opencode: path.join(homeDir, ".opencode", "skills"),
18
+ kiro: path.join(homeDir, ".kiro", "skills"),
19
+ trae: path.join(homeDir, ".trae", "skills"),
20
+ "trae-cn": path.join(homeDir, ".trae-cn", "skills"),
21
+ rovo: path.join(homeDir, ".rovodev", "skills"),
22
+ qoder: path.join(homeDir, ".qoder", "skills")
23
+ };
24
+
25
+ const projectTargets = {
26
+ cursor: path.join(projectDir, ".cursor", "skills"),
27
+ codex: path.join(projectDir, ".agents", "skills"),
28
+ claude: path.join(projectDir, ".claude", "skills"),
29
+ gemini: path.join(projectDir, ".gemini", "skills"),
30
+ opencode: path.join(projectDir, ".opencode", "skills"),
31
+ kiro: path.join(projectDir, ".kiro", "skills"),
32
+ trae: path.join(projectDir, ".trae", "skills"),
33
+ "trae-cn": path.join(projectDir, ".trae-cn", "skills"),
34
+ rovo: path.join(projectDir, ".rovodev", "skills"),
35
+ qoder: path.join(projectDir, ".qoder", "skills")
36
+ };
37
+
38
+ function printUsage() {
39
+ console.log("Usage: kenmark-skills-setup [--global|--project] [--ide <target>]");
40
+ console.log("Targets: cursor, codex, claude, gemini, opencode, kiro, trae, trae-cn, rovo, qoder, all");
41
+ console.log("Examples:");
42
+ console.log(" kenmark-skills-setup");
43
+ console.log(" kenmark-skills-setup --ide cursor");
44
+ console.log(" kenmark-skills-setup --project --ide all");
45
+ console.log(" npx kenmark-skills setup --global --ide gemini");
46
+ console.log(" npm run setup:skills -- --ide all");
47
+ }
48
+
49
+ function parseArgs(argv) {
50
+ const args = { ide: null, mode: "global" };
51
+ for (let i = 0; i < argv.length; i += 1) {
52
+ const token = argv[i];
53
+ if (token === "--help" || token === "-h") {
54
+ args.help = true;
55
+ continue;
56
+ }
57
+ if (token === "--ide") {
58
+ args.ide = argv[i + 1] || null;
59
+ i += 1;
60
+ continue;
61
+ }
62
+ if (token === "--project") {
63
+ args.mode = "project";
64
+ continue;
65
+ }
66
+ if (token === "--global") {
67
+ args.mode = "global";
68
+ continue;
69
+ }
70
+ }
71
+ return args;
72
+ }
73
+
74
+ function detectInstalledIdes(targetMap) {
75
+ const detected = [];
76
+ for (const [ide, targetPath] of Object.entries(targetMap)) {
77
+ const parent = path.dirname(targetPath);
78
+ if (fs.existsSync(parent)) {
79
+ detected.push(ide);
80
+ }
81
+ }
82
+ return detected;
83
+ }
84
+
85
+ function ensureTargetPath(targetPath) {
86
+ fs.mkdirSync(targetPath, { recursive: true });
87
+ }
88
+
89
+ function ensureParentDir(filePath) {
90
+ fs.mkdirSync(path.dirname(filePath), { recursive: true });
91
+ }
92
+
93
+ function copyDirectoryContents(sourcePath, targetPath) {
94
+ const entries = fs.readdirSync(sourcePath, { withFileTypes: true });
95
+ for (const entry of entries) {
96
+ const sourceEntryPath = path.join(sourcePath, entry.name);
97
+ const targetEntryPath = path.join(targetPath, entry.name);
98
+ if (entry.isDirectory()) {
99
+ fs.rmSync(targetEntryPath, { recursive: true, force: true });
100
+ fs.cpSync(sourceEntryPath, targetEntryPath, { recursive: true });
101
+ } else if (entry.isFile()) {
102
+ fs.copyFileSync(sourceEntryPath, targetEntryPath);
103
+ }
104
+ }
105
+ }
106
+
107
+ function createClaudeCommandWrappers(basePath) {
108
+ const commandsDir = path.join(path.dirname(basePath), "commands");
109
+ const skills = fs
110
+ .readdirSync(sourceDir, { withFileTypes: true })
111
+ .filter((entry) => entry.isDirectory())
112
+ .map((entry) => entry.name)
113
+ .sort();
114
+
115
+ for (const skillName of skills) {
116
+ const commandFile = path.join(commandsDir, `kenmark-${skillName}.md`);
117
+ const commandBody = [
118
+ `# Kenmark ${skillName}`,
119
+ "",
120
+ `Use the \`${skillName}\` skill from installed user skills.`,
121
+ "",
122
+ "Instructions:",
123
+ `- Invoke and follow the \`${skillName}\` skill from the user skills directory.`,
124
+ "- Execute the skill workflow end-to-end for the current request.",
125
+ "- If required context is missing, ask concise clarifying questions first."
126
+ ].join("\n");
127
+ ensureParentDir(commandFile);
128
+ fs.writeFileSync(commandFile, `${commandBody}\n`, "utf8");
129
+ }
130
+
131
+ return { commandsDir, count: skills.length };
132
+ }
133
+
134
+ function run() {
135
+ const args = parseArgs(process.argv.slice(2));
136
+ if (args.help) {
137
+ printUsage();
138
+ process.exit(0);
139
+ }
140
+
141
+ if (!fs.existsSync(sourceDir)) {
142
+ console.error(`Source skills directory missing: ${sourceDir}`);
143
+ process.exit(1);
144
+ }
145
+
146
+ const targetMap = args.mode === "project" ? projectTargets : globalTargets;
147
+ const requestedIde = args.ide ? String(args.ide).toLowerCase() : null;
148
+ let targetIdes = [];
149
+
150
+ if (requestedIde) {
151
+ if (requestedIde === "all") {
152
+ targetIdes = Object.keys(targetMap);
153
+ } else if (targetMap[requestedIde]) {
154
+ targetIdes = [requestedIde];
155
+ } else {
156
+ console.error(`Unknown --ide value: ${args.ide}`);
157
+ printUsage();
158
+ process.exit(1);
159
+ }
160
+ } else {
161
+ targetIdes = detectInstalledIdes(targetMap);
162
+ if (targetIdes.length === 0) {
163
+ targetIdes = ["cursor"];
164
+ if (args.mode === "project") {
165
+ console.log("No known project skill directories found. Defaulting to .cursor/skills.");
166
+ } else {
167
+ console.log("No known global IDE config directories found. Defaulting to ~/.cursor/skills.");
168
+ }
169
+ }
170
+ }
171
+
172
+ console.log(`Operating system: ${process.platform}`);
173
+ console.log(`Install mode: ${args.mode}`);
174
+ console.log(`Installing skills from: ${sourceDir}`);
175
+
176
+ for (const ide of targetIdes) {
177
+ const targetPath = targetMap[ide];
178
+ ensureTargetPath(targetPath);
179
+ copyDirectoryContents(sourceDir, targetPath);
180
+ console.log(`Installed skills for ${ide}: ${targetPath}`);
181
+ if (ide === "claude") {
182
+ const result = createClaudeCommandWrappers(targetPath);
183
+ console.log(
184
+ `Installed Claude command wrappers (${result.count}): ${result.commandsDir}`
185
+ );
186
+ }
187
+ }
188
+
189
+ console.log("Done.");
190
+ }
191
+
192
+ run();