general-patterns

Standardize backend architecture layers, error handling, and multi-tenant isolation across languages.

4|2|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/hiimtrung/coder --skill general-patterns-hiimtrung
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: general-patterns
Source: https://github.com/hiimtrung/coder/tree/main/.agents/skills/general-patterns
Command: npx skills add https://github.com/hiimtrung/coder --skill general-patterns-hiimtrung

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Language-agnostic backend development often suffers from inconsistent patterns and divergent error-handling practices; this Skill consolidates architecture principles, error handling standards, and multi-tenant strategies into a single reference across languages.

Core Features & Use Cases

  • Architecture Layers: Presentation, Application, Domain, and Infrastructure isolation.
  • Multi-Tenant Isolation: Context extraction and mandatory tenant validation.
  • Event-Driven Architecture: Cross-module communication via domain events.
  • Persistence Strategy: Relational (PostgreSQL), Append-Only (MongoDB), and Ephemeral (Redis).

Quick Start

Apply these patterns to your next backend project to standardize architecture and error handling across languages.

Frequently Asked Questions about general-patterns

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

FAQPage Schema
How do I standardize backend architecture layers across multiple programming languages?

Standardize backend architecture layers by applying language-agnostic patterns that enforce Presentation, Application, Domain, and Infrastructure isolation consistently. This ensures multi-language projects maintain uniform boundaries and error-handling practices without being tied to a specific framework.

What is the best way to handle multi-tenant isolation in a cross-language backend?

Multi-tenant isolation in a cross-language backend requires mandatory tenant validation and context extraction rules. This approach enforces strict tenant boundaries uniformly across different programming languages within the same project.

How does event-driven architecture work for cross-module communication in distributed backends?

Event-driven architecture for cross-module communication works by dispatching domain events between isolated modules. This decouples services by allowing modules to react to events without direct dependencies, standardizing workflows across languages.

When do I need language-agnostic patterns for backend error handling?

You need language-agnostic patterns for backend error handling when a multi-language project suffers from divergent practices. Consolidating error-handling standards into a single reference ensures consistent behavior across all services.

Does this backend pattern support PostgreSQL, MongoDB, and Redis persistence strategies?

Yes, this backend pattern supports relational persistence with PostgreSQL, append-only strategies with MongoDB, and ephemeral storage with Redis. These persistence strategies are mapped to standardize data handling across different architecture layers.