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:
@@ -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
|
git clone https://github.com/asepharyana/asepharyana-hub-hub-guide.git
|
||||||
cd asepharyana-hub-hub-guide
|
cd asepharyana-hub-hub-guide
|
||||||
|
|
||||||
# Copy all 26 skills (recommended)
|
# Install as one unit (recommended)
|
||||||
./install.sh
|
./install.sh
|
||||||
|
|
||||||
# Or symlink (edits in this repo are live)
|
# Or symlink (edits in this repo are live)
|
||||||
./install.sh --link
|
./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
|
## Usage
|
||||||
|
|||||||
+14
-52
@@ -1,14 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/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.
|
# Installs the entire hub-guide directory as one unit into ~/.claude/skills/.
|
||||||
# Hooks can be configured manually (see README).
|
# Claude Code auto-discovers skills from ~/.claude/skills/<name>/skills/<skill>/SKILL.md
|
||||||
#
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# ./install.sh # Copy all 26 skills to ~/.claude/skills/
|
# ./install.sh # Copy hub-guide to ~/.claude/skills/
|
||||||
# ./install.sh --link # Symlink (edits in this repo are live)
|
# ./install.sh --link # Symlink (edits live)
|
||||||
# ./install.sh clean-code testing # Install specific skills only
|
|
||||||
# ./install.sh --link clean-code # Symlink specific skills
|
|
||||||
#
|
#
|
||||||
# Requires: Claude Code
|
# Requires: Claude Code
|
||||||
|
|
||||||
@@ -17,70 +15,34 @@ set -euo pipefail
|
|||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
SKILLS_DIR="${HOME}/.claude/skills"
|
SKILLS_DIR="${HOME}/.claude/skills"
|
||||||
LINK_MODE=false
|
LINK_MODE=false
|
||||||
FILTER_SKILLS=()
|
|
||||||
|
|
||||||
# Parse args
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
--link) LINK_MODE=true ;;
|
--link) LINK_MODE=true ;;
|
||||||
--*) echo "Unknown option: $arg"; exit 1 ;;
|
--*) echo "Unknown: $arg"; exit 1 ;;
|
||||||
*) FILTER_SKILLS+=("$arg") ;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "📐 hub-guide installer"
|
echo "📐 hub-guide installer"
|
||||||
echo " Target: ${SKILLS_DIR}/"
|
echo " Target: ${SKILLS_DIR}/hub-guide/"
|
||||||
echo " Mode: $([ "$LINK_MODE" = true ] && echo 'symlink' || echo 'copy')"
|
echo " Mode: $([ "$LINK_MODE" = true ] && echo 'symlink' || echo 'copy')"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Ensure target dir exists
|
|
||||||
mkdir -p "$SKILLS_DIR"
|
mkdir -p "$SKILLS_DIR"
|
||||||
|
DST="${SKILLS_DIR}/hub-guide"
|
||||||
|
|
||||||
if [ ${#FILTER_SKILLS[@]} -gt 0 ]; then
|
if [ "$LINK_MODE" = true ]; then
|
||||||
INSTALL_LIST=()
|
rm -rf "$DST"
|
||||||
for skill in "${FILTER_SKILLS[@]}"; do
|
ln -sf "$SCRIPT_DIR" "$DST"
|
||||||
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
|
|
||||||
else
|
else
|
||||||
# Gather all skills from source
|
rm -rf "$DST"
|
||||||
INSTALL_LIST=()
|
cp -r "$SCRIPT_DIR" "$DST"
|
||||||
for d in "${SCRIPT_DIR}/skills/"*/; do
|
|
||||||
INSTALL_LIST+=("$(basename "$d")")
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
installed=0
|
echo "✅ hub-guide installed to ${DST}/"
|
||||||
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}/"
|
|
||||||
if [ "$LINK_MODE" = true ]; then
|
if [ "$LINK_MODE" = true ]; then
|
||||||
echo " (symlink — edits in this repo are live)"
|
echo " (symlink — edits in this repo are live)"
|
||||||
fi
|
fi
|
||||||
echo ""
|
echo ""
|
||||||
echo " Restart Claude Code or run /reload."
|
echo " Restart Claude Code or run /reload."
|
||||||
echo " Skills auto-trigger when you work — no commands needed."
|
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"
|
|
||||||
|
|||||||
Symlink
+1
@@ -0,0 +1 @@
|
|||||||
|
/mnt/code/asepharyana-hub/plugins/hub-guide
|
||||||
Reference in New Issue
Block a user