Curated library of 16 public Ruby AI agent skills: 10 atomic skills (YARD docs, service objects, calculator pattern, API clients, DDD, bug triage, code review, skill routing), 5 process-discipline skills (TDD, refactoring, review, security, test planning), and 1 planning skill (TDD task generation). Zero agents — this is a foundational library consumed by framework-specific tiles like rails-agent-skills and hanakai-yaku.
95
96%
Does it follow best practices?
Impact
95%
1.05xAverage score across 16 eval scenarios
Passed
No known issues
| DDD concept | Ruby default | Avoid by default | Typical home |
|---|---|---|---|
| Entity | Plain class when persisted identity matters | Extra wrapper object with no added meaning | models/ or project namespace |
| Value object | PORO — immutable, equality by value | Shoving logic into helpers or primitives | models/ or near the domain |
| Aggregate root | The class that guards invariants and is the single entry point | Splitting invariants across multiple models/classes | models/ or project namespace |
| Domain service | PORO for behavior spanning multiple entities | Arbitrary model chosen just to hold code | services/ |
| Application service | Orchestrator for one use case | Fat controllers, callback chains, or leaking rules | services/ |
| Repository | Only when a real persistence boundary exists beyond simple data access | Repositories for every query | repositories/ |
| Domain event | Explicit object when multiple downstream consumers justify it | Callback-driven hidden side effects | events/ or project namespace |
DO NOT introduce repositories, aggregates, or domain events just to sound "DDD".
DO NOT fight simple Ruby defaults when a normal class or service expresses the domain clearly.
ALWAYS start from domain invariants, ownership, and lifecycle before choosing a pattern.
MODELING OUTPUT IS NOT IMPLEMENTATION: do not include Ruby implementation code,
database migrations, or service bodies unless the user explicitly asks to move from
modeling into build work.Core principle: Model real domain pressure, not textbook DDD vocabulary.
test-planning-process and tdd-process before implementation.| Mistake | Reality |
|---|---|
| Turning every concept into a service | Many behaviors belong naturally on entities or value objects |
| Treating aggregates as folder names only | Aggregates exist to protect invariants, not to look architectural |
| Adding domain events for one local callback | Events justify their cost only when multiple downstream consumers exist |
| Pattern choice justified only with "DDD says so" | The reason must be an invariant, ownership boundary, or clear coordination need |
| Same invariant enforced from multiple unrelated entry points | Single aggregate root guards state transitions — one entry point per invariant |
| New abstractions that increase indirection without clarifying ownership | If the boundary is unclear after modeling, the abstraction is premature |
[!NOTE] For Rails-specific DDD mapping (e.g. mapping ActiveRecord associations and migrations), see
model-domaininrails-agent-skillswhen using the Rails pack.
For each domain concept, return a compact entry covering:
lib/ or services/)test-planning-process selects the test and tdd-process writes ittest-planning-processDomain concept: Order | Modeling choice: Aggregate root | Suggested file path: lib/orders/order.rb
Invariant: An Order must never transition from cancelled back to active, and its total must always reflect current line items. Order is the single entry point; no external caller may mutate line items or status directly.
Avoid: Do not extract an OrderService just to hold place and cancel — that behavior belongs on the aggregate. Do not introduce OrderRepository unless a non-standard database persistence backend is required.
Test handoff: First behavior — Order#cancel raises when already cancelled. Spec type: unit model spec (spec/orders/order_spec.rb). Implementation deferred until test-planning-process selects this spec and tdd-process writes it.
Next: test-planning-process to select the first failing spec for Order#cancel.
| Skill | When to chain |
|---|---|
| define-domain-language | When the terms are not clear enough to model yet |
| review-domain-boundaries | When the modeling problem is really a context boundary problem |
| test-planning-process | When the next step is choosing the best first failing spec |
docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10
scenario-11
scenario-12
scenario-13
scenario-14
scenario-15
scenario-16
skills
code-quality
respond-to-review
ddd
define-domain-language
model-domain
review-domain-boundaries
docs
write-yard-docs
orchestration
skill-router
patterns
create-service-object
implement-calculator-pattern
planning
generate-tdd-tasks
process
testing
triage-bug