Glide Component Segregatorのロゴ

Glide Component Segregator

コミュニティ
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.

概要

公開者SrivarsanK
リポジトリGlide
スキル名glide-component-segregator
スター
217
フォーク
8
同梱ファイル
14
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 14個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    SrivarsanKがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Glide Component Segregator」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/SrivarsanK/Glide/tree/main/skills/glide-component-segregator
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでGlide Component Segregatorを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にGlide Component Segregatorを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Glide Component Segregatorは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでGlide Component Segregatorを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Glide Component Segregatorはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにGlide Component Segregatorをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/SrivarsanK/Glide/tree/main/skills/glide-component-segregatorを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Glide Component Segregatorを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Glide Component Segregatorで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもGlide Component Segregatorを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Glide Component Segregator」は無料ですか?

はい。SrivarsanKがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇