conductor-setup
Original:🇺🇸 English
Translated
Configure a Rails project to work with Conductor (parallel coding agents)
11installs
Sourceshpigford/skills
Added on
NPX Install
npx skill4agent add shpigford/skills conductor-setupTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Set up this Rails project for Conductor, the Mac app for parallel coding agents.
What to Create
1. conductor.json (project root)
Create in the project root if it doesn't already exist:
conductor.jsonjson
{
"scripts": {
"setup": "bin/conductor-setup",
"run": "script/server"
}
}2. bin/conductor-setup (executable)
Create if it doesn't already exist:
bin/conductor-setupbash
#!/bin/bash
set -e
# Symlink .env from repo root (where secrets live, outside worktrees)
[ -f "$CONDUCTOR_ROOT_PATH/.env" ] && ln -sf "$CONDUCTOR_ROOT_PATH/.env" .env
# Symlink Rails master key
[ -f "$CONDUCTOR_ROOT_PATH/config/master.key" ] && ln -sf "$CONDUCTOR_ROOT_PATH/config/master.key" config/master.key
# Install dependencies
bundle install
npm installMake it executable with .
chmod +x bin/conductor-setup3. script/server (executable)
Create the directory if needed, then create if it doesn't already exist:
scriptscript/serverbash
#!/bin/bash
# === Port Configuration ===
export PORT=${CONDUCTOR_PORT:-3000}
export VITE_RUBY_PORT=$((PORT + 1000))
# === Redis Isolation ===
if [ -n "$CONDUCTOR_WORKSPACE_NAME" ]; then
HASH=$(printf '%s' "$CONDUCTOR_WORKSPACE_NAME" | cksum | cut -d' ' -f1)
REDIS_DB=$((HASH % 16))
export REDIS_URL="redis://localhost:6379/${REDIS_DB}"
fi
exec bin/devMake it executable with .
chmod +x script/server4. Update Rails Config Files
For each of the following files, if they exist and contain Redis configuration, update them to use or with a fallback:
ENV.fetch('REDIS_URL', ...)ENV['REDIS_URL']config/initializers/sidekiq.rb
If this file exists and configures Redis, update it to use:
ruby
redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0')config/cable.yml
If this file exists, update the development adapter to use:
yaml
development:
adapter: redis
url: <%= ENV.fetch('REDIS_URL', 'redis://localhost:6379/1') %>config/environments/development.rb
If this file configures Redis for caching, update to use:
ruby
config.cache_store = :redis_cache_store, { url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/0') }config/initializers/rack_attack.rb
If this file exists and configures a Redis cache store, update to use:
ruby
Rack::Attack.cache.store = ActiveSupport::Cache::RedisCacheStore.new(url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/0'))Implementation Notes
- Don't overwrite existing files: Check if conductor.json, bin/conductor-setup, and script/server exist before creating them. If they exist, skip creation and inform the user.
- Rails config updates: Only modify Redis-related configuration. If a file doesn't exist or doesn't use Redis, skip it gracefully.
- Create directories as needed: Create directory if it doesn't exist.
script/
Verification
After creating the files:
- Confirm all Conductor files exist and scripts are executable
- Run to verify it starts without errors
script/server - Check that Rails configs properly reference or
ENV['REDIS_URL']ENV.fetch('REDIS_URL', ...)