my-java-rules

Prescribe Elixir and Phoenix coding standards for domain boundaries, testing, and performance.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Aafff623/yihui-vibe-coding-exer --skill my-java-rules
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: my-java-rules
Source: https://github.com/Aafff623/yihui-vibe-coding-exer/tree/main/.cursor/skills/my-java-rules
Command: npx skills add https://github.com/Aafff623/yihui-vibe-coding-exer --skill my-java-rules

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This collection codifies Elixir and Phoenix best practices such as Domain-Driven Design, explicit boundaries, and robust testing to improve maintainability and alignment across teams.

Core Features & Use Cases

  • Domain-Driven Design: organize code around business domains rather than technical layers
  • Functional Core, Imperative Shell: keep domain logic pure with side effects at boundaries
  • Explicit Over Implicit: prioritize clarity over magic
  • Composition Over Inheritance: build systems from small, focused components
  • Single Responsibility: each module and function should do one thing well
  • API/Implementation Separation: public API delegates to implementation modules
  • Boundary Enforcement: validate inputs at boundaries using tools like NimbleOptions
  • Pattern Matching, Railway-Oriented Programming, Typespecs: embrace robust control flow and typing
  • Testing Strategies: test public APIs, use Mox, ExMachina, and property-based testing
  • Performance and Security: best practices for performance and security in Phoenix apps
  • Documentation and Quality: doc for public functions, consistent formatting, static analysis

Quick Start

Start by outlining a domain boundary in a Phoenix context and implement a simple API that delegates to a clean, testable domain action.

Frequently Asked Questions about my-java-rules

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure Elixir and Phoenix projects using Domain-Driven Design?

Structure Elixir and Phoenix projects using Domain-Driven Design by organizing code around business domains rather than technical layers, keeping domain logic pure with side effects at boundaries, and ensuring each module has a single responsibility. This approach improves maintainability and alignment across teams.

What's the best way to enforce boundary validation in Phoenix contexts?

The best way to enforce boundary validation in Phoenix contexts is by validating inputs at boundaries using standard tooling like NimbleOptions. This ensures explicit over implicit design, prioritizing clarity over magic to maintain robust domain boundaries.

How do I test Phoenix public APIs with Mox and ExMachina?

Test Phoenix public APIs with Mox and ExMachina by focusing on public API testing rather than internal implementation details. Use Mox for mocking external dependencies, ExMachina for generating test data, and incorporate property-based testing for robust validation.

When should I use functional core and imperative shell in Elixir architecture?

Use functional core and imperative shell in Elixir architecture when you need to keep domain logic pure with side effects isolated at boundaries. This pattern separates business rules from infrastructure concerns, making systems easier to test and maintain.

Does this approach require typespecs and pattern matching in Elixir?

Yes, this approach requires typespecs and pattern matching in Elixir to embrace robust control flow and typing. Explicit naming, typespecs, and boundary-driven design are fundamental principles that ensure code clarity and reliability across Phoenix projects.

How to start implementing domain boundaries in a Phoenix context?

Start implementing domain boundaries in a Phoenix context by outlining a specific domain boundary and implementing a simple API that delegates to a clean, testable domain action. This establishes the API/implementation separation pattern for scalable architecture.