Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -162,6 +180,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 <provider>
```

Replace `<provider>` 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:
Expand Down
38 changes: 38 additions & 0 deletions bin/link.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash

# link.sh: Symlink impeccable skills into the parent project directory
# Usage: ./bin/link.sh <provider>

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 <provider>"
echo "Example: $0 cursor"
echo "Available providers:"
find "$REPO_DIR" -maxdepth 1 -type d -name ".*" ! -name ".git" ! -name ".github" ! -name ".*-plugin" -exec basename {} \; | sed 's/^\.//' | sort
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
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming that a lot of people will already have e.g. a .claude folder, so this technique wouldn't work then...would it not be better to symlink the sub folders (.claude/skills/{folders in here})?

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"
fi
Loading