skill-port 0.1.2 → 0.1.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
@@ -1,5 +1,11 @@
1
1
  # skill-port
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/skill-port?logo=npm)](https://www.npmjs.com/package/skill-port)
4
+ [![npm downloads](https://img.shields.io/npm/dm/skill-port)](https://www.npmjs.com/package/skill-port)
5
+ [![CI](https://img.shields.io/github/actions/workflow/status/lu-zhengda/skill-port/ci.yml?branch=main&label=ci)](https://github.com/lu-zhengda/skill-port/actions/workflows/ci.yml)
6
+ [![Publish](https://img.shields.io/github/actions/workflow/status/lu-zhengda/skill-port/publish.yml?label=publish)](https://github.com/lu-zhengda/skill-port/actions/workflows/publish.yml)
7
+ [![License](https://img.shields.io/github/license/lu-zhengda/skill-port)](./LICENSE)
8
+
3
9
  `skill-port` converts AI coding skill packages between:
4
10
 
5
11
  - `codex`
@@ -13,18 +19,28 @@ The CLI is intentionally simple:
13
19
 
14
20
  ## Install
15
21
 
22
+ From npmjs:
23
+
16
24
  ```bash
17
- npm install
18
- npm run build
19
- npm link
25
+ npx skill-port --help
20
26
  ```
21
27
 
22
- Then run:
28
+ Global install:
23
29
 
24
30
  ```bash
31
+ npm install -g skill-port
25
32
  skill-port --help
26
33
  ```
27
34
 
35
+ Project-local install (if you do not want global install):
36
+
37
+ ```bash
38
+ npm i skill-port
39
+ npx skill-port --help
40
+ ```
41
+
42
+ Note: `npm i skill-port` is a valid local install. To run the CLI from a local install, use `npx skill-port` (or `npm exec skill-port`).
43
+
28
44
  ## Commands
29
45
 
30
46
  ### list
@@ -817,7 +817,14 @@ async function convertSkill(options) {
817
817
  let wroteFiles = false;
818
818
  if (!options.dryRun) {
819
819
  if (path7.resolve(outputDir) === path7.resolve(inputDir)) {
820
- throw new Error("Output directory cannot be the same as input directory.");
820
+ if (sourceProvider === targetProvider) {
821
+ throw new Error(
822
+ `Detected source provider '${sourceProvider}' and target provider '${targetProvider}' for the same skill path (${outputDir}). This is a no-op conversion to the same provider. Choose a different --to provider, or set --target-scope/--out to write elsewhere.`
823
+ );
824
+ }
825
+ throw new Error(
826
+ `Output directory resolves to the input directory (${outputDir}). Set --out (or --target-scope in scoped mode) to a different path.`
827
+ );
821
828
  }
822
829
  await ensureOutputDirectory(outputDir, Boolean(options.overwrite));
823
830
  await copySkillDirectory(inputDir, outputDir);
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  formatTextReport,
7
7
  listSkillsByScope,
8
8
  validateSkillName
9
- } from "./chunk-UGQBG2TQ.js";
9
+ } from "./chunk-OZ2PBTWL.js";
10
10
 
11
11
  // src/cli.ts
12
12
  import path from "path";
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  formatSkillsText,
6
6
  formatTextReport,
7
7
  listSkillsByScope
8
- } from "./chunk-UGQBG2TQ.js";
8
+ } from "./chunk-OZ2PBTWL.js";
9
9
  export {
10
10
  StrictModeError,
11
11
  convertScopedSkill,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skill-port",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Convert AI coding skills across OpenAI/Codex, Claude Code, and Cursor Skills formats.",
5
5
  "license": "MIT",
6
6
  "type": "module",