Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Dl Code Review

ASecurity

Review a Rails change, file, or pull request for concrete correctness, authorization, data integrity, performance, and maintainability defects. Use for focused read-only code review. For an application-wide Rails security or Oracle/MariaDB audit, use the dedicated audit workflow if available. Do not implement fixes unless the user requests them.

3 stars
0 votes
0 copies
0 views
Added 9/23/2026
databasesgorubyshellsqlrailscode-reviewgitapidatabasesecurity

Works with

api

Security Analysis

A100/100

Scanned 9/23/2026

Install to Claude Code

$npx -y skills add alexishida/dalhe-cli --skill dl-code-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dl Code Review?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Dl Code Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alexishida-dl-code-review/badge)](https://www.skillsdirectory.com/skills/alexishida-dl-code-review)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: dl-code-review
description: Review a Rails change, file, or pull request for concrete correctness, authorization, data integrity, performance, and maintainability defects. Use for focused read-only code review. For an application-wide Rails security or Oracle/MariaDB audit, use the dedicated audit workflow if available. Do not implement fixes unless the user requests them.
---

# Rails code review

Review observable behavior and failure modes. A class size, missing service object, or unfamiliar style is not itself a bug. Keep the review read-only unless the user also requests changes.

## Establish scope and baseline

1. Read project instructions, Ruby/Rails versions, schema, test configuration, and existing authorization conventions. Do not assume Pundit, RSpec, PostgreSQL, or a particular service-object pattern.
2. For a working-tree review, inspect `git status --short`, unstaged and staged diffs. For a branch review, identify the intended base and compare from the merge base. Include untracked files only when part of the requested change.
3. Read full changed methods, their callers, callbacks, views/serializers, and relevant tests. Trace changed data from entry point to persistence or external effects.
4. Separate regressions introduced by the change from pre-existing problems. Review the requested scope first; expand only to establish a concrete impact.

## Review by failure scenario

| Area | Trace | Evidence needed before reporting |
|---|---|---|
| Authorization | actor → scope/policy → record → response | A reachable action permits another tenant's or role's operation; check inherited filters and policy scopes first |
| Writes | validation → transaction → constraints → external effects | A failure or concurrent request leaves invalid state, duplicates, or sends an effect before a rollback |
| Background jobs | enqueue → serialization → execution → retry | A retry duplicates an effect, the record can disappear, or a worker can observe an uncommitted change |
| Queries | relation construction → enumeration → association access | SQL/query count or a trace showing repeated queries; read the actual indexes and adapter before proposing one |
| Migrations | old app/new schema and new app/old schema | Locking, data conversion, incompatible nullability, or deployment ordering that can interrupt the running app |
| Cache | key → tenant/user scope → invalidation | Stale or cross-user values under a named update/request sequence |
| API/UI | input → status/serialization → consumer | A missing/changed field, escaping rule, failure status, or pagination contract breaks an existing caller |

For a possible N+1, inspect whether associations are already loaded. `any?` without a block can use an existence query on an unloaded relation; do not label it as loading every row without verifying the call shape. For uniqueness, inspect the database constraint, including tenant scope and soft-deletion conditions.

Transactions do not roll back HTTP calls. For a job or email, identify the outermost commit boundary and queue-adapter behavior before suggesting `after_commit`, explicit enqueueing, or an outbox. A method-level transaction may be nested inside a caller's transaction.

## Validate hypotheses

- Run existing focused tests and available project tools, for example `bundle exec rubocop --format json`, `bundle exec brakeman -q -f json`, or `bundle exec bundler-audit check` when installed and relevant. Do not auto-correct during a read-only review.
- Record command, exit status, and limitations. Missing tools or stale advisory data mean unverified, not clean. Do not hide failures with shell redirection or `|| true`.
- Prefer a minimal reproduction using fixtures or temporary data. Do not run a migration, deployment, or a destructive production query just to substantiate a finding.
- A scanner warning is a lead: follow the value to a reachable sink, check sanitization/allowlists, and eliminate false positives.
- For performance, name the workload and compare query count, latency, allocations, or memory with the same input. Distinguish measured results from predicted improvement.

## Findings and priority

For each confirmed finding provide:

- **Priority and title:** P0 for an immediate widespread blocker; P1 for a serious failure on a realistic path; P2 for a bounded defect; P3 for a small actionable issue. Severity follows impact and reachability, not category alone.
- **Location:** shortest useful `file:line` reference.
- **Trigger:** actor, input/state, and execution path required.
- **Actual vs expected:** what fails and who is affected.
- **Evidence:** minimal code/SQL/test evidence; distinguish observed and inferred results.
- **Fix direction:** smallest correction consistent with this project, plus the regression scenario to test.

Example: “P1 — Duplicate invoice delivery after retry. `jobs/send_invoice_job.rb:24` sends before recording delivery; failure of the update causes the retry to send again. Use the provider's idempotency key and test a failure after the provider accepts the request.” Do not assert this finding unless those operations actually appear in the reviewed code.

Lead with actionable findings ordered by priority. Follow with remaining uncertainties and checks performed. If none are confirmed, say so and identify the areas not exercised. Keep optional refactors separate from defects; do not inflate the report with praise or generic SOLID checklists.

Attribution

alexishidaalexishida
View sourceMore from alexishida →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Mysql Best Practices

MySQL development best practices for schema design, query optimization, and database administration

2481 votes

Jpa Patterns

Spring Boot中的JPA/Hibernate实体设计、关系、查询优化、事务、审计、索引、分页和连接池模式。

2456590 votes

Clickhouse Io

ClickHouse数据库模式、查询优化、分析和数据工程最佳实践,适用于高性能分析工作负载。

2456590 votes

Postgres Patterns

基于Supabase最佳实践的PostgreSQL数据库模式,用于查询优化、架构设计、索引和安全。

2456590 votes

Sql Optimization Patterns

Diagnose slow SQL with query plans, preserve query results, and verify indexing or query changes against representative data.

458250 votes
View all in databases →