Files
obsidian-claude-pkm/vault-template/.claude/hooks/skill-discovery.sh
Bill Allred b2151c075a v3.1: Onboarding, upgrade system, and positioning overhaul
Reposition as "AI Accountability System" — not just another PKM starter kit.
README restructured to lead with the cascade as the hero feature.

New skills:
- /review — smart router that auto-detects daily/weekly/monthly context
- /upgrade — built-in update system with backup, diff review, safe merge
- /onboard enhanced — interactive first-run setup (name, review day, goal
  areas, work style) writes vault-config.json and personalizes CLAUDE.md

New infrastructure:
- FIRST_RUN marker + session-init welcome for new vaults
- Skill discovery hook (UserPromptSubmit) — lists available skills when
  user mentions "skill", "help", "command"
- CONTRIBUTING.md with architecture overview and good first issues

README:
- Cascade diagram and flow description as opening hero
- "Not another PKM starter kit" positioning
- Skills table with all 10 skills
- Zero dependencies highlighted as a feature
- v2.1→v3.1 and v1.x→v3.1 upgrade instructions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 20:07:22 +01:00

36 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Skill discovery hook — triggered on UserPromptSubmit
# Lists available skills when user mentions "skill", "help", "command", or "what can"
# Non-blocking: always exits 0
# Read user prompt from stdin
PROMPT=$(cat)
# Case-insensitive check for trigger words
if echo "$PROMPT" | grep -iqE '\b(skills?|commands?|what can|help me|available|slash)\b'; then
echo ""
echo "Available skills (invoke with /skill-name):"
echo ""
SKILLS_DIR="$(pwd)/.claude/skills"
if [ -d "$SKILLS_DIR" ]; then
for skill_dir in "$SKILLS_DIR"/*/; do
if [ -f "$skill_dir/SKILL.md" ]; then
skill_name=$(basename "$skill_dir")
# Extract description from YAML frontmatter
desc=$(sed -n '/^---$/,/^---$/{ /^description:/{ s/^description: *//; p; q; } }' "$skill_dir/SKILL.md")
# Check if user-invocable
invocable=$(sed -n '/^---$/,/^---$/{ /^user-invocable:/{ s/^user-invocable: *//; p; q; } }' "$skill_dir/SKILL.md")
if [ "$invocable" = "true" ]; then
printf " /%s — %s\n" "$skill_name" "$desc"
else
printf " %s (auto) — %s\n" "$skill_name" "$desc"
fi
fi
done
fi
echo ""
fi
exit 0