Intelligent Bundler operations for managing Ruby dependencies.
Manages Ruby dependencies using Bundler. Automatically activates when you mention gems, Gemfile, or dependency issues. Handles installing gems, adding new dependencies with proper versioning, updating packages, security audits, and troubleshooting common Bundler problems.
/plugin marketplace add jwplatta/prompt-library/plugin install rubyist@jwplatta-claude-toolsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
scripts/README.mdscripts/bundle_add.shscripts/bundle_audit.shscripts/bundle_install.shscripts/bundle_update.shIntelligent Bundler operations for managing Ruby dependencies.
This skill activates when:
Basic Installation:
bundle install
Install for specific groups:
# Development and test only
bundle install --without production
# Production only
bundle install --deployment
Update Bundler first if needed:
gem install bundler
bundle install
Interactive Gem Addition:
When user requests: "Add [gem_name] gem"
Check if gem exists:
Suggest Gemfile entry:
# For runtime dependency
gem 'gem_name', '~> X.Y'
# For development/test
group :development, :test do
gem 'gem_name', '~> X.Y'
end
# For test only
group :test do
gem 'rspec', '~> 3.12'
end
Add to appropriate group:
Install the gem:
bundle install
bundle list | grep gem_name
Update all gems:
bundle update
Update specific gem:
bundle update gem_name
Update conservatively (patch versions only):
bundle update --patch
Update minor versions:
bundle update --minor
Check for vulnerabilities:
bundle audit
Install bundler-audit if missing:
gem install bundler-audit
bundle audit
Update vulnerable gems:
bundle audit check --update
Remove unused gems:
bundle clean
Clean with forced removal:
bundle clean --force
Common Issues & Solutions:
Issue: "Could not find gem 'X'"
# Solution 1: Update bundler
gem install bundler
bundle install
# Solution 2: Clear cache
bundle clean --force
bundle install
# Solution 3: Update Gemfile.lock
rm Gemfile.lock
bundle install
Issue: Version conflicts
# Show dependency tree
bundle viz --without production
# Or use bundle info
bundle info gem_name
Issue: Platform-specific gems
# In Gemfile
gem 'pg', platforms: :ruby
gem 'sqlite3', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
Show gem details:
bundle info gem_name
List all gems:
bundle list
Show outdated gems:
bundle outdated
User Request: "Add pry-byebug for debugging"
Response:
I'll add pry-byebug to your Gemfile.
Gem: pry-byebug
Latest Version: 3.10.1
Description: Combines pry with byebug for debugging
This is a development tool, so I'll add it to the :development group.
Adding to Gemfile:
```ruby
group :development do
gem 'pry-byebug', '~> 3.10'
end
Running bundle install... ✓ Successfully installed pry-byebug 3.10.1
You can now use it by adding binding.pry in your code.
### Workflow 2: Update Dependencies
**User Request:** "Update all my gems"
**Response:**
Before updating, let me check what's outdated:
Outdated gems:
Recommendation:
Would you like me to: a) Update patch versions only (safest) b) Update minor versions c) Update everything d) Update specific gems only
### Workflow 3: Security Audit
**User Request:** "Check for security issues"
**Response:**
Running security audit with bundler-audit...
Found 2 vulnerabilities:
HIGH: CVE-2023-XXXX in nokogiri (1.14.2) Solution: Update to >= 1.14.3
MEDIUM: CVE-2023-YYYY in rack (2.2.6) Solution: Update to >= 2.2.7
Recommended action: bundle update nokogiri rack
Would you like me to update these gems now?
## Smart Suggestions
### Suggest Missing Gems
When user writes code using common patterns, suggest relevant gems:
**Pattern: API calls**
```ruby
# User writes HTTP client code
"I notice you're making HTTP requests. Consider adding:"
gem 'faraday', '~> 2.7' # Modern HTTP client
# or
gem 'httparty', '~> 0.21' # Simple HTTP client
Pattern: JSON parsing
# User parses JSON
"For better JSON handling, consider:"
gem 'oj', '~> 3.14' # Faster JSON parser
Pattern: Environment variables
# User uses ENV[]
"For environment management, you already have dotenv in common libs!"
gem 'dotenv', '~> 2.8'
Pattern: Background jobs
# User mentions async/background processing
"For background jobs, you commonly use:"
gem 'sidekiq', '~> 7.0'
Pessimistic versioning (~>):
gem 'rails', '~> 7.0.4' # >= 7.0.4, < 7.1
gem 'rspec', '~> 3.12' # >= 3.12, < 4.0
Exact version (avoid unless necessary):
gem 'specific_gem', '1.2.3' # Only 1.2.3
Greater than or equal:
gem 'compatible_gem', '>= 2.0' # Any version >= 2.0
Best Practice: Use pessimistic (~>) for stability
Recommended Structure:
source 'https://rubygems.org'
ruby '3.2.0' # Specify Ruby version
# Core runtime dependencies
gem 'dotenv'
gem 'pg', '~> 1.6'
# Development tools
group :development do
gem 'pry'
gem 'rubocop', require: false
end
# Test tools
group :test do
gem 'rspec', '~> 3.12'
gem 'factory_bot', '~> 6.5'
gem 'timecop'
end
# Development & Test
group :development, :test do
gem 'pry-byebug'
end
# Platform-specific
platforms :ruby do
gem 'sqlite3', '~> 2.1'
end
When performing bundle operations:
Action Taken:
Changes:
Next Steps:
Users can customize behavior in .claude/settings.json:
{
"plugins": {
"rubyist": {
"bundler": {
"autoInstall": true,
"suggestGems": true,
"securityAudit": true,
"versionStrategy": "pessimistic"
}
}
}
}
Always wrap bundle commands with error handling:
if bundle install; then
echo "✓ Successfully installed dependencies"
else
echo "✗ Installation failed"
echo "Trying with bundle update..."
bundle update
fi
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.