link-core
npx machina-cli add skill bullet-train-co/bullet_train-claude_code/link-core --openclawLink Bullet Train Core for Local Development
This skill checks out the bullet_train-core repository and links all contained Ruby gems in the Gemfile for local development.
Steps
-
Clone the repository (if not already present):
- Check if
./local/bullet_train-coreexists - If not, create
./local/directory and clone via SSH:git clone git@github.com:bullet-train-co/bullet_train-core.git ./local/bullet_train-core
- Check if
-
Discover gems in the cloned repo:
- List all directories in
./local/bullet_train-core/that contain a.gemspecfile - These are the gems that need to be linked
- List all directories in
-
Update the Gemfile:
- For each bullet_train gem currently using
BULLET_TRAIN_VERSION, add a, path: "local/bullet_train-core/<gem_folder>"option - The gem folder name typically matches the gem name (with underscores)
- Transform lines like:
to:gem "bullet_train", BULLET_TRAIN_VERSIONgem "bullet_train", BULLET_TRAIN_VERSION, path: "local/bullet_train-core/bullet_train"
- For each bullet_train gem currently using
-
Run bundle install:
- After updating the Gemfile, run
bundle installto link the local gems
- After updating the Gemfile, run
Important Notes
- The SSH URL for the repo is:
git@github.com:bullet-train-co/bullet_train-core.git - Keep the
BULLET_TRAIN_VERSIONin place so version compatibility is maintained - Only modify gem lines that reference
BULLET_TRAIN_VERSION - The local path should be relative:
local/bullet_train-core/<gem_name>
Source
git clone https://github.com/bullet-train-co/bullet_train-claude_code/blob/main/skills/link-core/SKILL.mdView on GitHub Overview
This skill clones the bullet_train-core repo into a local directory and links all discovered gems for development. It updates the host app's Gemfile to point to local paths while preserving BULLET_TRAIN_VERSION for compatibility, then runs bundle install.
How This Skill Works
The tool checks for ./local/bullet_train-core, clones the repo if missing, then scans for gem folders containing a .gemspec. It updates Gemfile lines that use BULLET_TRAIN_VERSION to include a path option pointing to local/bullet_train-core/<gem_folder>, and finally runs bundle install to link the local gems while keeping the version constraint intact.
When to Use It
- Setting up a new development environment to work on local Bullet Train core gems
- Testing changes in bullet_train-core within a host Rails app without publishing new gem versions
- Ensuring Gemfile uses local paths rather than remote gems when BULLET_TRAIN_VERSION is present
- Onboarding teammates to the local gem linking workflow for Bullet Train core
- Troubleshooting bundler or dependency resolution after cloning bullet_train-core
Quick Start
- Step 1: Clone the repository into local/bullet_train-core if ./local/bullet_train-core does not exist
- Step 2: Discover gem folders by locating directories containing a .gemspec in ./local/bullet_train-core
- Step 3: For each gem line using BULLET_TRAIN_VERSION in your Gemfile, add path: "local/bullet_train-core/<gem_folder>" and run bundle install
Best Practices
- Only modify gem lines that reference BULLET_TRAIN_VERSION
- Keep BULLET_TRAIN_VERSION in place to maintain compatibility
- Ensure the local path matches the gem folder name (local/bullet_train-core/<gem_name>)
- Use path: "local/bullet_train-core/<gem_folder>" syntax in Gemfile
- Run bundle install after updating the Gemfile to apply the local links
Example Use Cases
- A Rails app uses bullet_train-core 2.1.0; you clone the core locally and link bullet_train as local/bullet_train-core/bullet_train in the Gemfile, then run bundle install
- Developers add bullet_train_extensions to the Gemfile with a path to local/bullet_train-core/bullet_train_extensions and verify changes via bundle exec rails console
- After forking bullet_train-core, a teammate links the forked gems locally using the BULLET_TRAIN_VERSION constraint and tests integration in the host app
- You identify multiple gems in bullet_train-core with .gemspec files and confirm their paths are correctly reflected in the Gemfile
- An onboarding session demonstrates updating Gemfile lines with paths for all gems matching Bullet Train versions and validating with bundle install