@delorenj/pjangler 1.2.19 → 1.2.21

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.
@@ -1,45 +0,0 @@
1
- #!/bin/bash
2
- # Remove this project's skill symlinks from shared (global-scope) per-CLI dirs on
3
- # leave, so other projects / your global setup aren't polluted. Project-scoped
4
- # (local-scope) mirrors like ./.kimi-code/skills are left in place — they belong
5
- # to the repo and cost nothing to keep.
6
- #
7
- # Mirrors the SKILL_TARGETS table in link-project-skills-to-clis.sh.
8
- set -euo pipefail
9
-
10
- script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
11
- project_root="$(cd "${script_dir}/../.." && pwd)"
12
- agents_skills="${project_root}/.agents/skills"
13
-
14
- SKILL_TARGETS=(
15
- "${CODEX_HOME:-$HOME/.codex}/skills|global"
16
- "${project_root}/.kimi-code/skills|local"
17
- )
18
-
19
- [ -d "$agents_skills" ] || exit 0
20
-
21
- _readlink_norm() {
22
- local l; l="$(readlink "$1" 2>/dev/null || echo "")"
23
- printf '%s' "${l%/}"
24
- }
25
-
26
- for entry in "${SKILL_TARGETS[@]}"; do
27
- dir="${entry%%|*}"
28
- scope="${entry##*|}"
29
- [ "$scope" = "global" ] || continue
30
- [ -d "$dir" ] || continue
31
-
32
- unlinked=0
33
- for skill_path in "$agents_skills"/*; do
34
- [ -e "$skill_path" ] || continue
35
- name="$(basename "$skill_path")"
36
- [[ "$name" == ".system" ]] && continue
37
- target="${dir}/${name}"
38
- if [ -L "$target" ] && [ "$(_readlink_norm "$target")" = "$skill_path" ]; then
39
- rm "$target"
40
- unlinked=$((unlinked + 1))
41
- fi
42
- done
43
- [ "$unlinked" -gt 0 ] && echo "Unlinked ${unlinked} project skill(s) from ${dir}"
44
- done
45
- exit 0