general-patterns

Audit backend codebases for layer separation and standardized error codes.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/takayatomose/tas-agent-skills --skill general-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: general-patterns
Source: https://github.com/takayatomose/tas-agent-skills/tree/main/.agents/skills/general-patterns
Command: npx skills add https://github.com/takayatomose/tas-agent-skills --skill general-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides language-agnostic backend architecture and error-handling patterns to eliminate inconsistent layering, tenant isolation gaps, and ad-hoc error codes across services.

Core Features & Use Cases

  • Layered Architecture Enforcement: Guidance to maintain Presentation, Application, Domain, and Infrastructure separation.
  • Standardized Error Handling: Error code categories, response format, monitoring priorities, and implementation examples for NestJS, Java, Go, and Rust.
  • Operational Patterns: Multi-tenancy scoping, atomic use-case pipelines, event-driven side effects, and anti-patterns to avoid.
  • Use Case: Audit or design a backend service to ensure all repository queries are tenant-scoped, business rules throw domain exceptions, and infrastructure errors map to INF_* codes with monitoring alerts.

Quick Start

Use the general-patterns skill to audit a backend codebase for layer violations, missing tenant scoping, and inconsistent error codes.

Frequently Asked Questions about general-patterns

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

FAQPage Schema
How do I enforce layered architecture separation in a NestJS or Go backend?

Multi-tenancy isolation works by ensuring all repository queries are explicitly tenant-scoped before execution. This pattern enforces tenancy-scoped repository queries across backend services to prevent tenant isolation gaps and data leakage.

What's the best way to standardize error codes and responses across backend services?

Standardized error handling uses error code categories and a uniform response format where infrastructure errors map to INF_* codes with monitoring alerts. This enforces consistent error responses and business rules to throw domain exceptions across services.

How do I implement event-driven side effects in a backend application?

Event-driven side effects are implemented by designing atomic use-case pipelines that trigger events upon completion. This pattern provides guidance for event-driven flows alongside multi-tenancy scoping and operational anti-patterns to avoid.

Can I use these backend architecture patterns with both Java and Rust?

Yes, these language-agnostic backend patterns are applicable to Java and Rust, as well as NestJS and Go. They provide implementation examples for standardized error handling and architecture enforcement across all four technology stacks.

How do I audit a backend codebase for layer violations and missing tenant scoping?

Auditing a backend codebase involves checking for layer violations, missing tenant scoping in repository queries, and inconsistent error codes. This skill provides the rules to verify that business rules throw domain exceptions and infrastructure errors map correctly.