frontend-architecture
Was er macht
Diese Skill beschreibt, wie du Code für React- oder React-Native-Anwendungen organisierst. Sie hilft dabei, alles in Modulen übersichtlich zu halten, Serverdaten von Bildschirmdaten zu trennen und klare Regeln dafür festzulegen, wie Codeteile miteinander kommunizieren dürfen.
Wann du ihn nutzt
- ✓Wenn du ein neues React- oder React-Native-Projekt startest.
- ✓Wenn der Code eines Projekts unübersichtlich wird und schwer zu verstehen ist.
- ✓Damit sich alle Entwickler an dieselben Organisationsregeln halten.
Link zum Skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/frontend-architecture/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Wie kann ich meinen React-Native-Code so strukturieren, dass er leicht verständlich und wartbar ist?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Es teilt die App in „Module“ (funktionale Bereiche) auf, wobei jedes Modul eigene Seiten, Komponenten und Daten hat. Regeln legen fest, wie diese Module miteinander interagieren dürfen, und zwar nur über öffentliche Einstiegspunkte.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Frontend Architecture (portable, module-based)
When to Use
Use this skill when you need a portable, framework-agnostic architecture style for any React or React Native frontend. Organizes apps into feature modules with page/screen directories, a strict server-state vs UI-state split, barrel-only cross-module imports, co-located styles, and clear component-promotion rules....
Portable skill — readable by Claude Code, OpenCode, Codex, Cursor, Windsurf, and others. This skill describes a structure and a set of rules, not a component library, a state library, or a visual style. It is deliberately global: the same module/page/state model maps onto Next.js (App Router), React + Vite (SPA), Remix, and Expo / React Native, and it works with any state-management and styling stack.
The goal: a codebase where any contributor can instantly answer three questions — "where does this code live?", "what is allowed to import what?", and "is this server state or UI state?" — without asking anyone. The structure makes the answers obvious.
0. The five core ideas
- Feature modules own their world. Each feature is a self-contained
modules/{feature}/folder with its own pages, components, hooks, state, types, and a single public barrel. - Pages/screens are directories, not files. A route is a folder that co-locates its component, its styles, and the components/hooks used only by it.
- State is split by origin. Server data lives in a query/cache layer. UI/client state lives in a store. They never overlap — regardless of which libraries you pick.
- Imports cross boundaries only through barrels. Reaching into another module's internals is forbidden; you import from
@/modules/{feature}and nothing deeper. - Code is promoted, not pre-placed. It starts as local as possible and moves outward only when a second consumer appears.
Everything below is the mechanical application of these five ideas. None of it is tied to a specific library — pick your stack in Sections 4 and 6.
1. Directory layout
The shape is identical across frameworks; only the routing layer on top differs (see Section 7).
src/
├── app/ or routes/ or navigation/ ← framework routing layer (thin — see §7)
├── modules/ ← feature modules (the heart of the app)
│ └── {feature}/
│ ├── index.ts ← PUBLIC BARREL — the only cross-module entry point
│ ├── README.md ← what this module owns, its routes, its data deps
│ ├── components/ ← components reused by 2+ pages IN THIS MODULE
│ ├── pages/ ← page/screen directories (one per route)
│ │ └── {page}/
│ │ ├── {page}.tsx ← the page/screen component
│ │ ├── {page}.styles.ts ← ALL styling for this page
│ │ ├── index.ts ← re-exports the page component
│ │ ├── components/ ← components used ONLY by this page
│ │ ├── hooks/ ← hooks used ONLY by this page
│ │ ├── constants/
│ │ └── README.md ← route, params, permissions, data deps
│ ├── hooks/ ← data hooks (query/mutation) + module hooks
│ ├── stores/ ← UI/client state store(s) — never server data
│ ├── services/ ← data-access (API calls) for this feature
│ ├── utils/ ← pure module utilities (co-located *.test.ts)
│ ├── constants/
│ └── types/ ← module request/response + view-model types
└── shared/ ← cross-module building blocks
├── components/ ← components used by 2+ MODULES
├── hooks/ ← cross-cutting hooks
├── api-client/ ← one typed client; the only place that talks to the network
├── store/ ← root store wiring (if your state lib needs one — see §4)
├── utils/ ← formatters, cn()/clsx, helpers
├── constants/
└── types/
Every folder that can be empty at scaffold time keeps a .gitkeep so the structure is visible from day one.
2. Feature modules
A module is a vertical slice of the product (e.g. auth, billing, dashboard, settings). It contains everything that feature needs and exposes a deliberately small surface.
…
Häufige Fragen
Muss ich bestimmte React-Bibliotheken verwenden?
Nein, diese Organisation funktioniert mit jeder State- oder Styling-Bibliothek, die du für dein React- oder React-Native-Projekt wählst.
Was sind „Module“?
Module sind wie Kisten, die alle Teile zu einem bestimmten Funktionsbereich der App bündeln, etwa „Authentifizierung“ oder „Zahlungen“.
Warum sind Seiten Ordner und keine Dateien?
Wenn Seiten von Anfang an Ordner sind, kannst du später einfach weitere Dateien hinzufügen (etwa seitenspezifische Komponenten oder Styles), ohne die Struktur ändern zu müssen.
Details
Originalbeschreibung des Autors
A portable, framework-agnostic architecture style for any React or React Native frontend. Organizes apps into feature modules with page/screen directories, a strict server-state vs UI-state split, barrel-only cross-module imports, co-located styles, and clear component-promotion rules.
Beliebtheit
- GitHub-Sterne
- 48k
- Platz im Ranking
- #4662
- Lizenz
- MIT
- Aktualisiert
- 15.10.2026
Kommentare
- …
Weitere Skills aus diesem Repository
00-andruia-consultant
48kHilft deinem Agenten, KI-Projekte zu starten oder zu verbessern. Er analysiert Code, schlägt Tools vor und erstellt Aktionspläne auf Spanisch.
007
48kLässt deinen Agenten Sicherheitsaudits und Bedrohungsmodellierung durchführen. Nützlich, um Projekte vor Angriffen und Schwachstellen zu schützen.
10-andruia-skill-smith
48kHilft deinem Agenten, KI-Tools zu erstellen oder zu verbessern. Er legt fest, wie Tools funktionieren, schreibt die Dokumentation und prüft die Struktur.
20-andruia-niche-intelligence
48kLässt deinen Agenten eine Branchenzusammenfassung erstellen. Nützlich, um Kontext, Regeln, Nutzungsmuster und Risiken anhand verlässlicher Quellen zu verstehen.
Ähnliche Skills
angular-developer
280kHilft deinem Agenten bei Angular-Code und gibt Tipps zur Projektstruktur. Nützlich für neue Projekte, einzelne Code-Teile sowie Performance und Barrierefreiheit.
frontend-a11y
280kHilft deinem Agenten, Weboberflächen für alle zugänglich zu machen. Sorgt dafür, dass Websites und Apps gut mit Screenreadern und Tastaturnavigation funktionieren.
frontend-patterns
280kLässt deinen Agenten moderne Muster in der Frontend-Entwicklung anwenden. Optimiert Performance, verwaltet State und folgt Best Practices für React und Next.js.