Logo de Kernelgen Flagos

Kernelgen Flagos

Organisation
flagos-ai
kernelgen-flagos

Unified GPU kernel operator generation and optimization skill. Automatically detects the target repository type (FlagGems, vLLM, or general Python/Triton) and dispatches to the appropriate specialized sub-skill. Includes operator generation, MCP-based iterative optimization, and feedback submission sub-skills. Use this skill when the user wants to generate or optimize a GPU kernel operator, create a Triton kernel, or says things like "generate an operator", "create a kernel for X", "optimize triton kernel", or "/kernelgen-flagos".

Présentation

Éditeurflagos-ai
Dépôtskills
Nom de la compétencekernelgen-flagos
Étoiles
22
Forks
11
Fichiers inclus
11
LicenceApache-2.0
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont en simple Markdown, et non en code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • 11 fichiers inclus

    Des scripts, des modèles de documents et des références que le modèle peut consulter pendant son travail. Les fichiers sont en lecture seule et ne sont jamais exécutés.

  • Open source

    Publiée par flagos-ai sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Kernelgen Flagos dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Collez l’URL du dossier de la compétence indiquée ci-dessous, puis confirmez.
    https://github.com/flagos-ai/skills/tree/main/skills/kernelgen-flagos
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter → Via URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/flagos-ai/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/kernelgen-flagos .claude/skills/kernelgen-flagos
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Kernelgen Flagos dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Kernelgen Flagos dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, Kernelgen Flagos n’est pas lié au modèle pour lequel cette compétence a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

kernelgen-flagos — Unified GPU Operator Generation Skill

This is a unified entry point that bundles generation and optimization sub-skills into one:

Sub-skill filePurpose
Generation
kernelgen-generate.mdGenerate GPU kernels for any Python/Triton repository
kernelgen-generate-for-flaggems.mdSpecialized generation for FlagGems repositories
kernelgen-generate-for-vllm.mdSpecialized generation for vLLM repositories
Optimization
kernelgen-optimize.mdOptimize existing Triton kernels via MCP iterative optimization (general purpose)
kernelgen-optimize-for-flaggems.mdOptimize Triton operators and integrate into FlagGems (3 modes: built-in/external/experimental)
kernelgen-optimize-for-vllm.mdOptimize Triton operators and integrate into vLLM (with CustomOp registration)
Platform Specialization
kernelgen-specialize.mdSpecialize Triton operators to target platforms (e.g., GPU → Ascend NPU) via MCP specialize_kernel
kernelgen-specialize-for-flaggems.mdPlatform specialization + FlagGems integration (4 modes: vendor-ops/vendor-fused/override-builtin/experimental)
MCP Configuration
kernelgen-mcp-setup.mdCheck and auto-configure the kernelgen-server MCP service (URL built-in, user only provides Token)
Feedback
kernelgen-submit-feedback.mdSubmit bug reports and feedback via GitHub or email

All sub-skill files are located in the same directory as this SKILL.md file.


Routing Protocol — Follow This BEFORE Doing Anything Else

Phase 0: MCP Configuration Check

Before anything else, ensure the kernelgen-server MCP service is configured and ready.

Use the Glob tool to find kernelgen-mcp-setup.md in this skill's directory:

Glob: **/skills/kernelgen-flagos/kernelgen-mcp-setup.md

Then use the Read tool to read the matched file and follow its instructions exactly.

  • If MCP is already configured → proceed to Phase 1.
  • If MCP is not configured → the setup skill will guide the user through configuration. Once configuration is written and the user is prompted to restart, stop here — do not continue to Phase 1.

Phase 1: Detect Repository Type

Use the Glob tool to check for project identity files in the current working directory:

Glob: pyproject.toml
Glob: setup.py
Glob: setup.cfg

Then use the Read tool to read whichever file exists. Determine the project name from the file contents (e.g., name = "flag_gems" in pyproject.toml, or name='vllm' in setup.py).

Also use the Glob tool to check for characteristic directory structures:

FlagGems indicators (match ANY):

  • src/flag_gems/ directory exists
  • Project name is flag_gems or flag-gems or FlagGems
  • import flag_gems appears in test files

vLLM indicators (match ANY):

  • vllm/ directory exists at the repo root (with vllm/__init__.py)
  • Project name is vllm
  • csrc/ directory exists alongside vllm/

Phase 2: Dispatch to Sub-skill

Based on the detection result, use the Read tool to read the appropriate sub-skill file from this skill's directory, then follow the instructions in that file exactly.

To locate the sub-skill files: They are in the same directory as this SKILL.md. Use the Glob tool to find the path:

Glob: **/skills/kernelgen-flagos/kernelgen-generate.md

Then use the Read tool to read the matched path.

Decision Table

Generation requests (user wants to create/generate a new operator):

Detection ResultAction
FlagGems repository detectedRead kernelgen-generate-for-flaggems.md and follow it
vLLM repository detectedRead kernelgen-generate-for-vllm.md and follow it
Neither detected (or unknown)Read kernelgen-generate.md and follow it

Optimization requests (user wants to optimize an existing operator, mentions "optimize", "speedup", "improve performance"):

Detection ResultAction
FlagGems repository detectedRead kernelgen-optimize-for-flaggems.md and follow it
vLLM repository detectedRead kernelgen-optimize-for-vllm.md and follow it
Neither detected (or unknown)Read kernelgen-optimize.md and follow it

Specialization requests (user wants to migrate/specialize an operator to a different platform, mentions "specialize", "migrate to Ascend/NPU", "platform migration"):

Detection ResultAction
FlagGems repository detectedRead kernelgen-specialize-for-flaggems.md and follow it
Neither detected (or unknown)Read kernelgen-specialize.md and follow it

Feedback requests:

Detection ResultAction
User reports a bug or requests feedback submissionRead kernelgen-submit-feedback.md and follow it

Important rules:

  1. Always detect first, dispatch second. Never skip detection.
  2. Read the entire sub-skill file before starting execution — do not partially read it.
  3. Follow the sub-skill instructions exactly as if they were the main SKILL.md. All steps, rules, and protocols in the sub-skill apply fully.
  4. Do not mix sub-skills. Once you dispatch to a sub-skill, follow it to completion.
  5. If the user explicitly requests a specific sub-skill (e.g., "use the FlagGems version"), honor that request regardless of auto-detection results.
  6. CRITICAL — MCP is mandatory: ALL operator code generation MUST go through the mcp__kernelgen-mcp__generate_kernel MCP tool. Optimization uses mcp__kernelgen-mcp__optimize_kernel, and platform specialization uses mcp__kernelgen-mcp__specialize_kernel. NEVER generate Triton kernels, PyTorch wrappers, or operator implementations yourself. If MCP is not configured, not reachable, or fails after all retries, STOP and report the issue — do NOT fall back to writing code manually.

Phase 3: Feedback Handling

At any point during the workflow, if the user reports a bug, says something is broken, or asks to submit feedback about the skill:

  1. Use the Read tool to read kernelgen-submit-feedback.md from this skill's directory.
  2. Follow the feedback submission workflow described in that file.
  3. After feedback is submitted, ask the user if they want to continue with the operator generation workflow or stop.

Quick Reference for Users

bash
# === Generation ===
# Generate a kernel operator (auto-detects repo type)
/kernelgen-flagos relu

# Generate with explicit function type
/kernelgen-flagos rms_norm --func-type normalization

# === Optimization ===
# Optimize an existing Triton kernel (auto-detects repo type)
# Just say "optimize the relu kernel" or "improve kernel performance"
# The skill will automatically dispatch to the right optimization sub-skill

# The skill will automatically:
# - Detect if you're in a FlagGems repo → use FlagGems-specific workflow
# - Detect if you're in a vLLM repo → use vLLM-specific workflow
# - Otherwise → use the general-purpose workflow

If you encounter any issues during generation, just say "submit feedback" or "report a bug" and the skill will guide you through the feedback submission process.

Fichiers inclus

Le modèle lit ces fichiers à la demande lorsque la compétence est chargée. Ils sont accessibles en lecture et ne sont jamais exécutés.

Foire aux questions

À quoi sert la compétence IA Kernelgen Flagos ?

Unified GPU kernel operator generation and optimization skill. Automatically detects the target repository type (FlagGems, vLLM, or general Python/Triton) and dispatches to the appropriate specialized sub-skill. Includes operator generation, MCP-based iterative optimization, and feedback submission sub-skills. Use this skill when the user wants to generate or optimize a GPU kernel operator, create a Triton kernel, or says things like "generate an operator", "create a kernel for X", "optimize triton kernel", or "/kernelgen-flagos".

Pourquoi utiliser Kernelgen Flagos sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Kernelgen Flagos se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Kernelgen Flagos dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/flagos-ai/skills/tree/main/skills/kernelgen-flagos. TypingMind lit le fichier SKILL.md, regroupe les fichiers associés et installe le tout sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Kernelgen Flagos ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Kernelgen Flagos ?

Autant que vous le souhaitez. Tant qu’un modèle prend en charge les compétences, vous pouvez utiliser Kernelgen Flagos avec lui : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Kernelgen Flagos est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par flagos-ai sous licence Apache-2.0. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, modèles de documents ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇