@spardutti/claude-skills 1.27.0 → 1.27.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.
@@ -11,8 +11,12 @@ import { join, resolve } from "node:path";
11
11
  // - transcript_path missing or unreadable
12
12
  // - no user prompt found in transcript
13
13
  //
14
- // tool_result lines (which include the gate's own deny message) are
15
- // filtered out of the sentinel scan to prevent self-satisfaction.
14
+ // LAST_PROMPT is detected by matching user-role lines whose content is
15
+ // a JSON string ("role":"user","content":"..."), which excludes
16
+ // tool_results, skill loads, task notifications, and slash-command
17
+ // payloads (all of which use array content). The sentinel scan also
18
+ // excludes tool_result lines so the gate's own deny message — which
19
+ // embeds the literal sentinel — cannot self-satisfy.
16
20
  const GATE_SCRIPT = `#!/bin/bash
17
21
  # PreToolUse gate: forces skill evaluation before file-writing tools run.
18
22
 
@@ -30,12 +34,12 @@ if [ -z "$TRANSCRIPT" ] || [ ! -f "$TRANSCRIPT" ]; then
30
34
  exit 0
31
35
  fi
32
36
 
33
- LAST_PROMPT=$(grep -n '"type":"user"' "$TRANSCRIPT" 2>/dev/null | grep -v 'tool_use_id' | tail -1 | cut -d: -f1)
37
+ LAST_PROMPT=$(grep -nE '"role":"user","content":"' "$TRANSCRIPT" 2>/dev/null | tail -1 | cut -d: -f1)
34
38
  if [ -z "$LAST_PROMPT" ]; then
35
39
  exit 0
36
40
  fi
37
41
 
38
- if tail -n +"$LAST_PROMPT" "$TRANSCRIPT" | grep -v 'tool_use_id' | grep -qF '[skills-checked]'; then
42
+ if tail -n +"$LAST_PROMPT" "$TRANSCRIPT" | grep -v '"type":"tool_result"' | grep -qF '[skills-checked]'; then
39
43
  exit 0
40
44
  fi
41
45
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spardutti/claude-skills",
3
- "version": "1.27.0",
3
+ "version": "1.27.2",
4
4
  "description": "CLI to install Claude Code skills from the claude-skills collection",
5
5
  "type": "module",
6
6
  "bin": {