forked from AgriciDaniel/claude-blog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·58 lines (49 loc) · 1.7 KB
/
uninstall.sh
File metadata and controls
executable file
·58 lines (49 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/env bash
set -euo pipefail
# claude-blog uninstaller
# Cleanly removes all blog skills, agents, templates, and scripts
main() {
local SKILL_DIR="${HOME}/.claude/skills"
local AGENT_DIR="${HOME}/.claude/agents"
echo "=== Uninstalling claude-blog ==="
echo ""
# Remove main skill (includes references, templates, scripts)
if [ -d "${SKILL_DIR}/blog" ]; then
rm -rf "${SKILL_DIR}/blog"
echo " Removed: ${SKILL_DIR}/blog/"
fi
# Remove sub-skills (auto-discovers all blog-* directories)
for skill_dir in "${SKILL_DIR}"/blog-*; do
if [ -d "${skill_dir}" ]; then
rm -rf "${skill_dir}"
echo " Removed: ${skill_dir}/"
fi
done
# Remove agents via glob (closes meta-audit follow-up: prior static list
# missed blog-translator added in v1.7.0; mirror the install.ps1 pattern).
if [ -d "${AGENT_DIR}" ]; then
for agent_file in "${AGENT_DIR}"/blog-*.md; do
if [ -f "${agent_file}" ]; then
rm -f "${agent_file}"
echo " Removed: ${agent_file}"
fi
done
fi
# Purge credential artifacts (mirrors uninstall.ps1 audit fix VULN-805
# follow-up: cookies/tokens left behind post-uninstall is a meaningful
# exposure window).
for cred_path in \
"${HOME}/.config/claude-seo/oauth-token.json" \
"${HOME}/.config/claude-seo/google-api.json"
do
if [ -f "${cred_path}" ]; then
rm -f "${cred_path}"
echo " Removed credential: ${cred_path}"
fi
done
echo ""
echo "=== claude-blog uninstalled ==="
echo ""
echo "Restart Claude Code to complete removal."
}
main "$@"