@trendai-crem/claude-skills 1.5.0 → 1.5.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
@@ -92,7 +92,7 @@ Edit `sources.json` and add the plugin name to the appropriate marketplace entry
92
92
  {
93
93
  "type": "marketplace",
94
94
  "name": "ai-skill-marketplace",
95
- "source": "git@github.com:trend-ai-taskforce/ai-skill-marketplace.git",
95
+ "source": "trend-ai-taskforce/ai-skill-marketplace",
96
96
  "plugins": [
97
97
  "existing-plugin",
98
98
  "new-plugin-name"
package/cli.js CHANGED
@@ -163,16 +163,16 @@ function setupAutoUpdate() {
163
163
 
164
164
  settings.hooks ??= {};
165
165
 
166
+ const isOurHook = e =>
167
+ e.hooks?.some(h => typeof h.command === 'string' &&
168
+ (h.command === installScript || h.command === notifyScript));
169
+
166
170
  settings.hooks.SessionStart ??= [];
167
- settings.hooks.SessionStart = settings.hooks.SessionStart.filter(
168
- e => !e.hooks?.some(h => typeof h.command === 'string' && h.command === installScript)
169
- );
171
+ settings.hooks.SessionStart = settings.hooks.SessionStart.filter(e => !isOurHook(e));
170
172
  settings.hooks.SessionStart.push({ hooks: [{ type: 'command', command: installScript }] });
171
173
 
172
174
  settings.hooks.UserPromptSubmit ??= [];
173
- settings.hooks.UserPromptSubmit = settings.hooks.UserPromptSubmit.filter(
174
- e => !e.hooks?.some(h => typeof h.command === 'string' && h.command === notifyScript)
175
- );
175
+ settings.hooks.UserPromptSubmit = settings.hooks.UserPromptSubmit.filter(e => !isOurHook(e));
176
176
  settings.hooks.UserPromptSubmit.push({ hooks: [{ type: 'command', command: notifyScript }] });
177
177
 
178
178
  const tmpPath = join(tmpdir(), `claude-settings-${process.pid}.json`);
@@ -199,14 +199,14 @@ mkdir -p "$(dirname "$STAMP")"
199
199
 
200
200
  LAST_TS=0
201
201
  if [ -f "$STAMP" ]; then
202
- LAST_TS=$(python3 -c "import json,sys; print(json.load(open(sys.argv[1])).get('ts',0))" "$STAMP" 2>/dev/null || echo 0)
202
+ LAST_TS=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync(process.argv[1],'utf8')).ts||0)}catch{console.log(0)}" "$STAMP" 2>/dev/null || echo 0)
203
203
  fi
204
204
  [[ "$LAST_TS" =~ ^[0-9]+$ ]] || LAST_TS=0
205
205
 
206
206
  NOW=$(date +%s)
207
207
  [ $(( NOW - LAST_TS )) -lt $MIN_INTERVAL ] && exit 0
208
208
 
209
- python3 -c "import json,sys; json.dump({'ts': int(sys.argv[1])}, open(sys.argv[2],'w'))" "$NOW" "$STAMP"
209
+ node -e "require('fs').writeFileSync(process.argv[2],JSON.stringify({ts:+process.argv[1]}))" "$NOW" "$STAMP"
210
210
 
211
211
  LATEST=$(npm view "$PACKAGE" version 2>/dev/null || echo "")
212
212
  [ -z "$LATEST" ] && exit 0
@@ -217,7 +217,7 @@ INSTALL_DIR="$(mktemp -d)"
217
217
  if npm install --prefix "$INSTALL_DIR" "$PACKAGE@$LATEST" --silent 2>/dev/null \\
218
218
  && node "$INSTALL_DIR/node_modules/$PACKAGE/cli.js" >/dev/null 2>&1; then
219
219
  rm -rf "$INSTALL_DIR"
220
- python3 -c "import json,sys; print(json.dumps({'systemMessage': 'claude-skills updated: ' + sys.argv[1] + ' \u2192 ' + sys.argv[2]}))" "$INSTALLED" "$LATEST"
220
+ node -e "console.log(JSON.stringify({systemMessage:'claude-skills updated: '+process.argv[1]+' \u2192 '+process.argv[2]}))" "$INSTALLED" "$LATEST"
221
221
  else
222
222
  rm -rf "$INSTALL_DIR"
223
223
  fi
@@ -241,20 +241,20 @@ mkdir -p "$(dirname "$STAMP")"
241
241
 
242
242
  LAST_TS=0
243
243
  if [ -f "$STAMP" ]; then
244
- LAST_TS=$(python3 -c "import json,sys; print(json.load(open(sys.argv[1])).get('ts',0))" "$STAMP" 2>/dev/null || echo 0)
244
+ LAST_TS=$(node -e "try{console.log(JSON.parse(require('fs').readFileSync(process.argv[1],'utf8')).ts||0)}catch{console.log(0)}" "$STAMP" 2>/dev/null || echo 0)
245
245
  fi
246
246
  [[ "$LAST_TS" =~ ^[0-9]+$ ]] || LAST_TS=0
247
247
 
248
248
  NOW=$(date +%s)
249
249
  [ $(( NOW - LAST_TS )) -lt $MIN_INTERVAL ] && exit 0
250
250
 
251
- python3 -c "import json,sys; json.dump({'ts': int(sys.argv[1])}, open(sys.argv[2],'w'))" "$NOW" "$STAMP"
251
+ node -e "require('fs').writeFileSync(process.argv[2],JSON.stringify({ts:+process.argv[1]}))" "$NOW" "$STAMP"
252
252
 
253
253
  LATEST=$(npm view "$PACKAGE" version 2>/dev/null || echo "")
254
254
  [ -z "$LATEST" ] && exit 0
255
255
  [ "$LATEST" = "$INSTALLED" ] && exit 0
256
256
  [[ "$LATEST" =~ ^[0-9]+\\.[0-9]+\\.[0-9]+(-[a-zA-Z0-9.]+)?$ ]] || exit 0
257
257
 
258
- python3 -c "import json,sys; print(json.dumps({'systemMessage': 'claude-skills update available: ' + sys.argv[1] + ' \u2192 ' + sys.argv[2] + chr(10) + 'Run: npx @trendai-crem/claude-skills@latest'}))" "$INSTALLED" "$LATEST"
258
+ node -e "console.log(JSON.stringify({systemMessage:'claude-skills update available: '+process.argv[1]+' \u2192 '+process.argv[2]+'\\nRun: npx @trendai-crem/claude-skills@latest'}))" "$INSTALLED" "$LATEST"
259
259
  `;
260
260
  }
package/marketplace.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "marketplaces": [
3
3
  {
4
4
  "name": "ai-skill-marketplace",
5
- "source": "git@github.com:trend-ai-taskforce/ai-skill-marketplace.git",
5
+ "source": "trend-ai-taskforce/ai-skill-marketplace",
6
6
  "plugins": [
7
7
  "wiki-tools",
8
8
  "atlassian-tools",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trendai-crem/claude-skills",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Claude Code skills installer for the trendai-crem team",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
package/sources.json CHANGED
@@ -22,7 +22,7 @@
22
22
  {
23
23
  "type": "marketplace",
24
24
  "name": "ai-skill-marketplace",
25
- "source": "git@github.com:trend-ai-taskforce/ai-skill-marketplace.git",
25
+ "source": "trend-ai-taskforce/ai-skill-marketplace",
26
26
  "plugins": [
27
27
  "atlassian-tools",
28
28
  "google-style-guides",
@@ -51,7 +51,7 @@
51
51
  "name": "everything-claude-code",
52
52
  "source": "affaan-m/everything-claude-code",
53
53
  "plugins": [
54
- "everything-claude-code"
54
+ "ecc"
55
55
  ]
56
56
  }
57
57
  ]