← ClaudeAtlas

clean-architecturelisted

Use when a feature in any codebase — mobile app (Flutter, Android, iOS, React Native, KMP), web frontend, backend service, desktop app — must be implemented, extended, or refactored with Clean Architecture (layers, use cases, repositories, gateways, Uncle Bob structure), or when the work spans delivery (screens or endpoints), business rules, and data (API, database, cache) together. Its symptoms count as the same need — business logic piling up in widgets, screens, components, view models, controllers, or route handlers; UI or endpoints calling HTTP clients, databases, or storage directly; API, ORM, or database models leaking across layers; a feature needing offline support or sync. The project's stack, packages, and conventions are detected first and always win over this skill's defaults.
MuhammadBahaa/majarrah-marketplace · ★ 1 · AI & Automation · score 74
Install: claude install-skill MuhammadBahaa/majarrah-marketplace
# Clean Architecture (any stack, adapts to the project) Implement features with Clean Architecture — dependency direction `frameworks & drivers → adapters → use cases → domain` — in whatever stack and idiom the project already uses: mobile app, web frontend, backend service, or desktop. The skill imposes **boundaries**, never tools: packages, naming, and state management are detected from the project, not chosen by the skill. This file is a **router**. You **must** open and follow the reference each step links — never work from memory of it. **Not this skill:** pure visual tweaks with no data or business change; finding the root cause of a defect, or deciding where an already-understood fix belongs; documentation-only work; comparing an implementation against a design file. ## The two iron rules 1. **Dependency direction.** Source dependencies point inward only. The delivery layer — a screen, widget, state holder, controller, or route handler — never reaches past use cases into databases, storage, HTTP clients, or platform APIs; a use case never touches delivery, navigation or routing, or vendor types; the domain imports nothing from outside itself. 2. **Convention precedence.** The project's existing convention beats this skill's defaults — naming, state management, DI, folders, error idiom. The boundaries in rule 1 beat everything, including existing code that violates them: violations are **reported, never copied, never silently rewritten**. When the