@petersobhy/ai-toolkit 1.7.1 → 1.8.1

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 (2) hide show
  1. package/index.js +16 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -122,16 +122,24 @@ async function cmdUpdate() {
122
122
  console.log('\nRestart Claude Code to activate updated skills.');
123
123
  }
124
124
 
125
+ async function fetchManifest() {
126
+ try {
127
+ return JSON.parse(await get(`${RAW_BASE}/skills.json`));
128
+ } catch {
129
+ return {};
130
+ }
131
+ }
132
+
125
133
  async function cmdList() {
126
- const available = await listAvailable();
127
- const installed = listInstalled();
134
+ const [manifest, installed] = await Promise.all([fetchManifest(), listInstalled()]);
135
+ const names = Object.keys(manifest).sort();
136
+ if (names.length === 0) {
137
+ console.log('No skills found.');
138
+ return;
139
+ }
128
140
  console.log('Available skills:\n');
129
- for (const name of available) {
130
- let version = null;
131
- try {
132
- const content = await get(`${RAW_BASE}/${SKILLS_PATH}/${name}/SKILL.md`);
133
- version = parseVersion(content);
134
- } catch { /* skip if fetch fails */ }
141
+ for (const name of names) {
142
+ const version = manifest[name]?.version;
135
143
  const versionTag = version ? ` v${version}` : '';
136
144
  const installedTag = installed.includes(name) ? ' (installed)' : '';
137
145
  console.log(` ${name}${versionTag}${installedTag}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petersobhy/ai-toolkit",
3
- "version": "1.7.1",
3
+ "version": "1.8.1",
4
4
  "description": "Install and manage AI skills for Claude Code",
5
5
  "bin": {
6
6
  "ai-toolkit": "./index.js"