Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计提醒

kernelgen-flagos内核根 flagos

Agent Skill

kernelgen-flagos 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

945

周安装

39

GitHub Stars

9

下载量

309
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:kernelgen-flagos(内核根 flagos)
来源仓库:https://github.com/flagos-ai/skills
仓库路径:skills/kernelgen-flagos
安装命令:
npx skills add https://github.com/flagos-ai/skills --skill kernelgen-flagos
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/flagos-ai/skills --skill kernelgen-flagos

简介

kernelgen-flagos 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词快速定位候选结果时使用。

  • 适用于内核生成相关的研究检索任务,支持多宿主环境集成。
  • 通过 npx skills add 命令从 GitHub 安装,需确认权限范围和是否触发联网或文件读写。
  • 建议在使用前检查维护状态和实际功能,避免依赖未经验证的自动化行为。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

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

# === 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.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.75%
按下载量换算110

Claude

31%
按下载量换算96

Cursor

18.92%
按下载量换算58

Gemini CLI

8.64%
按下载量换算27

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills