Component Architecture logo

Component Architecture

Community
nahid-sparktales
component-architecture

Decide where a component's boundaries go, where state lives, what its props should be, and whether to split it — using composition instead of configuration flags. Fires when adding a component to an existing tree, when a component has grown props or responsibilities, or when a review asks whether a structure will hold. Not for visual design decisions, not for styling systems, and not a licence to restructure code the task did not ask you to touch.

Overview

Publishernahid-sparktales
Repositoryagent-dispatcher
Skill namecomponent-architecture
Stars
58
Forks
5
Bundled files
1
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.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by nahid-sparktales on GitHub. Read the source before you install it.

Installation

Install the Component 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/nahid-sparktales/agent-dispatcher/tree/main/skills/frontend/component-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/nahid-sparktales/agent-dispatcher.git /tmp/agent-dispatcher
mkdir -p .claude/skills
cp -r /tmp/agent-dispatcher/skills/frontend/component-architecture .claude/skills/component-architecture
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Component 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 Component 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 Component 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.

Component architecture

Structure is decided by where change arrives, not by file length. A 300-line component with one reason to change is fine; a 40-line one that both fetches and renders is not.

When this fires

Adding a component to an existing tree, changing one whose props or responsibilities have grown, or reviewing whether a proposed structure will survive the next feature. It does not fire for styling-only edits or for copy changes.

Procedure

  1. Read the neighbours before designing. Open two or three components in the same directory. The project has already answered most of these questions — prop naming, where data is fetched, whether state lives in a store or in the tree. Matching an existing pattern beats importing a better one into one file.
  2. State the component's one responsibility in a sentence. If the sentence needs "and", you have either two components or one component with a helper. Write the sentence down; it is the boundary.
  3. Place each piece of state at the lowest node that reads it. Then move it up only when a second reader actually appears — not when you predict one. State owned above where it is read re-renders subtrees that do not care; state owned below its readers gets lifted in a panic later.
  4. Keep derived values derived. A value computable from existing state is not new state. Duplicating it creates two sources of truth and a synchronisation bug.
  5. Separate the data edge from the rendering. Fetching, subscriptions and effects belong at a route or container boundary; leaves take data as props. A leaf that fetches cannot be reused, previewed or tested without standing up its whole world.
  6. Respect the framework's own boundary where one exists — server vs client, island vs static. State, effects and event handlers force the interactive side, so push that boundary as far down the tree as it will go rather than marking a whole page interactive for one button.
  7. Design props as what, not how. A prop names a fact about the data or the situation (status, items, onSelect), not an instruction about rendering (shouldShowRedBorder). Prefer one variant-style union over several booleans that can contradict each other.
  8. Reach for composition before configuration. When a component needs to vary in a place, take children or a slot rather than adding a flag. Three or four booleans that toggle regions is the signal: expose the regions as sub-components and let the caller arrange them.
  9. Split on one of these triggers only — two independent reasons to change; a prop that is only read on one branch; a piece that a second caller genuinely needs; or the component cannot be exercised without mocking things unrelated to what it renders. Do not split for line count, and do not create an abstraction with a single caller.
  10. Before changing a shared component's API, find every caller and read them. A rename or a required-prop addition in shared code is a breaking change across the app — if the task did not ask for it, stop and ask rather than fanning the edit out.
  11. Check the result against the checklist, then verify it renders — structure that type-checks can still mount wrong (see browser-verification).

Checklist

  • The component's responsibility fits one sentence without "and"
  • Each state atom sits at the lowest node that reads it
  • Nothing derivable is stored
  • Data fetching sits at a container/route edge, not in a leaf
  • The interactive boundary is as low in the tree as it goes
  • No boolean prop combination can contradict another
  • Varying regions are children/slots, not flags
  • Every split has a named trigger; no single-caller abstraction was created
  • Callers of any changed shared API were read, and breaking ones were raised

Failure handling

  • A prop is drilled three or more levels — try composition first (pass the rendered element down), context second, a global store last. Reaching for the store first is how a local concern becomes an app-wide one.
  • Everything re-renders on one keystroke — locate the state owner before optimising. Memoising around misplaced state hides the cause and adds a cache to keep correct.
  • A component needs several unrelated mocks to render — that is the split trigger, not a testing problem.
  • Two components look alike but change for different reasons — leave them duplicated. Merging them produces a component with a flag for every difference within two features.
  • The existing pattern is genuinely bad — say so once, in one line, with what you would do instead. Do not refactor the surrounding tree inside an unrelated task.

Evidence to report

The responsibility sentence for each component you created or changed; where each piece of state now lives and why; props added or removed with the reason; each split and the trigger that forced it; what you deliberately left alone; and the callers you checked for any shared-API change. "Made it cleaner" is not evidence.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Component Architecture AI skill do?

Decide where a component's boundaries go, where state lives, what its props should be, and whether to split it — using composition instead of configuration flags. Fires when adding a component to an existing tree, when a component has grown props or responsibilities, or when a review asks whether a structure will hold. Not for visual design decisions, not for styling systems, and not a licence to restructure code the task did not ask you to touch.

Why use Component Architecture on TypingMind?

Because you install it once and use it with any model. Component 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 Component Architecture in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/frontend/component-architecture. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Component 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 Component Architecture?

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

Is the Component Architecture AI skill free?

Yes. It is published on GitHub by nahid-sparktales 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 👇