From 601d1d7adc523e6577b273ae8fd75e44497c55f7 Mon Sep 17 00:00:00 2001 From: amirgeek Date: Mon, 23 Mar 2026 14:38:32 +0000 Subject: [PATCH 1/3] feat: add symlink script for Git submodule usage --- README.md | 11 +++++++++++ bin/link.sh | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100755 bin/link.sh diff --git a/README.md b/README.md index ccad9a4b..bb24a8fb 100644 --- a/README.md +++ b/README.md @@ -162,6 +162,17 @@ cp -r dist/gemini/.gemini your-project/ cp -r dist/codex/.codex/* ~/.codex/ ``` +### Option 3: Git Submodule (Advanced) + +If you'd like to keep Impeccable updated as a git submodule in your project: + +```bash +git submodule add https://github.com/pbakaus/impeccable .impeccable +./.impeccable/bin/link.sh +``` + +Replace `` with your tool (e.g., `cursor`, `claude`, `gemini`, `opencode`, `pi`). This will create a symlink from your project root to the appropriate configuration folder inside the submodule. + ## Usage Once installed, use commands in your AI harness: diff --git a/bin/link.sh b/bin/link.sh new file mode 100755 index 00000000..abddf742 --- /dev/null +++ b/bin/link.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# link.sh: Symlink impeccable skills into the parent project directory +# Usage: ./bin/link.sh + +set -e + +PROVIDER=$1 +REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +SUBMODULE_NAME="$(basename "$REPO_DIR")" +PARENT_DIR="$(cd "$REPO_DIR/.." && pwd)" + +if [ -z "$PROVIDER" ]; then + echo "Usage: $0 " + echo "Example: $0 cursor" + echo "Available providers:" + ls -d "$REPO_DIR"/.* | grep -E '\.(cursor|claude|gemini|openai|windsurf)$' | xargs -n1 basename + exit 1 +fi + +PROVIDER_DIR=".$PROVIDER" + +if [ ! -d "$REPO_DIR/$PROVIDER_DIR" ]; then + echo "Error: Provider directory '$PROVIDER_DIR' not found in $REPO_DIR" + exit 1 +fi + +echo "Linking .$PROVIDER to parent directory..." + +# Check if target already exists in parent +if [ -e "$PARENT_DIR/$PROVIDER_DIR" ]; then + echo "Warning: '$PARENT_DIR/$PROVIDER_DIR' already exists. Skipping." +else + # Create relative symlink + ln -s "$SUBMODULE_NAME/$PROVIDER_DIR" "$PARENT_DIR/$PROVIDER_DIR" + echo "Done! Created symlink: $PARENT_DIR/$PROVIDER_DIR -> $SUBMODULE_NAME/$PROVIDER_DIR" +fi From 90cfc6e0c28e2a06fec510677d54c752051df80c Mon Sep 17 00:00:00 2001 From: amirgeek Date: Mon, 23 Mar 2026 14:50:42 +0000 Subject: [PATCH 2/3] feat: add symlink script for Git submodule usage --- README.md | 20 +++++++++++++++++++- bin/link.sh | 7 ++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bb24a8fb..c596b1ec 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,25 @@ Visit [impeccable.style](https://impeccable.style#casestudies) to see before/aft Visit [impeccable.style](https://impeccable.style), download the ZIP for your tool, and extract to your project. -### Option 2: Copy from Repository +### Option 2: Git Submodule (For version control) + +Keep skills updated by adding this repository as a submodule: + +```bash +# 1. Add impeccable as a submodule +git submodule add https://github.com/pbakaus/impeccable .impeccable + +# 2. Link your preferred provider (e.g. cursor, claude, gemini) +./.impeccable/bin/link.sh cursor + +# 3. Commit the changes +git add .gitmodules .impeccable .cursor +git commit -m "Add Impeccable skills" +``` + +To update the skills later, simply run `git submodule update --remote`. + +### Option 3: Copy from Repository **Cursor:** ```bash diff --git a/bin/link.sh b/bin/link.sh index abddf742..eec9bb49 100755 --- a/bin/link.sh +++ b/bin/link.sh @@ -14,7 +14,7 @@ if [ -z "$PROVIDER" ]; then echo "Usage: $0 " echo "Example: $0 cursor" echo "Available providers:" - ls -d "$REPO_DIR"/.* | grep -E '\.(cursor|claude|gemini|openai|windsurf)$' | xargs -n1 basename + find "$REPO_DIR" -maxdepth 1 -type d -name ".*" ! -name ".git" ! -name ".github" ! -name ".*-plugin" -exec basename {} \; | sed 's/^\.//' | sort exit 1 fi @@ -31,7 +31,8 @@ echo "Linking .$PROVIDER to parent directory..." if [ -e "$PARENT_DIR/$PROVIDER_DIR" ]; then echo "Warning: '$PARENT_DIR/$PROVIDER_DIR' already exists. Skipping." else - # Create relative symlink - ln -s "$SUBMODULE_NAME/$PROVIDER_DIR" "$PARENT_DIR/$PROVIDER_DIR" + # Create relative symlink in the parent directory + cd "$PARENT_DIR" + ln -s "$SUBMODULE_NAME/$PROVIDER_DIR" "$PROVIDER_DIR" echo "Done! Created symlink: $PARENT_DIR/$PROVIDER_DIR -> $SUBMODULE_NAME/$PROVIDER_DIR" fi From 852671cf09928c4b6be1ea0562c151fe633df5fe Mon Sep 17 00:00:00 2001 From: amirgeek Date: Sat, 28 Mar 2026 06:54:24 +0000 Subject: [PATCH 3/3] fix: link provider skill folders instead of full config dir --- README.md | 7 ++++--- bin/link.sh | 47 +++++++++++++++++++++++++++++++++++++---------- 2 files changed, 41 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index c596b1ec..3e78a5af 100644 --- a/README.md +++ b/README.md @@ -121,15 +121,16 @@ Keep skills updated by adding this repository as a submodule: # 1. Add impeccable as a submodule git submodule add https://github.com/pbakaus/impeccable .impeccable -# 2. Link your preferred provider (e.g. cursor, claude, gemini) +# 2. Link your preferred provider's skill folders (e.g. cursor, claude, gemini) ./.impeccable/bin/link.sh cursor # 3. Commit the changes +# (This creates symlinks inside .cursor/skills/*, without replacing your whole .cursor folder) git add .gitmodules .impeccable .cursor git commit -m "Add Impeccable skills" ``` -To update the skills later, simply run `git submodule update --remote`. +To update the skills later, simply run `git submodule update --remote`. If new skills are added upstream, run the link script again to create symlinks for the new folders. ### Option 3: Copy from Repository @@ -189,7 +190,7 @@ git submodule add https://github.com/pbakaus/impeccable .impeccable ./.impeccable/bin/link.sh ``` -Replace `` with your tool (e.g., `cursor`, `claude`, `gemini`, `opencode`, `pi`). This will create a symlink from your project root to the appropriate configuration folder inside the submodule. +Replace `` with your tool (e.g., `cursor`, `claude`, `gemini`, `opencode`, `pi`). This will create symlinks only for the skill subfolders inside your existing provider config (for example, `.claude/skills/*`), instead of replacing the whole provider directory. ## Usage diff --git a/bin/link.sh b/bin/link.sh index eec9bb49..b2007bad 100755 --- a/bin/link.sh +++ b/bin/link.sh @@ -19,20 +19,47 @@ if [ -z "$PROVIDER" ]; then fi PROVIDER_DIR=".$PROVIDER" +SOURCE_SKILLS_DIR="$REPO_DIR/$PROVIDER_DIR/skills" +TARGET_PROVIDER_DIR="$PARENT_DIR/$PROVIDER_DIR" +TARGET_SKILLS_DIR="$TARGET_PROVIDER_DIR/skills" if [ ! -d "$REPO_DIR/$PROVIDER_DIR" ]; then echo "Error: Provider directory '$PROVIDER_DIR' not found in $REPO_DIR" exit 1 fi -echo "Linking .$PROVIDER to parent directory..." - -# Check if target already exists in parent -if [ -e "$PARENT_DIR/$PROVIDER_DIR" ]; then - echo "Warning: '$PARENT_DIR/$PROVIDER_DIR' already exists. Skipping." -else - # Create relative symlink in the parent directory - cd "$PARENT_DIR" - ln -s "$SUBMODULE_NAME/$PROVIDER_DIR" "$PROVIDER_DIR" - echo "Done! Created symlink: $PARENT_DIR/$PROVIDER_DIR -> $SUBMODULE_NAME/$PROVIDER_DIR" +if [ ! -d "$SOURCE_SKILLS_DIR" ]; then + echo "Error: Skills directory '$SOURCE_SKILLS_DIR' not found" + exit 1 fi + +echo "Linking skill folders from $PROVIDER_DIR into parent directory..." + +mkdir -p "$TARGET_SKILLS_DIR" + +LINKED=0 +SKIPPED=0 + +for skill_dir in "$SOURCE_SKILLS_DIR"/*; do + [ -d "$skill_dir" ] || continue + + skill_name="$(basename "$skill_dir")" + target_path="$TARGET_SKILLS_DIR/$skill_name" + relative_source="$SUBMODULE_NAME/$PROVIDER_DIR/skills/$skill_name" + + if [ -e "$target_path" ] || [ -L "$target_path" ]; then + echo "Warning: '$target_path' already exists. Skipping $skill_name." + SKIPPED=$((SKIPPED + 1)) + continue + fi + + ( + cd "$PARENT_DIR" + ln -s "$relative_source" "$PROVIDER_DIR/skills/$skill_name" + ) + + echo "Linked: $target_path -> $relative_source" + LINKED=$((LINKED + 1)) +done + +echo "Done! Linked $LINKED skill folder(s), skipped $SKIPPED existing folder(s)."