agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when writing Ruby or working in Rails codebases. Covers idiomatic object design, service objects, ActiveRecord query performance, RSpec structure, and RuboCop-clean style. Trigger on "this rails controller is too fat", "activerecord is doing n+1 queries", "clean up this
Claude Code
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill ruby --agent claude-code
Codex
$ npx skills add nimadorostkar/Claude-Skills-collection --skill ruby -a codex -y
Cursor
$ npx skills add nimadorostkar/Claude-Skills-collection --skill ruby -a cursor -y
Gemini CLI
$ npx skills add nimadorostkar/Claude-Skills-collection --skill ruby -a gemini-cli -y
GitHub Copilot
$ npx skills add nimadorostkar/Claude-Skills-collection --skill ruby -a github-copilot -y
OpenCode
$ npx skills add nimadorostkar/Claude-Skills-collection --skill ruby -a opencode -y
Windsurf
$ npx skills add nimadorostkar/Claude-Skills-collection --skill ruby -a windsurf -y
name: ruby description: Use when writing Ruby or working in Rails codebases. Covers idiomatic object design, service objects, ActiveRecord query performance, RSpec structure, and RuboCop-clean style. Trigger on "this rails controller is too fat", "activerecord is doing n+1 queries", "clean up this rspec suite", "rubocop keeps complaining". Do not use for language-agnostic job queue design — see the background-jobs skill. metadata: category: languages version: 1.0.0 tags: [ruby, rails, activerecord, rspec, rubocop]
Write Ruby that stays readable as it grows: small objects with clear responsibilities, controllers that stay thin, and ActiveRecord queries that do not quietly issue a query per row.
1. **Locate the responsibility** — If a method touches HTTP, business rules, and persistence, split it before changing it. 2. **Extract a service object** — One public `call`, explicit dependencies, no global state. 3. **Fix the queries** — Add `includes`, convert loops into set operations, batch with `find_each`. 4. **Make jobs idempotent** — Retries are guaranteed; double-execution must be harmless. 5. **Gate** — RSpec, RuboCop, and Bullet (or equivalent) to fail the build on N+1.
**Service object with explicit failure:**
# frozen_string_literal: true
class RefundOrder
Result = Struct.new(:success?, :refund, :error, keyword_init: true)
def initialize(gateway: PaymentGateway.new)
@gateway = gateway
end
def call(order:, amount_cents:)
return failure("order not refundable") unless order.refundable?
return failure("amount exceeds order total") if amount_cents > order.total_cents
refund = @gateway.refund(order.charge_id, amount_cents)
order.update!(refunded_cents: order.refunded_cents + amount_cents)
Result.new(success?: true, refund: refund)
rescue PaymentGateway::Error => e
failure(e.message)
end
private
def failure(message) = Result.new(success?: false, error: message)
endA curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory,…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling,…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.