br4zz4:patterns

Applies SOLID, DRY, KISS, and layered architecture rules when writing or reviewing code.

Updated May 25, 2025
One-click install
npx skills add https://github.com/oporpino/commons --skill br4zz4-patterns-oporpino
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: br4zz4:patterns
Source: https://github.com/oporpino/commons/tree/main/ai/shared/skills/br4zz4%3Apatterns
Command: npx skills add https://github.com/oporpino/commons --skill br4zz4-patterns-oporpino

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases degrade when developers write code without consistent design principles, leading to duplication, tangled dependencies, and unreadable logic. This Skill enforces a shared set of coding principles and a strict layered architecture so every change stays simple, readable, and maintainable. ## Core Features & Use Cases - Design Principle Enforcement: Applies SOLID, DRY, KISS, and Clean Code rules with concrete code-smell detection and fixes during writing or review. - Arrow Architecture Guidance: Defines a four-layer structure (ports, core, bridges, platform) with strict dependency directions, use-case contracts, and event-driven transactional outbox patterns. - Use Case: When reviewing a pull request that mixes HTTP handling, business logic, and third-party API calls in one function, use this Skill to restructure it into a port calling a single entry-point use case with isolated bridge calls. ## Quick Start Review this code change using the br4zz4:patterns skill and refactor anything that violates SOLID, DRY, or the layer dependency rules.

Frequently Asked Questions about br4zz4:patterns

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

FAQPage Schema
How do I apply SOLID principles when reviewing code?▼

Check each function or module for a single responsibility, verify abstractions are used instead of concrete dependencies, and confirm interfaces stay small and focused. This Skill provides a checklist of questions and a code-smell table to guide the review.

What is the Arrow Architecture layer structure?▼

Arrow Architecture defines four layers: ports (routes and handlers), core (entities and use cases), bridges (external party integrations), and platform (cross-cutting transport). Dependencies flow ports to core, core to bridges, with platform connecting facts to reactions.

When should I use an event instead of a direct bridge call?▼

Use a bridge call when the use case needs the response to continue its flow. Record an event when the consequence is not needed in the request's response, writing it in the same transaction as the state change for reliable async delivery.

Does this architecture pattern work with languages other than Rust?▼

Yes, the Arrow Architecture is language-agnostic and defines layers by the knowledge code holds, not by syntax. The examples use Rust, but the dependency rules, use-case contracts, and event patterns apply to any stack.

What naming conventions does this Skill enforce?▼

Names must use business nouns and verbs readable by a product manager, such as Cart::Checkout or Auth::Login. Generic names like Manager, Processor, Handler, Helper, and Service are banned because the real services are the use cases.