Add /adopt skill for BYOV (Bring Your Own Vault) support
Adds a 6-phase skill that scaffolds the PKM system onto existing Obsidian
vaults: scan structure, map folders, personalize, generate config, scaffold
missing pieces, and verify. Replaces hardcoded folder paths in hooks with
env var lookups (${VAR:-Default}) so adopted vaults with custom folder names
work correctly while template-based vaults remain unaffected.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,14 +25,19 @@ fi
|
||||
# Generate commit message based on file location
|
||||
TIMESTAMP=$(date +"%Y-%m-%d %H:%M")
|
||||
|
||||
if [[ "$MODIFIED_FILE" == *"Daily Notes"* ]]; then
|
||||
DAILY_DIR="${DAILY_NOTES_DIR:-Daily Notes}"
|
||||
GOALS_DIR_NAME="${GOALS_DIR:-Goals}"
|
||||
PROJECTS_DIR_NAME="${PROJECTS_DIR:-Projects}"
|
||||
TEMPLATES_DIR_NAME="${TEMPLATES_DIR:-Templates}"
|
||||
|
||||
if [[ "$MODIFIED_FILE" == *"$DAILY_DIR"* ]]; then
|
||||
MSG="Update daily note - $TIMESTAMP"
|
||||
elif [[ "$MODIFIED_FILE" == *"Goals"* ]]; then
|
||||
elif [[ "$MODIFIED_FILE" == *"$GOALS_DIR_NAME"* ]]; then
|
||||
MSG="Update goals - $TIMESTAMP"
|
||||
elif [[ "$MODIFIED_FILE" == *"Projects"* ]]; then
|
||||
PROJECT=$(echo "$MODIFIED_FILE" | sed 's|.*/Projects/\([^/]*\)/.*|\1|')
|
||||
elif [[ "$MODIFIED_FILE" == *"$PROJECTS_DIR_NAME"* ]]; then
|
||||
PROJECT=$(echo "$MODIFIED_FILE" | sed "s|.*/$PROJECTS_DIR_NAME/\([^/]*\)/.*|\1|")
|
||||
MSG="Update project: $PROJECT - $TIMESTAMP"
|
||||
elif [[ "$MODIFIED_FILE" == *"Templates"* ]]; then
|
||||
elif [[ "$MODIFIED_FILE" == *"$TEMPLATES_DIR_NAME"* ]]; then
|
||||
MSG="Update template - $TIMESTAMP"
|
||||
else
|
||||
MSG="Vault update - $TIMESTAMP"
|
||||
|
||||
Reference in New Issue
Block a user