Logo di Glide Component Segregator

Glide Component Segregator

Community
SrivarsanK
glide-component-segregator

How to read `glide-components.json`, the component index that the Glide visual editor writes, to find a component or element by name without searching the file tree. Use this skill whenever a project has `glide-components.json` and the user asks to change, find, restyle or inspect a component ("make the Card background darker", "where is the Header defined", "which components use this button"), and whenever you need the file, line and column of a UI element. Use it also when the registry looks wrong, empty or out of date.

Panoramica

Pubblicato daSrivarsanK
RepositoryGlide
Nome della skillglide-component-segregator
Stelle
217
Fork
8
File inclusi
14
LicenzaApache-2.0
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: 14

    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 SrivarsanK su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Glide Component Segregator 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/SrivarsanK/Glide/tree/main/skills/glide-component-segregator
  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/SrivarsanK/Glide.git /tmp/Glide
mkdir -p .claude/skills
cp -r /tmp/Glide/skills/glide-component-segregator .claude/skills/glide-component-segregator
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Glide Component Segregator 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 Glide Component Segregator 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 Glide Component Segregator 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à.

Glide component registry

Glide scans the project and writes glide-components.json in the project root. Each component is one entry with its file and the elements it renders. Reading this file is faster and more exact than a search through the source tree, because each element already has its line and column.

Glide writes the file when the editor server starts (the dev server with the Glide plugin, or the glide command) and again within 300 ms of a source change. Treat it as read-only: Glide overwrites manual changes.

The file

ts
interface ComponentRegistry {
  projectRoot: string;
  generatedAt: string;                 // ISO time of the last scan
  framework: 'react' | 'vue' | 'svelte' | 'astro' | 'html' | 'unknown';
  buckets: ComponentBucket[];          // one per component
}

interface ComponentBucket {
  name: string;                        // "Card", "Header"; "Anonymous" for an unnamed default export
  file: string;                        // absolute path
  exportType: 'default' | 'named' | 'anonymous' | 'sfc' | 'html';
  line: number;                        // where the component is declared
  column: number;
  elements: RegistryElement[];
  cssFiles: string[];                  // stylesheets next to the file with the same name
}

interface RegistryElement {
  id: string;                          // "file:line:col", the same value as the element's data-gl-source
  tagName: string;                     // "div", "button", or a component such as "Card.Header"
  line: number;
  column: number;
  isRoot: boolean;                     // the outer element that the component returns
  classNames: string[];                // static classes only; empty when the class is computed
  text?: string;                       // the first 25 characters of direct text
}

How to use it

A script in the glide skill prints the parts you need, so you do not have to load the whole file:

bash
node <glide skill folder>/scripts/query-components.mjs --list
node <glide skill folder>/scripts/query-components.mjs --name Card

Or read the JSON directly. Then:

  1. Find the component by name. Go to bucket.file at bucket.line.
  2. Pick the element.
    • For background, outer padding or size, use the element with isRoot: true.
    • For a part inside, match on tagName, classNames or text.
  3. Edit at element.line and element.column in bucket.file. That position is the < of the opening tag.
  4. For a CSS Modules component, the styles are in bucket.cssFiles[0], not in the markup.
  5. For a capitalized tagName (<Button>), the element is another component. To change what it renders, find the entry with that name. To change only this one use of it, edit here.

After you add or rename a component, wait a moment and read the file again; the scan runs 300 ms after the change.

Limits to keep in mind

  • Static classes only. classNames is empty for a computed class (cn(...), :class). Empty does not mean the element has no classes; read the source.
  • Several components can share a name in different files. Check file before you edit.
  • Template files (.vue, .svelte, .astro) have one entry per file, with exportType: 'sfc'.
  • Folders that are skipped: node_modules, dist, build, .next, .nuxt, coverage, and test folders.

When the file is missing or wrong

ProblemCauseWhat to do
No glide-components.jsonGlide has not run in this projectStart the dev server (with the Glide plugin) or run npx @srivarsank/glide. Until then, read the source files
A new component is not listedThe scan runs 300 ms after a change, and only while Glide runsRead the file again; check generatedAt
A component has no elementsThe file did not parse, or it returns no markupOpen the file and check it for a syntax error
The user's canvas edit was refused after your changeYou changed a file they had selectedNormal. Tell them to select the element again

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 Glide Component Segregator?

How to read `glide-components.json`, the component index that the Glide visual editor writes, to find a component or element by name without searching the file tree. Use this skill whenever a project has `glide-components.json` and the user asks to change, find, restyle or inspect a component ("make the Card background darker", "where is the Header defined", "which components use this button"), and whenever you need the file, line and column of a UI element. Use it also when the registry looks wrong, empty or out of date.

Perché usare Glide Component Segregator su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Glide Component Segregator è 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 Glide Component Segregator in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/SrivarsanK/Glide/tree/main/skills/glide-component-segregator. 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 Glide Component Segregator?

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 Glide Component Segregator?

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

La skill IA Glide Component Segregator è gratuita?

Sì. È pubblicata su GitHub da SrivarsanK con licenza Apache-2.0. 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 👇