[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-23dc8c1b-131d-4b54-8d0f-f68a02ca7df5":3,"$fwcVh3qtW7nNnJG05-rtYV5WQbHdwM91VmwxT3hVnYmE":43},{"id":4,"title":5,"description":6,"categoryId":7,"moduleId":8,"tags":9,"prompt":10,"icon":11,"source":12,"sourceUrl":13,"authorId":14,"authorName":15,"isPublic":16,"stars":17,"runs":18,"createdAt":19,"updatedAt":19,"module":20,"category":27,"packages":34},"23dc8c1b-131d-4b54-8d0f-f68a02ca7df5","conductor-setup","配置Rails项目以与Conductor（并行编码代理）协同工作","cat_life_career","mod_other","sickn33,other","---\nname: conductor-setup\ndescription: Configure a Rails project to work with Conductor (parallel coding agents)\nallowed-tools: Bash(chmod *), Bash(bundle *), Bash(npm *), Bash(script\u002Fserver)\ncontext: fork\nrisk: unknown\nsource: community\nmetadata:\n  author: Shpigford\n  version: \"1.0\"\n---\n\nSet up this Rails project for Conductor, the Mac app for parallel coding agents.\n\n## When to Use\n- You need to configure a Rails project so it runs correctly inside Conductor workspaces.\n- The project should support parallel coding agents with isolated ports, Redis settings, and shared secrets.\n- You want the standard `conductor.json`, `bin\u002Fconductor-setup`, and `script\u002Fserver` scaffolding for a Rails repo.\n\n# What to Create\n\n## 1. conductor.json (project root)\n\nCreate `conductor.json` in the project root if it doesn't already exist:\n\n```json\n{\n  \"scripts\": {\n    \"setup\": \"bin\u002Fconductor-setup\",\n    \"run\": \"script\u002Fserver\"\n  }\n}\n```\n\n## 2. bin\u002Fconductor-setup (executable)\n\nCreate `bin\u002Fconductor-setup` if it doesn't already exist:\n\n```bash\n#!\u002Fbin\u002Fbash\nset -e\n\n# Symlink .env from repo root (where secrets live, outside worktrees)\n[ -f \"$CONDUCTOR_ROOT_PATH\u002F.env\" ] && ln -sf \"$CONDUCTOR_ROOT_PATH\u002F.env\" .env\n\n# Symlink Rails master key\n[ -f \"$CONDUCTOR_ROOT_PATH\u002Fconfig\u002Fmaster.key\" ] && ln -sf \"$CONDUCTOR_ROOT_PATH\u002Fconfig\u002Fmaster.key\" config\u002Fmaster.key\n\n# Install dependencies\nbundle install\nnpm install\n```\n\nMake it executable with `chmod +x bin\u002Fconductor-setup`.\n\n## 3. script\u002Fserver (executable)\n\nCreate the `script` directory if needed, then create `script\u002Fserver` if it doesn't already exist:\n\n```bash\n#!\u002Fbin\u002Fbash\n\n# === Port Configuration ===\nexport PORT=${CONDUCTOR_PORT:-3000}\nexport VITE_RUBY_PORT=$((PORT + 1000))\n\n# === Redis Isolation ===\nif [ -n \"$CONDUCTOR_WORKSPACE_NAME\" ]; then\n  HASH=$(printf '%s' \"$CONDUCTOR_WORKSPACE_NAME\" | cksum | cut -d' ' -f1)\n  REDIS_DB=$((HASH % 16))\n  export REDIS_URL=\"redis:\u002F\u002Flocalhost:6379\u002F${REDIS_DB}\"\nfi\n\nexec bin\u002Fdev\n```\n\nMake it executable with `chmod +x script\u002Fserver`.\n\n## 4. Update Rails Config Files\n\nFor each of the following files, if they exist and contain Redis configuration, update them to use `ENV.fetch('REDIS_URL', ...)` or `ENV['REDIS_URL']` with a fallback:\n\n### config\u002Finitializers\u002Fsidekiq.rb\nIf this file exists and configures Redis, update it to use:\n```ruby\nredis_url = ENV.fetch('REDIS_URL', 'redis:\u002F\u002Flocalhost:6379\u002F0')\n```\n\n### config\u002Fcable.yml\nIf this file exists, update the development adapter to use:\n```yaml\ndevelopment:\n  adapter: redis\n  url: \u003C%= ENV.fetch('REDIS_URL', 'redis:\u002F\u002Flocalhost:6379\u002F1') %>\n```\n\n### config\u002Fenvironments\u002Fdevelopment.rb\nIf this file configures Redis for caching, update to use:\n```ruby\nconfig.cache_store = :redis_cache_store, { url: ENV.fetch('REDIS_URL', 'redis:\u002F\u002Flocalhost:6379\u002F0') }\n```\n\n### config\u002Finitializers\u002Frack_attack.rb\nIf this file exists and configures a Redis cache store, update to use:\n```ruby\nRack::Attack.cache.store = ActiveSupport::Cache::RedisCacheStore.new(url: ENV.fetch('REDIS_URL', 'redis:\u002F\u002Flocalhost:6379\u002F0'))\n```\n\n# Implementation Notes\n\n- **Don't overwrite existing files**: Check if conductor.json, bin\u002Fconductor-setup, and script\u002Fserver exist before creating them. If they exist, skip creation and inform the user.\n- **Rails config updates**: Only modify Redis-related configuration. If a file doesn't exist or doesn't use Redis, skip it gracefully.\n- **Create directories as needed**: Create `script\u002F` directory if it doesn't exist.\n\n# Verification\n\nAfter creating the files:\n1. Confirm all Conductor files exist and scripts are executable\n2. Run `script\u002Fserver` to verify it starts without errors\n3. Check that Rails configs properly reference `ENV['REDIS_URL']` or `ENV.fetch('REDIS_URL', ...)`\n\n## Limitations\n- Use this skill only when the task clearly matches the scope described above.\n- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.\n- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.\n","","imported","https:\u002F\u002Fgithub.com\u002Fsickn33\u002Fantigravity-awesome-skills","user_system_seed","SkillOPIC",true,185,1209,"2026-05-16 13:12:40",{"id":8,"name":21,"slug":22,"icon":23,"description":24,"sort":25,"createdAt":26},"其他","other","mdi-page-next-outline","其他类型Skill",5,"2026-05-16 12:53:40",{"id":7,"name":28,"slug":29,"icon":30,"description":31,"moduleId":8,"sort":32,"skillCount":33,"createdAt":26},"职场发展","career","mdi-briefcase-outline","面试准备、简历优化、职业规划",4,575,[35],{"id":36,"skillId":4,"version":37,"fileName":38,"fileSize":39,"filePath":40,"fileHash":41,"manifest":42,"createdAt":19},"2ff7b96d-80e2-4684-aae7-7f92178995cf","1.0.0","conductor-setup.zip",1822,"uploads\u002Fskills\u002F23dc8c1b-131d-4b54-8d0f-f68a02ca7df5\u002Fconductor-setup.zip","356d77258cae4998bfd32477fd66e508b45368e18e21a0ca9efd52cddf42b3f3","[{\"path\":\"SKILL.md\",\"isDirectory\":false,\"size\":4049}]",{"code":44,"message":45,"data":46},200,"success",{"items":47,"stats":48,"page":51},[],{"averageRating":49,"totalRatings":49,"ratingCounts":50},0,[49,49,49,49,49],{"limit":52,"offset":49,"hasMore":53,"nextOffset":52,"ratedOnly":16},15,false]