hello-arch

Guides code refactoring, module restructuring, and architecture decisions using SOLID principles.

702|99|Updated Sep 26, 2025
One-click install
npx skills add https://github.com/hellowind777/helloagents --skill hello-arch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hello-arch
Source: https://github.com/hellowind777/helloagents/tree/main/skills/hello-arch
Command: npx skills add https://github.com/hellowind777/helloagents --skill hello-arch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When refactoring code, splitting files, or redesigning system architecture, developers often create circular dependencies, oversized files, and tangled module boundaries. This Skill enforces disciplined architecture rules so structural changes stay controlled, verifiable, and reversible.

Core Features & Use Cases

  • SOLID and Layering Enforcement: Applies single responsibility, open-closed, and dependency inversion principles, with strict outer-to-inner dependency direction (UI → Service → Repository) and zero circular dependencies.
  • Code Organization Rules: Promotes feature-based grouping, shared logic extraction only after three repetitions, and hard size limits (files/classes split at 400 lines, functions at 60 lines).
  • Controlled Change Strategy: Requires mapping current-to-target dependency graphs before coding, assessing blast radius, and splitting large refactors into independently verifiable and rollbackable steps.
  • Use Case: When extracting a component from a 600-line module, the Skill guides you to draw the dependency path first, split by feature, verify no circular imports remain, and confirm each step passes delivery checks.

Quick Start

Ask the AI to refactor a large module or restructure your project architecture, and it will apply these architecture rules and delivery checks.

Frequently Asked Questions about hello-arch

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

FAQPage Schema
How do I refactor a large file without breaking the codebase?

Map the current-to-target dependency graph before writing code, then split the refactor into small steps that each can be independently verified and rolled back. Keep files under 400 lines and functions under 60 lines as enforced split thresholds.

How to fix circular dependencies between modules?

Circular dependencies are treated as architecture problems that must be resolved, not worked around. Enforce a one-way dependency direction from outer layers to inner layers (UI → Service → Repository) and introduce abstractions or interfaces where layers need to communicate.

When should I extract shared logic into a common module?

Extract shared logic only after the same pattern appears three times; two similar occurrences are not enough. This avoids premature abstraction while still keeping common code in a shared location once duplication is proven.

Should code be organized by feature or by type?

Organize code by feature rather than by type. Feature-based grouping keeps related logic together with clear module boundaries, while type-based grouping tends to scatter changes across many directories.

What are the limits of this architecture guidance?

The size limits have stated exceptions: generated code, large test fixtures, migration scripts, and protocol constant tables are exempt from the 400-line file and 60-line function rules. It also defers to the broader HelloAGENTS technology selection principles for stack decisions.