Skip to content

Instantly share code, notes, and snippets.

@Abeansits
Created June 25, 2025 22:33
Show Gist options
  • Save Abeansits/a0e92e5386b0a812b5b4dd0f3bf5ab40 to your computer and use it in GitHub Desktop.
Save Abeansits/a0e92e5386b0a812b5b4dd0f3bf5ab40 to your computer and use it in GitHub Desktop.
symlink coding agents rule files into one master rule
#!/bin/bash
# Master rule file
MASTER_FILE="AGENTS.md"
# Array of symlink names
SYMLINKS=(
"CLAUDE.md"
"GEMINI.md"
".cursorrules"
".cursor/rules"
".windsurfrules"
".clinerules"
".github/copilot-instructions.md"
".bolt/prompt"
".rules"
)
# Create symlinks
for link in "${SYMLINKS[@]}"; do
# Ensure the directory exists for nested paths
mkdir -p "$(dirname "$link")"
# Create symlink, overwriting if it exists
ln -sf "$MASTER_FILE" "$link"
echo "Created symlink: $link -> $MASTER_FILE"
done
echo "Symlink setup complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment