agentskillscanner 0.1.0 → 0.1.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.
Files changed (3) hide show
  1. package/README.md +24 -0
  2. package/dist/index.js +11 -3
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -52,6 +52,18 @@ agentskillscanner --level user,project
52
52
  agentskillscanner --verbose
53
53
  ```
54
54
 
55
+ ### Supported Platforms
56
+
57
+ All scan levels (User, Project, Plugin, Enterprise) are supported on macOS, Linux, and Windows.
58
+
59
+ The Enterprise-level scan directory varies by OS:
60
+
61
+ | OS | Enterprise Directory |
62
+ | ------- | ----------------------------------------- |
63
+ | macOS | `/Library/Application Support/ClaudeCode` |
64
+ | Linux | `/etc/claude-code` |
65
+ | Windows | `C:\ProgramData\ClaudeCode` |
66
+
55
67
  ### Development
56
68
 
57
69
  ```bash
@@ -108,6 +120,18 @@ agentskillscanner --level user,project
108
120
  agentskillscanner --verbose
109
121
  ```
110
122
 
123
+ ### 支援平台
124
+
125
+ 所有掃描層級(User、Project、Plugin、Enterprise)皆支援 macOS、Linux 與 Windows。
126
+
127
+ Enterprise 層級的掃描目錄依作業系統不同:
128
+
129
+ | 作業系統 | Enterprise 目錄 |
130
+ | -------- | ----------------------------------------- |
131
+ | macOS | `/Library/Application Support/ClaudeCode` |
132
+ | Linux | `/etc/claude-code` |
133
+ | Windows | `C:\ProgramData\ClaudeCode` |
134
+
111
135
  ### 開發
112
136
 
113
137
  ```bash
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  import { cli, define } from "gunshi";
2
3
  import { readFileSync, readdirSync, statSync } from "node:fs";
3
4
  import { join, resolve } from "node:path";
@@ -267,10 +268,17 @@ var Scanner = class {
267
268
  for (const hookName of Object.keys(hooksMap).sort()) items.push(this.makePluginSkill(hookName, SkillType.HOOK, hooksJson, pinfo, hookDesc));
268
269
  return items;
269
270
  }
271
+ getEnterpriseDir() {
272
+ switch (platform()) {
273
+ case "darwin": return "/Library/Application Support/ClaudeCode";
274
+ case "linux": return "/etc/claude-code";
275
+ case "win32": return "C:\\ProgramData\\ClaudeCode";
276
+ default: return "";
277
+ }
278
+ }
270
279
  scanEnterprise() {
271
- if (platform() !== "darwin") return [];
272
- const entDir = "/Library/Application Support/ClaudeCode";
273
- if (!isDir(entDir)) return [];
280
+ const entDir = this.getEnterpriseDir();
281
+ if (!entDir || !isDir(entDir)) return [];
274
282
  const items = [];
275
283
  const skillsSub = join(entDir, "skills");
276
284
  if (isDir(skillsSub)) items.push(...this.scanSkillDir(skillsSub, SkillLevel.ENTERPRISE));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentskillscanner",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Scan and report all available skills for AI coding assistants",
6
6
  "license": "MIT",
@@ -14,7 +14,7 @@
14
14
  "node": ">=20"
15
15
  },
16
16
  "scripts": {
17
- "build": "tsdown",
17
+ "build": "tsdown && node -e \"const f='dist/index.js';const c=require('fs').readFileSync(f,'utf8');require('fs').writeFileSync(f,'#!/usr/bin/env node\\n'+c)\"",
18
18
  "dev": "tsx src/index.ts"
19
19
  },
20
20
  "dependencies": {