شعار 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 يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 14

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها SrivarsanK على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Glide Component Segregator في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/SrivarsanK/Glide/tree/main/skills/glide-component-segregator
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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

فعّل Glide Component Segregator في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Glide Component Segregator تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Glide Component Segregator بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف 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

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي 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.

لماذا تستخدم Glide Component Segregator على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Glide Component Segregator عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Glide Component Segregator في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/SrivarsanK/Glide/tree/main/skills/glide-component-segregator. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Glide Component Segregator؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Glide Component Segregator؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Glide Component Segregator معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Glide Component Segregator مجانية؟

نعم. نشرها SrivarsanK على GitHub بموجب ترخيص Apache-2.0. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇