Logo di Component Architecture

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.

Panoramica

Pubblicato danahid-sparktales
Repositoryagent-dispatcher
Nome della skillcomponent-architecture
Stelle
58
Fork
5
File inclusi
1
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 1

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da nahid-sparktales su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Component Architecture in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/frontend/component-architecture
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Component Architecture in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Component Architecture non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Component Architecture non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA 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.

Perché usare Component Architecture su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Component Architecture è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Component Architecture in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/nahid-sparktales/agent-dispatcher/tree/main/skills/frontend/component-architecture. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Component Architecture?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Component Architecture?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Component Architecture: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Component Architecture è gratuita?

Sì. È pubblicata su GitHub da nahid-sparktales con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇