CtrlK
BlogDocsLog inGet started
Tessl Logo

igmarin/rails-agent-skills

Curated library of 41 public AI agent skills for Ruby on Rails development. Organized by category: planning, testing, code-quality, ddd, engines, infrastructure, api, patterns, context, and orchestration. Covers code review, architecture, security, testing (RSpec), engines, service objects, DDD patterns, and TDD automation. Repository workflows remain documented in GitHub but are intentionally excluded from the Tessl tile.

95

1.77x
Quality

93%

Does it follow best practices?

Impact

96%

1.77x

Average score across 41 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

SKILL.mdskills/ddd/review-domain-boundaries/

name:
review-domain-boundaries
license:
MIT
description:
Use when reviewing a Ruby on Rails app for Domain-Driven Design boundaries, bounded contexts, language leakage, cross-context orchestration, or unclear ownership. Identifies misplaced domain models, detects cross-context coupling, names ownership conflicts, and recommends the smallest credible boundary improvement. Covers context mapping and leakage detection.
metadata:
{"version":"1.0.0","user-invocable":"true"}

Review Domain Boundaries

Quick Reference

AreaWhat to check
Bounded contextsDistinct language, rules, and ownership
Context leakageOne area reaching across another's concepts casually
Shared modelsSame object name used with conflicting meanings
OrchestrationUse cases coordinating multiple contexts without a clear owner
OwnershipWho owns invariants, transitions, and side effects

HARD-GATE

DO NOT recommend splitting code into new contexts unless the business boundary is explicit enough to name.
DO NOT treat every large module as a bounded context automatically.
ALWAYS identify the leaked language or ownership conflict before proposing structural changes.

Core Process

Core principle: Fix context leakage before adding more patterns.

When to Use

  • Next step: Chain to model-domain when a context is clear enough to model tactically, or to refactor-code when boundaries need incremental extraction.

Review Order

  1. Map entry points: Start from controllers, jobs, services, APIs, and UI flows that expose business behavior.
  2. Name the contexts: Group flows and rules by business capability, not by current folder names alone.
  3. Find leakage: Look for terms, validations, workflows, or side effects crossing context boundaries.
  4. Check ownership: Decide which context should own invariants, transitions, and external side effects.
    • For Fleet/Billing examples, Billing owns invoice generation triggers and invoice side effects; Fleet owns vehicle state and availability. Flag Fleet::Vehicle triggering invoice generation as leakage into Billing, not the reverse.
  5. Propose the smallest credible improvement: Rename, extract, isolate, or wrap before attempting large reorganizations.

Detecting Leakage

Use ripgrep to find cross-context references before reading code manually:

# Find references from one context into another
rg 'Billing.*Fleet|Fleet.*Billing' app/

# Find cross-namespace constant usage
rg 'Billing::[A-Z]' app/services/fleet/
rg 'Fleet::[A-Z]' app/services/billing/

# Find callbacks that touch foreign concepts
rg 'after_(create|update|save).*Job|after_(create|update|save).*Mailer' app/models/

# Find invoice-generation triggers leaking out of Billing
rg 'invoice|Invoice|Billing' app/models app/services app/jobs

Common Pitfalls

  • Treating a shared database table as proof of a shared context — storage and domain boundaries are independent concerns.
  • Splitting into new contexts before the business language is stable enough to name them clearly.
  • Mistaking a large Rails namespace for a bounded context without checking whether it has a single, coherent set of rules and an identifiable owner.

Output Style

  1. Finding Format: For each finding include:
    • Severity
    • Contexts involved
    • Leaked term / ownership conflict
    • Why the current boundary is risky
    • Smallest credible improvement Include the ownership direction when it matters (e.g. Billing should own invoice-generation triggers; Fleet should not trigger invoices from Fleet::Vehicle).
  2. Structure: Write findings first, then list open questions and recommended next skills.
  3. Language: Must be in English unless explicitly requested otherwise.

Extended Resources

Load only when a concrete boundary-leakage example is needed:

  • EXAMPLES.md — Billing/Fleet leakage example with smallest credible fix.

Integration

SkillWhen to chain
define-domain-languageWhen the review is blocked by fuzzy or overloaded terminology
model-domainWhen a context is clear and needs entities/value objects/services modeled cleanly
review-architectureWhen the same problem also needs a broader Rails structure review
refactor-codeWhen the recommended improvement needs incremental extraction instead of a rewrite

skills

README.md

server.json

tile.json