Frontend Architecture logo

Frontend Architecture

Community
nimadorostkar
frontend-architecture

Use when structuring a frontend codebase. Covers module and folder organization, state boundaries, data-fetching layers, build configuration, and keeping a large application navigable. Trigger on "how should i structure this frontend", "our components folder is a mess", "where should data fetching live", "set up a frontend monorepo". Do not use for component-level state and hooks — see the react skill.

Overview

Publishernimadorostkar
RepositoryClaude-Skills-collection
Skill namefrontend-architecture
Stars
34
Forks
4
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by nimadorostkar on GitHub. Read the source before you install it.

Installation

Install the Frontend Architecture AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/frontend/frontend-architecture
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection.git /tmp/Claude-Skills-collection
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills-collection/skills/frontend/frontend-architecture .claude/skills/frontend-architecture
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Frontend Architecture in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Frontend Architecture on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Frontend Architecture is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Frontend Architecture

Purpose

Structure a frontend so that a new engineer can find the code for a feature in under a minute, and so that changing one feature does not require touching five others.

When to Use

  • Starting a new frontend application.
  • A codebase where features are scattered across components/, utils/, hooks/, and types/.
  • Deciding where state belongs and what owns data fetching.
  • Setting up a monorepo or splitting a large application.

Capabilities

  • Feature-based organization and module boundaries.
  • State layering: server cache, global client state, feature state, component state.
  • Data-access layer design and API client structure.
  • Build configuration, code splitting, and bundle budgets.
  • Monorepo structure and shared package design.

Inputs

  • The application's feature set and team structure.
  • Current pain: where changes ripple, what is hard to find.
  • Build tooling and deployment target.

Outputs

  • A folder structure organized by feature, not by file type.
  • Explicit rules for what may import what.
  • Bundle budgets enforced in CI.

Workflow

  1. Organize by feature, not by kind — features/checkout/ containing its components, hooks, api, and types beats components/, hooks/, api/ each containing a slice of every feature.
  2. Draw the import rules — Features may import from shared/. Features may not import from each other; if two need the same thing, it moves to shared/. Enforce this with a lint rule, not a convention document.
  3. Layer the state deliberately — Server data in a query cache. Genuinely global client state (theme, session) in one store. Everything else stays local. Most "global state" is server state in disguise.
  4. Centralize the API client — One place that knows about base URLs, auth headers, error mapping, and retries. Feature code calls typed functions, not fetch.
  5. Budget the bundle — Set a size limit per route and fail the build when it is exceeded. Bundle size regresses one dependency at a time.

Best Practices

  • A utils/ folder is where code goes to be forgotten. If a function belongs to a feature, keep it in the feature.
  • Barrel files (index.ts re-exporting everything) defeat tree-shaking and create import cycles. Import from the source module.
  • Route-level code splitting is nearly free and pays for itself immediately. Component-level splitting rarely does.
  • Do not put server data in a global store. It has staleness, refetch, and error semantics that a store does not model — you will rebuild a query library, badly.
  • A shared component library inside the app is fine. Extracting it into a package before a second consumer exists is premature.
  • Keep the dependency count low. Every dependency is bundle weight, a supply-chain risk, and a future migration.

Examples

Feature-based structure with enforced boundaries:

text
src/
  app/                    # routing, providers, global layout
  features/
    checkout/
      components/         # only used by checkout
      api/                # checkout endpoints, typed
      model/              # checkout state and domain types
      index.ts            # the feature's public surface
    orders/
    account/
  shared/
    ui/                   # design-system primitives
    api/                  # http client, auth, error mapping
    lib/                  # genuinely cross-cutting helpers
javascript
// eslint.config.js — the boundary is enforced, not merely documented.
{
  rules: {
    "import/no-restricted-paths": ["error", {
      zones: [{
        target: "./src/features/*",
        from: "./src/features/*",
        message: "Features must not import each other. Move shared code to src/shared.",
      }],
    }],
  },
}

A bundle budget that fails the build:

json
{
  "bundlesize": [
    { "path": "dist/assets/index-*.js", "maxSize": "180 kB", "compression": "brotli" },
    { "path": "dist/assets/checkout-*.js", "maxSize": "90 kB", "compression": "brotli" }
  ]
}

Notes

  • The single most effective architectural rule in a frontend codebase is "features may not import each other". It is trivially enforceable and prevents the coupling that makes large frontends unchangeable.
  • Analyze the bundle before optimizing it. vite-bundle-visualizer or source-map-explorer will usually show one date library or one icon set accounting for a third of the payload.
  • Monorepos solve a versioning problem between packages. If you have one application, a monorepo is overhead with no corresponding benefit.

Frequently asked questions

What does the Frontend Architecture AI skill do?

Use when structuring a frontend codebase. Covers module and folder organization, state boundaries, data-fetching layers, build configuration, and keeping a large application navigable. Trigger on "how should i structure this frontend", "our components folder is a mess", "where should data fetching live", "set up a frontend monorepo". Do not use for component-level state and hooks — see the react skill.

Why use Frontend Architecture on TypingMind?

Because you install it once and use it with any model. Frontend Architecture is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Frontend Architecture in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/frontend/frontend-architecture. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Frontend Architecture?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Frontend Architecture?

As many as you like. As long as a model supports skills, you can use Frontend Architecture with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Frontend Architecture AI skill free?

Yes. It is published on GitHub by nimadorostkar under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇