skillpull 0.2.0 → 0.2.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.
- package/package.json +1 -1
- package/skillpull +33 -28
package/package.json
CHANGED
package/skillpull
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
3
|
|
|
4
|
-
VERSION="0.2.
|
|
4
|
+
VERSION="0.2.1"
|
|
5
5
|
MANIFEST_FILE=".skillpull.json"
|
|
6
6
|
TMPDIR_PREFIX="skillpull"
|
|
7
7
|
CONFIG_DIR="$HOME/.config/skillpull"
|
|
8
8
|
CONFIG_FILE="$CONFIG_DIR/config.json"
|
|
9
9
|
|
|
10
|
-
# ── Agent targets ──
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
)
|
|
10
|
+
# ── Agent targets (bash 3 compatible) ──
|
|
11
|
+
agent_project() {
|
|
12
|
+
case "$1" in
|
|
13
|
+
claude) echo ".claude/skills" ;;
|
|
14
|
+
codex) echo ".codex/skills" ;;
|
|
15
|
+
kiro) echo ".kiro/skills" ;;
|
|
16
|
+
cursor) echo ".cursor/rules" ;;
|
|
17
|
+
esac
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
agent_global() {
|
|
21
|
+
case "$1" in
|
|
22
|
+
claude) echo "$HOME/.claude/skills" ;;
|
|
23
|
+
codex) echo "$HOME/.codex/skills" ;;
|
|
24
|
+
kiro) echo "$HOME/.kiro/skills" ;;
|
|
25
|
+
cursor) echo "" ;;
|
|
26
|
+
esac
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
agent_format() {
|
|
30
|
+
case "$1" in
|
|
31
|
+
claude) echo "skill" ;;
|
|
32
|
+
codex) echo "skill" ;;
|
|
33
|
+
kiro) echo "skill" ;;
|
|
34
|
+
cursor) echo "mdc" ;;
|
|
35
|
+
esac
|
|
36
|
+
}
|
|
32
37
|
|
|
33
38
|
DEFAULT_AGENT="claude"
|
|
34
39
|
|
|
@@ -223,14 +228,14 @@ resolve_target_dir() {
|
|
|
223
228
|
return
|
|
224
229
|
fi
|
|
225
230
|
if [[ "$is_global" == "1" ]]; then
|
|
226
|
-
local gdir="$
|
|
231
|
+
local gdir; gdir="$(agent_global "$agent")"
|
|
227
232
|
if [[ -z "$gdir" ]]; then
|
|
228
233
|
err "$agent does not support global rules (no file-based global path)"
|
|
229
234
|
return 1
|
|
230
235
|
fi
|
|
231
236
|
echo "$gdir"
|
|
232
237
|
else
|
|
233
|
-
echo "$
|
|
238
|
+
echo "$(agent_project "$agent")"
|
|
234
239
|
fi
|
|
235
240
|
}
|
|
236
241
|
|
|
@@ -323,7 +328,7 @@ get_branch() {
|
|
|
323
328
|
|
|
324
329
|
cmd_pull() {
|
|
325
330
|
local repo_url="$1" skill_filter="${2:-}" target_dir="$3" force="${4:-0}" dry_run="${5:-0}" agent="${6:-claude}"
|
|
326
|
-
local fmt="$
|
|
331
|
+
local fmt; fmt="$(agent_format "$agent")"
|
|
327
332
|
make_tmp
|
|
328
333
|
local tmpdir="$_TMPDIR"
|
|
329
334
|
|
|
@@ -487,7 +492,7 @@ cmd_installed() {
|
|
|
487
492
|
|
|
488
493
|
cmd_remove() {
|
|
489
494
|
local skill_name="$1" target_dir="$2" agent="${3:-claude}"
|
|
490
|
-
local fmt="$
|
|
495
|
+
local fmt; fmt="$(agent_format "$agent")"
|
|
491
496
|
|
|
492
497
|
if [[ "$fmt" == "mdc" ]]; then
|
|
493
498
|
local dest="$target_dir/${skill_name}.mdc"
|
|
@@ -576,7 +581,7 @@ cmd_update() {
|
|
|
576
581
|
|
|
577
582
|
cmd_push() {
|
|
578
583
|
local target_dir="$1" repo_url="$2" agent="$3"
|
|
579
|
-
local fmt="$
|
|
584
|
+
local fmt; fmt="$(agent_format "$agent")"
|
|
580
585
|
|
|
581
586
|
if [[ ! -d "$target_dir" ]]; then
|
|
582
587
|
err "No skills directory found at $target_dir"
|