@supatent/skills 0.2.1 → 0.3.0

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.
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "supatent",
3
+ "description": "Content authoring skills for Supatent CMS",
4
+ "version": "0.2.2"
5
+ }
package/README.md CHANGED
@@ -12,7 +12,7 @@ Installs AI-powered content authoring skills into your Claude Code environment.
12
12
  npx @supatent/skills
13
13
  ```
14
14
 
15
- This copies skill files to `.claude/skills/supatent/` in your project. Then use `/supatent:core` in Claude Code to get started.
15
+ This installs skills as a Claude Code plugin to `.claude/plugins/supatent/` in your project. Then use `/supatent:core` in Claude Code to get started.
16
16
 
17
17
  ## Included skills
18
18
 
package/bin/install.mjs CHANGED
@@ -4,6 +4,7 @@
4
4
  // Copies bundled skill files to .claude/skills/supatent/ with manifest tracking.
5
5
 
6
6
  import { readFile, writeFile, mkdir, copyFile, readdir, stat } from 'node:fs/promises';
7
+ import { realpathSync } from 'node:fs';
7
8
  import { createHash } from 'node:crypto';
8
9
  import { join, dirname, relative, resolve } from 'node:path';
9
10
  import { fileURLToPath } from 'node:url';
@@ -16,7 +17,9 @@ import { createInterface } from 'node:readline/promises';
16
17
  const __filename = fileURLToPath(import.meta.url);
17
18
  const __dirname = dirname(__filename);
18
19
  const SKILLS_SOURCE_DIR = join(__dirname, '..', 'skills');
19
- const TARGET_SUBDIR = join('.claude', 'skills', 'supatent');
20
+ const PLUGIN_JSON_SOURCE = join(__dirname, '..', '.claude-plugin', 'plugin.json');
21
+ const PLUGIN_ROOT_SUBDIR = join('.claude', 'plugins', 'supatent');
22
+ const TARGET_SUBDIR = join(PLUGIN_ROOT_SUBDIR, 'skills');
20
23
 
21
24
  // ---------------------------------------------------------------------------
22
25
  // Exported helpers (for testability)
@@ -261,6 +264,13 @@ async function main() {
261
264
  console.log(` \x1b[90m-\x1b[0m Skipped ${relPath} (user modified)`);
262
265
  }
263
266
 
267
+ // -----------------------------------------------------------------------
268
+ // Step f2: Copy plugin.json
269
+ // -----------------------------------------------------------------------
270
+ const pluginDir = join(cwd, PLUGIN_ROOT_SUBDIR, '.claude-plugin');
271
+ await mkdir(pluginDir, { recursive: true });
272
+ await copyFile(PLUGIN_JSON_SOURCE, join(pluginDir, 'plugin.json'));
273
+
264
274
  // -----------------------------------------------------------------------
265
275
  // Step g: Write manifest
266
276
  // -----------------------------------------------------------------------
@@ -296,9 +306,9 @@ async function main() {
296
306
  // -----------------------------------------------------------------------
297
307
  console.log('');
298
308
  if (isFreshInstall) {
299
- console.log(`\x1b[32m\u2713\x1b[0m Installed ${filesToCopy.length} files to ${TARGET_SUBDIR}/ (v${version})`);
309
+ console.log(`\x1b[32m\u2713\x1b[0m Installed ${filesToCopy.length} files to ${PLUGIN_ROOT_SUBDIR}/ (v${version})`);
300
310
  } else {
301
- console.log(`\x1b[32m\u2713\x1b[0m Updated ${filesToCopy.length} file${filesToCopy.length === 1 ? '' : 's'} in ${TARGET_SUBDIR}/ (v${version})`);
311
+ console.log(`\x1b[32m\u2713\x1b[0m Updated ${filesToCopy.length} file${filesToCopy.length === 1 ? '' : 's'} in ${PLUGIN_ROOT_SUBDIR}/ (v${version})`);
302
312
  }
303
313
  console.log('');
304
314
  console.log(' Run \x1b[36m/supatent:core\x1b[0m to get started');
@@ -308,7 +318,7 @@ async function main() {
308
318
  // Run main only when executed directly (not when imported for testing)
309
319
  // ---------------------------------------------------------------------------
310
320
 
311
- const isMain = process.argv[1] && resolve(process.argv[1]) === resolve(__filename);
321
+ const isMain = process.argv[1] && realpathSync(resolve(process.argv[1])) === realpathSync(resolve(__filename));
312
322
 
313
323
  if (isMain) {
314
324
  main().catch((err) => {
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "@supatent/skills",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Claude Code content authoring skills for Supatent CMS",
5
5
  "type": "module",
6
6
  "bin": {
7
- "skills": "bin/install.mjs"
7
+ "supatent-skills": "bin/install.mjs"
8
8
  },
9
9
  "files": [
10
10
  "bin",
11
- "skills"
11
+ "skills",
12
+ ".claude-plugin"
12
13
  ],
13
14
  "devDependencies": {
14
15
  "eslint": "^9.16.0",