{
  "markdown": "# Intel GPU AI Skills\n\nA collection of [Agent Skills](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills) for setting up, running, benchmarking, and profiling arbitrary Hugging Face safetensors and GGUF models on Intel GPUs (Arc, Arc Pro, Battlemage). Covers the PyTorch + Transformers, vLLM-XPU, SGLang-XPU, and llama.cpp-SYCL stacks, plus CUDA to XPU migration.\n\nFormat follows the [Agent Skills specification](https://agentskills.io/specification).\n\n## Skills\n\n\n### Setup — get the host ready\n\n| Skill | Useful for | Example prompt |\n|-------|------------|----------------|\n| `xpu-system-setup` | First-time host setup: installs `xpu-smi`, Level Zero runtime, Docker, configures the render group and Intel GPU PPA. Also fixes Battlemage-specific prerequisites. | \"Prepare this bare-metal Ubuntu box for Intel GPU work.\" |\n| `xpu-discover` | Inventory Intel GPUs and check driver health (`xpu-smi` wrapper). CUDA analogue is `nvidia-smi`. | \"Is my Intel GPU detected? Run a quick health check.\" |\n| `xpu-runtime-preflight` | Check shared host, device, Docker, proxy, storage, and optional container readiness before using GPU/XPU skills in this pack. | \"Before using the XPU skills on this host, run the preflight and tell me what blocks it.\" |\n| `xpu-container-run` | Launch a Docker container with Intel GPU access (`/dev/dri`, render group, `ZE_AFFINITY_MASK`, `--ipc=host`). | \"How do I launch a Docker container that can see my Intel GPU?\" |\n\n### Plan — size and configure before you launch\n\n| Skill | Useful for | Example prompt |\n|-------|------------|----------------|\n| `model-can-it-fit` | Estimate VRAM (weights + KV + activations + framework) from HF `config.json`. Decoder-only LLM, MoE, VLM; refuses diffusion. | \"Will Qwen2.5-32B in int4 fit on my Arc Pro B70 at 8K context, concurrency 4?\" |\n| `model-config-recommend` *(experimental)* | Recommend a vLLM-XPU deployment config (quant, KV dtype, DP/TP, capacity) using roofline math against Intel Arc B-series specs. Predict → calibrate → verify. | \"What's the best config to serve Qwen2.5-7B on my B70 at 8K?\" |\n| `xpu-deploy-plan` | Chain preflight, fit, config-recommend, and a runtime skill into one `PLAN.md` with an exact launch command, smoke test, and rollback. | \"Give me a coordinated deployment plan for Llama-3-8B on this box.\" |\n\n### Run — get a model on the GPU\n\n| Skill | Useful for | Example prompt |\n|-------|------------|----------------|\n| `xpu-model-type-detect` | Detect a Hugging Face model's actual type (text-gen, VLM, diffusion, encoder, etc.) before loading, so the agent picks the right `AutoModel` class and input kwargs. | \"What kind of model is this, and how should I load it?\" |\n| `torch-xpu-run` | Run any HF safetensors model via upstream PyTorch + Transformers + `torch.xpu`. CUDA → XPU code translation. | \"Run gemma-3 in pure PyTorch on my Intel GPU.\" |\n| `vllm-xpu-run` | Serve a model with vLLM-XPU's OpenAI-compatible HTTP API. Image picker, flag rationales, multi-GPU patterns. | \"Start a vLLM server with Qwen2.5-7B on my Intel GPU.\" |\n| `sglang-xpu-run` | Serve a model with SGLang's XPU backend (`--device xpu --attention-backend intel_xpu`). RadixAttention prefix caching. | \"Serve Qwen3 with sglang on my Battlemage GPU.\" |\n| `llamacpp-xpu-run` | Run a GGUF model via llama.cpp's SYCL backend with an OpenAI-compatible `llama-server`; no Python/PyTorch required. | \"Serve this GGUF model locally on my Arc GPU with llama.cpp.\" |\n\n### Benchmark — measure how fast\n\n| Skill | Useful for | Example prompt |\n|-------|------------|----------------|\n| `torch-xpu-bench` | Single-process bench of an HF model via pure PyTorch (no server). TTFT, decode rate, peak XPU memory. | \"Bench Qwen3-8B forward pass on Intel without any server.\" |\n| `vllm-xpu-bench` | Bench a running vLLM-XPU server (`vllm bench serve` / `throughput`). TTFT, TPOT, ITL, throughput at concurrency. | \"Benchmark TTFT and TPOT on my running vLLM-XPU server.\" |\n| `sglang-xpu-bench` | Bench a running SGLang server (`sglang.bench_serving`). Includes prefix-cache hit-rate measurement. | \"Measure RadixAttention prefix-cache hit rate on my sglang server.\" |\n\n### Profile — find why it's slow\n\n| Skill | Useful for | Example prompt |\n|-------|------------|----------------|\n| `torch-xpu-profile` | Profile an HF model with `torch.profiler` + Kineto. Export Chrome trace; find hot ops + idle gaps. | \"Why is my Qwen2.5 generate() slow on Intel?\" |\n| `vllm-xpu-profile` | Profile a running vLLM server via `/start_profile` and `/stop_profile`, or offline `vllm bench --profile`. | \"Capture a vLLM-XPU profile around a real-traffic window.\" |\n| `xpu-profile-unitrace` | SYCL / Level Zero kernel-level profiling with `unitrace` (PTI-GPU; built from source). Per-kernel timing, oneCCL events, HW counters. | \"Show me the actual SYCL kernel names taking the time.\" |\n\n### Migrate — bring an existing CUDA project over\n\n| Skill | Useful for | Example prompt |\n|-------|------------|----------------|\n| `cuda-to-xpu-migration` | Assess a CUDA repo, notebook, Dockerfile, or launch script; produce a migration report and route to the right XPU skills. Plans and routes only. | \"Migrate this CUDA training repo to Intel XPU.\" |\n| `xpu-port` | Execute a single-target CUDA → XPU port: libcst-based scan, mechanical rewrite, and CPU FP64 vs. target-dtype correctness verification. | \"Port my repo at ./my-model to XPU now.\" |\n\nThe descriptions are designed to disambiguate by *deployment shape*: \"benchmark X\" alone is intentionally ambiguous (which framework?), so a good agent will ask whether you mean PyTorch / vLLM / sglang before picking. If you want to be explicit, mention the skill by name: *\"Use the **vllm-xpu-bench** skill to ...\"*.\n\n## Installing\n\nThese skills work with any agent that supports the Agent Skills standard,\nincluding Claude Code, opencode, OpenAI Codex, Cursor, GitHub Copilot CLI,\nGemini CLI, Qwen Code, Kimi Code, Hermes Agent, and OpenClaw.\n\n### Local clone, all agents at once (recommended)\n\n```sh\ngit clone https://github.com/intel/gpu-ai-skills.git intel-gpu-ai-skills\ncd intel-gpu-ai-skills\nbash scripts/install.sh\n```\n\nInstalls into every agent skills directory it detects. Pass `--all` to also create dirs for agents you haven't used, `--agent <name>` for one agent, `--uninstall` to reverse.\n\n### Claude Code\n\n```text\n/plugin marketplace add intel/gpu-ai-skills\n/plugin install <skill-name>@intel-gpu-ai-skills\n```\n\n### Gemini CLI\n\nThis repo ships [`gemini-extension.json`](gemini-extension.json):\n\n```sh\ngemini extensions install . --consent\n# or from URL:\ngemini extensions install https://github.com/intel/gpu-ai-skills.git --consent\n```\n\n> **Upgrading from an older install?** \n>\n> Please uninstall it first. Clean out any existing installs before reinstalling:\n>\n> ```sh\n> gemini extensions list\n> gemini extensions uninstall intel-gpu-ai-skills     # current name, if present\n> rm -rf ~/.gemini/extensions/intel-gpu-ai-skills\n>\n> gemini extensions install . --consent\n> ```\n\n### Clone / Copy\n\nFor any other agent, clone this repo and copy the skill folders into the agent's skills directory:\n\n| Agent | Skill Directory | Docs |\n|-------|-----------------|------|\n| Claude Code | `~/.claude/skills/` | [docs](https://code.claude.com/docs/en/skills) |\n| opencode | `~/.config/opencode/skills/` | [docs](https://opencode.ai/docs/skills/) |\n| OpenAI Codex | `${CODEX_HOME:-~/.codex}/skills/` | [docs](https://developers.openai.com/codex/skills/) |\n| GitHub Copilot CLI | `~/.copilot/skills/` | [docs](https://docs.github.com/en/copilot) |\n| Cursor | `~/.cursor/skills/` | [docs](https://cursor.com/docs/context/skills) |\n| Qwen Code | `~/.qwen/skills/` | [docs](https://github.com/QwenLM/qwen-code) |\n| Kimi Code | `~/.kimi/skills/` | [docs](https://www.kimi.com/code/docs/en/) |\n| Hermes Agent | `~/.hermes/skills/` or `hermes skills tap add intel/gpu-ai-skills` | [docs](https://hermes-agent.nousresearch.com/docs/guides/work-with-skills/) |\n| OpenClaw | `~/.openclaw/skills/`, `<workspace>/skills/`, or `skills.load.extraDirs` | [docs](https://open-claw.bot/docs/tools/skills/) |\n| Generic / `AGENTS.md` | `<repo>/.agents/skills/` or `~/.config/agents/skills/` | uses [`agents/AGENTS.md`](agents/AGENTS.md) |\n\n```sh\ncp -r plugins/intel-gpu-ai-skills/skills/* <skill-directory>/\n```\n\nopencode also auto-loads from `~/.claude/skills/` and `~/.agents/skills/`, so any of those paths works. GitHub Copilot CLI also accepts `gh skill install intel/gpu-ai-skills --agent github-copilot --scope user` (gh ≥ v2.90).\n\n## Layout\n\n```\nplugins/intel-gpu-ai-skills/skills/   # one directory per skill\nscripts/               # repo tooling (install, publish, generate AGENTS.md)\nagents/                # generated AGENTS.md fallback bundle\n.claude-plugin/        # Claude Code plugin marketplace manifests\ntests/                 # static validation\ntemplate/              # SKILL.md template for contributors\n```\n\nThe `agents/AGENTS.md` bundle is generated from the individual `SKILL.md` files; re-run `scripts/` tooling after adding a skill to keep it fresh.\n\n### Ubuntu 24.04 + Arc Pro B60/B70 (Battlemage)\n\nOn Ubuntu 24.04 with the stock kernel, Battlemage GPUs require three\nprerequisites before the skills work. Run the diagnostic first:\n\n```sh\nbash plugins/intel-gpu-ai-skills/skills/xpu-system-setup/scripts/check_battlemage_prerequisites.sh\n```\n\nIt checks for `nomodeset` in GRUB, the OEM kernel 6.17 requirement, and\ncompute runtime >=26.18. Pass `--fix` to apply remediations, or follow\nthe steps in `plugins/intel-gpu-ai-skills/skills/xpu-system-setup/SKILL.md`\n→ **Battlemage Prerequisites**.\n\n## Contributing\n\nNew skills go under `plugins/intel-gpu-ai-skills/skills/<skill-name>/` with a `SKILL.md`. Start from [`template/SKILL.md`](template/SKILL.md).\n\nBefore committing any skill change:\n\n```sh\nbash scripts/check-skills.sh\n```\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the validation rules.\n\n## Validate\n\n```sh\nbash tests/static.sh\n```\n\nThe checks themselves are stdlib-only. On this development branch it also\nruns `guardrails/check.py`, which needs PyYAML — without it that one step exits\n`PyYAML is required: pip install pyyaml` and it fails:\n\n```sh\npython3 -m pip install pyyaml\n```\n\nUnit tests for the VRAM calculator, which need `pytest`:\n\n```sh\npython3 -m pip install pytest\npython3 -m pytest tests/test_fit.py -q      # 71 passed, 6 skipped without HF_TOKEN\n```\n\nThese fetch each model's upstream `config.json` from the Hub at a pinned\nrevision on first use and cache it under `tests/data/.cache/`. The configs are\nthird-party files under their own licences and are deliberately not committed to\nthis repository; a config that cannot be fetched skips its tests rather than\nfailing them. To pre-fetch the configs and then run with no network, see\n[Layer 3a in HOW_TO_TEST.md](HOW_TO_TEST.md#layer-3a--calculator-unit-tests-5-seconds-no-gpu-internet-to-hf).\n\nFor deeper testing — install round-trip, per-skill acceptance, end-to-end smoke — see [HOW_TO_TEST.md](HOW_TO_TEST.md).\n\n## Resources\n\n- [Agent Skills specification](https://agentskills.io/specification)\n- [Anthropic — Equipping agents for the real world with Agent Skills](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills)\n- [vllm-project/vllm-skills](https://github.com/vllm-project/vllm-skills) — NVIDIA equivalents\n- [huggingface/skills](https://github.com/huggingface/skills) — Hub workflows\n- [PyTorch XPU getting started](https://docs.pytorch.org/docs/stable/notes/get_start_xpu.html)\n- [vLLM XPU installation](https://docs.vllm.ai/en/latest/getting_started/installation/gpu/?device=xpu)\n\n## License\n\nApache-2.0. See `LICENSE`.\n",
  "bytes": 11693,
  "sha": "f33c0a0465f7bbec17bea6fb80358721247785253b22e59dac7f2f8ddf92e6dc",
  "repo_slug": "intel/gpu-ai-skills",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_intel_gpu_ai_skills_fdc2f723/readme"
}