code-architecture

Refactor TypeScript-like codebases using module boundaries and dependency injection.

289|16|Updated Feb 16, 2026
One-click install
npx skills add https://github.com/evrendom/rudel --skill code-architecture-evrendom
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-architecture
Source: https://github.com/evrendom/rudel/tree/main/.claude/skills/code-architecture
Command: npx skills add https://github.com/evrendom/rudel --skill code-architecture-evrendom

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Codebases often suffer from unclear boundaries and noisy dependencies, making maintenance and testing hard. This Skill codifies architecture standards to improve organization, scalability, and readability.

Core Features & Use Cases

  • Enforces a clear function ordering: constants/types, main/entry point, supporting functions, and utilities.
  • Advocates service functions over classes and dependency injection to enhance testability and reduce coupling.
  • Use Case: when refactoring a monolithic module or designing a new service, apply these rules to extract responsibilities and simplify testing.

Quick Start

Apply the described architecture patterns to reorganize the codebase for clarity and testability.

Frequently Asked Questions about code-architecture

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

FAQPage Schema
How do I enforce clean architecture boundaries when refactoring TypeScript code?

Apply a four-part function ordering to TypeScript modules: constants and types first, then the main entry point, followed by supporting functions, and finally bottom-up helper utilities. This structure enforces readability and testability.

Why should I prefer service functions over classes in TypeScript projects?

Service functions over classes enhance testability and reduce coupling in TypeScript projects. By avoiding class instances, you simplify dependency injection and make functional boundaries clearer, which improves codebase scalability and readability.

What's the best way to structure TypeScript functions for readability?

Structure TypeScript functions using a four-part order: constants/types, main entry, supporting utilities, and bottom-up helpers. This enforces a top-down reading flow where high-level logic precedes implementation details, maximizing code maintainability.

When do I need dependency injection for TypeScript code organization?

Use dependency injection when refactoring monolithic modules or designing new services to reduce coupling and simplify testing. It enforces clear module boundaries by inverting dependencies, making it easier to isolate and mock service functions.

Can I apply code architecture patterns to an existing monolithic TypeScript module?

Apply architecture patterns to existing monolithic TypeScript modules by extracting responsibilities, enforcing module boundaries, and reordering functions into constants, main entry, supporting, and helper sections. This refactoring improves codebase scalability and testability.