ccski 2.3.0 → 2.3.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
@@ -12,6 +12,7 @@ Documentation site: https://jixoai-labs.github.io/ccski/
12
12
  - [Core CLI commands](#core-cli-commands)
13
13
  - [Install examples](#install-examples)
14
14
  - [Enable/disable](#enabledisable)
15
+ - [Discovery roots and priority](#discovery-roots-and-priority)
15
16
  - [More](#more)
16
17
  - [Acknowledgements](#acknowledgements)
17
18
  - [API Reference](#api-reference)
@@ -87,6 +88,27 @@ ccski enable -i
87
88
  ccski disable --all
88
89
  ```
89
90
 
91
+ ### Discovery roots and priority
92
+
93
+ By default ccski scans shared and agent-specific skill roots in the workspace and user
94
+ home directory. Built-in agent roots include `.claude/skills`, `.codex/skills`,
95
+ `.gemini/skills`, and `.openclaw/skills`; ccski also discovers shallow dynamic
96
+ agent roots such as `.<agent>/skills`.
97
+
98
+ When `auto` selection sees the same skill name in multiple roots, ccski keeps every
99
+ copy internally but chooses one by source priority:
100
+
101
+ 1. `--skill-dir` custom roots
102
+ 2. `<workspace>/.<agent>/skills`
103
+ 3. `<workspace>/.agents/skills`
104
+ 4. `<workspace>/skills`
105
+ 5. `~/.<agent>/skills`
106
+ 6. `~/.agents/skills`
107
+ 7. Claude plugin skills
108
+
109
+ If two copies have the same source priority, the newer `SKILL.md` or `.SKILL.md`
110
+ mtime wins. If mtimes also tie, provider ordering is deterministic.
111
+
90
112
  ## More
91
113
 
92
114
  - Programmatic API is available from the package export; see [API Reference](#api-reference) (or the docs site) for usage examples.
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { x as __require } from "./create-prompt-CIJV_96B.mjs";
3
- import { $ as AmbiguousSkillNameError, A as highlight, C as formatSkillLabel, D as error, E as duplicateBadge, F as tone, I as warn, L as containsCaseInsensitive, M as renderList, N as setColorEnabled, O as formatBytes, P as success, R as rankStrings, S as SkillRegistry, T as dim, U as compareSkillProviders, W as providerNamesFromSkills, _ as listSkills, a as InstallCancelledError, b as computeDuplicateGroups, f as validateSkill, g as resolveSkill, h as getSkillInfo, i as toggleSkills, j as info, k as heading, l as installSkills, n as MultiSelectError, nt as SkillNotFoundError, o as MultiSkillSelectionError, p as searchSkills, r as ToggleCancelledError, s as createConsoleInstallOutput, t as startMCPServer, u as registerInstallCleanupHandlers, v as buildRegistryOptions, w as colors, x as parseFilters, y as applyFilters } from "./server-y5_8eQ5a.mjs";
4
- import { statSync } from "node:fs";
3
+ import { $ as AmbiguousSkillNameError, A as highlight, C as formatSkillLabel, D as error, E as duplicateBadge, F as tone, I as warn, L as containsCaseInsensitive, M as renderList, N as setColorEnabled, O as formatBytes, P as success, R as rankStrings, S as SkillRegistry, T as dim, U as compareSkillProviders, W as providerNamesFromSkills, _ as listSkills, a as InstallCancelledError, b as computeDuplicateGroups, f as validateSkill, g as resolveSkill, h as getSkillInfo, i as toggleSkills, j as info, k as heading, l as installSkills, n as MultiSelectError, nt as SkillNotFoundError, o as MultiSkillSelectionError, p as searchSkills, r as ToggleCancelledError, s as createConsoleInstallOutput, t as startMCPServer, u as registerInstallCleanupHandlers, v as buildRegistryOptions, w as colors, x as parseFilters, y as applyFilters } from "./server-DwuqhC__.mjs";
4
+ import { readFileSync, statSync } from "node:fs";
5
5
  import { readFileSync as readFileSync$1, readdirSync as readdirSync$1, statSync as statSync$1, writeFile } from "fs";
6
6
  import { homedir } from "node:os";
7
7
  import { join } from "node:path";
@@ -4553,6 +4553,19 @@ async function validateCommand(argv) {
4553
4553
  }
4554
4554
  }
4555
4555
 
4556
+ //#endregion
4557
+ //#region src/package-version.ts
4558
+ function isRecord(value) {
4559
+ return typeof value === "object" && value !== null && !Array.isArray(value);
4560
+ }
4561
+ function readPackageVersion() {
4562
+ try {
4563
+ const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
4564
+ if (isRecord(packageJson) && typeof packageJson.version === "string") return packageJson.version;
4565
+ } catch {}
4566
+ return "unknown";
4567
+ }
4568
+
4556
4569
  //#endregion
4557
4570
  //#region src/cli.ts
4558
4571
  const listModule = {
@@ -4922,7 +4935,7 @@ await yargs_default(hideBin(process.argv)).scriptName("ccski").usage("$0 <comman
4922
4935
  type: "string",
4923
4936
  description: "Override user directory for default skill roots",
4924
4937
  default: homedir()
4925
- }).command(listModule).command(infoModule).command(searchModule).command(validateModule).command(mcpModule).command(installModule).command(disableModule).command(enableModule).demandCommand(1, "Please provide a command").strict().help().alias("h", "help").alias("v", "version").parse();
4938
+ }).command(listModule).command(infoModule).command(searchModule).command(validateModule).command(mcpModule).command(installModule).command(disableModule).command(enableModule).demandCommand(1, "Please provide a command").strict().help().alias("h", "help").version(readPackageVersion()).alias("v", "version").parse();
4926
4939
 
4927
4940
  //#endregion
4928
4941
  export { };