fix(hub-guide): install as one unit ~/.claude/skills/hub-guide/

Not split per-skill directory. Single symlink/copy of the entire plugin. Skills are
auto-discovered from ~/.claude/skills/<name>/skills/<skill>/SKILL.md.
This commit is contained in:
asepharyana
2026-07-25 11:56:26 +07:00
parent 39f3f093fe
commit 75cbe31bac
3 changed files with 16 additions and 59 deletions
+1 -7
View File
@@ -33,17 +33,11 @@ Skills activate automatically when Claude detects relevant context (language, fr
git clone https://github.com/asepharyana/asepharyana-hub-hub-guide.git
cd asepharyana-hub-hub-guide
# Copy all 26 skills (recommended)
# Install as one unit (recommended)
./install.sh
# Or symlink (edits in this repo are live)
./install.sh --link
# Install only specific skills
./install.sh clean-code testing docker
# Configure hooks (auto-detect project type on session start)
./setup-hooks.sh
```
## Usage
+14 -52
View File
@@ -1,14 +1,12 @@
#!/bin/bash
# install.sh — hub-guide skill installer for Claude Code
# install.sh — hub-guide installer for Claude Code
#
# Skills go to ~/.claude/skills/<name>/ where Claude Code auto-discovers them.
# Hooks can be configured manually (see README).
# Installs the entire hub-guide directory as one unit into ~/.claude/skills/.
# Claude Code auto-discovers skills from ~/.claude/skills/<name>/skills/<skill>/SKILL.md
#
# Usage:
# ./install.sh # Copy all 26 skills to ~/.claude/skills/
# ./install.sh --link # Symlink (edits in this repo are live)
# ./install.sh clean-code testing # Install specific skills only
# ./install.sh --link clean-code # Symlink specific skills
# ./install.sh # Copy hub-guide to ~/.claude/skills/
# ./install.sh --link # Symlink (edits live)
#
# Requires: Claude Code
@@ -17,70 +15,34 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILLS_DIR="${HOME}/.claude/skills"
LINK_MODE=false
FILTER_SKILLS=()
# Parse args
for arg in "$@"; do
case "$arg" in
--link) LINK_MODE=true ;;
--*) echo "Unknown option: $arg"; exit 1 ;;
*) FILTER_SKILLS+=("$arg") ;;
--*) echo "Unknown: $arg"; exit 1 ;;
esac
done
echo "📐 hub-guide installer"
echo " Target: ${SKILLS_DIR}/"
echo " Target: ${SKILLS_DIR}/hub-guide/"
echo " Mode: $([ "$LINK_MODE" = true ] && echo 'symlink' || echo 'copy')"
echo ""
# Ensure target dir exists
mkdir -p "$SKILLS_DIR"
DST="${SKILLS_DIR}/hub-guide"
if [ ${#FILTER_SKILLS[@]} -gt 0 ]; then
INSTALL_LIST=()
for skill in "${FILTER_SKILLS[@]}"; do
skill_name=$(basename "$skill")
src="${SCRIPT_DIR}/skills/${skill_name}"
if [ -d "$src" ]; then
INSTALL_LIST+=("$skill_name")
else
echo " ⚠️ Skill '${skill_name}' not found"
fi
done
if [ "$LINK_MODE" = true ]; then
rm -rf "$DST"
ln -sf "$SCRIPT_DIR" "$DST"
else
# Gather all skills from source
INSTALL_LIST=()
for d in "${SCRIPT_DIR}/skills/"*/; do
INSTALL_LIST+=("$(basename "$d")")
done
rm -rf "$DST"
cp -r "$SCRIPT_DIR" "$DST"
fi
installed=0
for skill_name in "${INSTALL_LIST[@]}"; do
src="${SCRIPT_DIR}/skills/${skill_name}"
dst="${SKILLS_DIR}/${skill_name}"
if [ "$LINK_MODE" = true ]; then
rm -rf "$dst"
ln -sf "$src" "$dst"
else
rm -rf "$dst"
mkdir -p "$(dirname "$dst")"
cp -r "$src" "$dst"
fi
echo "${skill_name}"
installed=$((installed + 1))
done
echo ""
echo "${installed} skill(s) installed to ${SKILLS_DIR}/"
echo "✅ hub-guide installed to ${DST}/"
if [ "$LINK_MODE" = true ]; then
echo " (symlink — edits in this repo are live)"
fi
echo ""
echo " Restart Claude Code or run /reload."
echo " Skills auto-trigger when you work — no commands needed."
echo ""
echo "📌 Hooks (auto-detect project):"
echo " For hooks support, add to ~/.claude/settings.local.json or"
echo " run: ./setup-hooks.sh"
+1
View File
@@ -0,0 +1 @@
/mnt/code/asepharyana-hub/plugins/hub-guide