-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
Description
Motivation
The current Claude Code setup has solid general-purpose commands (/commit, /create-pr, /review-pr, /resolve-issue, /update-deps, /test-drive, /new-project), but lacks commands tailored to the primary development workflow: Ruby on Rails.
Proposed commands
/refactor
Systematic code refactoring with test validation between steps:
- Analyze the target code for complexity, duplication, and design issues
- Propose refactoring steps with clear before/after expectations
- Run tests after each step to ensure nothing breaks
- Support common patterns: extract method, extract class, inline, rename, move
/debug
Structured debugging workflow:
- Analyze error output (stack traces, logs, test failures)
- Trace code paths through the application
- Identify root cause vs symptoms
- Suggest and apply fixes with test validation
/security-audit
Scan for common security issues, especially Rails-specific:
- Mass assignment vulnerabilities (strong parameters)
- SQL injection (raw SQL,
find_by_sql, interpolation) - CSRF protection gaps
- Insecure direct object references
- Open redirects
- Sensitive data exposure in logs/errors
Other improvements
- Update project
CLAUDE.mdto list available custom commands for discoverability - Consider pre-allowing
bundle,bin/rails,bin/rspecin Claude Code permissions for smoother Rails workflows
Files
claude/.claude/commands/(new command files)CLAUDE.md
Reactions are currently unavailable