Skip to content

Instantly share code, notes, and snippets.

@marostr
marostr / agents--code-reviewer.md
Last active February 5, 2026 16:55
Three-stage code review for Claude Code: spec compliance, Rails conventions, code quality

name: code-reviewer description: | Use this agent when a major project step has been completed and needs to be reviewed against the original plan and coding standards. Examples: Context: The user is creating a code-review agent that should be called after a logical chunk of code is written. user: "I've finished implementing the user authentication system as outlined in step 3 of our plan" assistant: "Great work! Now let me use the code-reviewer agent to review the implementation against our plan and coding standards" Since a major project step has been completed, use the code-reviewer agent to validate the work against the plan and identify any issues. Context: User has completed a significant feature implementation. user: "The API endpoints for the task management system are now complete - that covers step 2 from our architecture document" assistant: "Excellent! Let me have the code-reviewer agent examine this implementation to ensure it aligns with

@marostr
marostr / ci
Created February 3, 2026 11:50
Rails local CI script - Rubocop, Prettier, Brakeman, RSpec, Undercover
#!/usr/bin/env ruby
require_relative '../lib/ci_runner'
CI = CIRunner
require_relative '../config/ci'
@marostr
marostr / users_controller.rb
Last active October 6, 2016 11:34
users_controller.rb
class UsersController < ApplicationController
before_action :set_user, only: [:show, :edit, :update, :destroy]
def index
@users = Users.all
render json: @users, each_serializer: UserSerializer
end
def show
render json: @user, serializer: UserSerializer
GENE_SIZE = 64
MUTATION_RATE = 0.001
#MUTATION_RATE = 0.01
class Chromosome
attr_accessor :genes
def initialize genes = nil
genes ? self.genes = genes : self.genes = (1..GENE_SIZE).map{ rand(3) }.join