-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·70 lines (61 loc) · 1.81 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·70 lines (61 loc) · 1.81 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
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env bash
# Install Humanizer as a Claude Code skill.
#
# Usage:
# ./install.sh # install to ~/.claude/skills/humanizer (user-wide)
# ./install.sh --project # install to ./.claude/skills/humanizer (current project)
# ./install.sh --target /path # install to /path/.claude/skills/humanizer
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SOURCE="${SCRIPT_DIR}/SKILL.md"
REFERENCES_DIR="${SCRIPT_DIR}/references"
if [[ ! -f "${SOURCE}" ]]; then
echo "Error: SKILL.md not found at ${SOURCE}" >&2
exit 1
fi
if [[ ! -d "${REFERENCES_DIR}" ]]; then
echo "Error: references/ directory not found at ${REFERENCES_DIR}" >&2
exit 1
fi
TARGET_BASE="${HOME}"
case "${1:-}" in
--project)
TARGET_BASE="$(pwd)"
;;
--target)
if [[ -z "${2:-}" ]]; then
echo "Error: --target requires a path" >&2
exit 1
fi
TARGET_BASE="$2"
;;
"")
;;
*)
echo "Unknown argument: $1" >&2
echo "Usage: $0 [--project | --target /path]" >&2
exit 1
;;
esac
DEST_DIR="${TARGET_BASE}/.claude/skills/humanizer"
DEST_FILE="${DEST_DIR}/SKILL.md"
mkdir -p "${DEST_DIR}"
if [[ -f "${DEST_FILE}" ]]; then
BACKUP="${DEST_FILE}.backup.$(date +%Y%m%d-%H%M%S)"
cp "${DEST_FILE}" "${BACKUP}"
echo "Existing skill backed up to ${BACKUP}"
fi
cp "${SOURCE}" "${DEST_FILE}"
cp -R "${REFERENCES_DIR}" "${DEST_DIR}/references"
echo ""
echo "Humanizer installed to ${DEST_DIR}"
echo " - SKILL.md (core)"
echo " - references/ (progressive-disclosure files: patterns.md, channels.md)"
echo ""
echo "Try it:"
echo " In Claude Code, type: /humanizer"
echo " Or: humanize this draft"
echo ""
echo "First-run setup (optional):"
echo " humanizer setup"
echo ""