software-architecture

software-architecture

Beliebt

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

1KSterne
194Forks
Aktualisiert 1/21/2026
SKILL.md
readonlyread-only
name
software-architecture
description

Guide for quality focused software architecture. This skill should be used when users want to write code, design architecture, analyze code, in any case that relates to software development.

Software Architecture Development Skill

This skill provides guidance for quality focused software development and architecture. It is based on Clean Architecture and Domain Driven Design principles.

Code Style Rules

General Principles

  • Early return pattern: Always use early returns when possible, over nested conditions for better readability
  • Avoid code duplication through creation of reusable functions and modules
  • Decompose long (more than 80 lines of code) components and functions into multiple smaller components and functions. If they cannot be used anywhere else, keep it in the same file. But if file longer than 200 lines of code, it should be split into multiple files.
  • Use arrow functions instead of function declarations when possible

Best Practices

Library-First Approach

  • ALWAYS search for existing solutions before writing custom code
    • Check npm for existing libraries that solve the problem
    • Evaluate existing services/SaaS solutions
    • Consider third-party APIs for common functionality
  • Use libraries instead of writing your own utils or helpers. For example, use cockatiel instead of writing your own retry logic.
  • When custom code IS justified:
    • Specific business logic unique to the domain
    • Performance-critical paths with special requirements
    • When external dependencies would be overkill
    • Security-sensitive code requiring full control
    • When existing solutions don't meet requirements after thorough evaluation

Architecture and Design

  • Clean Architecture & DDD Principles:
    • Follow domain-driven design and ubiquitous language
    • Separate domain entities from infrastructure concerns
    • Keep business logic independent of frameworks
    • Define use cases clearly and keep them isolated
  • Naming Conventions:
    • AVOID generic names: utils, helpers, common, shared
    • USE domain-specific names: OrderCalculator, UserAuthenticator, InvoiceGenerator
    • Follow bounded context naming patterns
    • Each module should have a single, clear purpose
  • Separation of Concerns:
    • Do NOT mix business logic with UI components
    • Keep database queries out of controllers
    • Maintain clear boundaries between contexts
    • Ensure proper separation of responsibilities

Anti-Patterns to Avoid

  • NIH (Not Invented Here) Syndrome:
    • Don't build custom auth when Auth0/Supabase exists
    • Don't write custom state management instead of using Redux/Zustand
    • Don't create custom form validation instead of using established libraries
  • Poor Architectural Choices:
    • Mixing business logic with UI components
    • Database queries directly in controllers
    • Lack of clear separation of concerns
  • Generic Naming Anti-Patterns:
    • utils.js with 50 unrelated functions
    • helpers/misc.js as a dumping ground
    • common/shared.js with unclear purpose
  • Remember: Every line of custom code is a liability that needs maintenance, testing, and documentation

Code Quality

  • Proper error handling with typed catch blocks
  • Break down complex logic into smaller, reusable functions
  • Avoid deep nesting (max 3 levels)
  • Keep functions focused and under 50 lines when possible
  • Keep files focused and under 200 lines of code when possible

You Might Also Like

Related Skills

coding-agent

coding-agent

179Kdev-codegen

Run Codex CLI, Claude Code, OpenCode, or Pi Coding Agent via background process for programmatic control.

openclaw avataropenclaw
Holen
add-uint-support

add-uint-support

97Kdev-codegen

Add unsigned integer (uint) type support to PyTorch operators by updating AT_DISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

pytorch avatarpytorch
Holen
at-dispatch-v2

at-dispatch-v2

97Kdev-codegen

Convert PyTorch AT_DISPATCH macros to AT_DISPATCH_V2 format in ATen C++ code. Use when porting AT_DISPATCH_ALL_TYPES_AND*, AT_DISPATCH_FLOATING_TYPES*, or other dispatch macros to the new v2 API. For ATen kernel files, CUDA kernels, and native operator implementations.

pytorch avatarpytorch
Holen
skill-writer

skill-writer

97Kdev-codegen

Guide users through creating Agent Skills for Claude Code. Use when the user wants to create, write, author, or design a new Skill, or needs help with SKILL.md files, frontmatter, or skill structure.

pytorch avatarpytorch
Holen

Implements JavaScript classes in C++ using JavaScriptCore. Use when creating new JS classes with C++ bindings, prototypes, or constructors.

oven-sh avataroven-sh
Holen

Creates JavaScript classes using Bun's Zig bindings generator (.classes.ts). Use when implementing new JS APIs in Zig with JSC integration.

oven-sh avataroven-sh
Holen