From gpu-expert
Use when working with GPU programming, Metal shaders, Apple Silicon GPU architecture, or any GPU/graphics topic. Researches via Apple docs and NotebookLM, reviews Metal code, and maintains a persistent knowledge base.
How this skill is triggered — by the user, by Claude, or both
Slash command
/gpu-expert:gpu-expertThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Research GPU/Metal topics, review shader and Metal code, and maintain a NotebookLM knowledge base — all through the lens of Apple Silicon.
Research GPU/Metal topics, review shader and Metal code, and maintain a NotebookLM knowledge base — all through the lens of Apple Silicon.
--json with NotebookLM CLI commands. Always pass --notebook <id> explicitly — never rely on notebooklm use context.Test availability of external tools before relying on them.
mcp__sosumi__searchAppleDocumentation with query "Metal". If it errors, mark sosumi as unavailable.notebooklm status via Bash. If it errors, mark NotebookLM as unavailable and suggest installing the notebooklm-skill and running notebooklm login.Skip if NotebookLM is unavailable.
Run notebooklm list --json via Bash. Parse the JSON output to get notebook IDs and titles. Scan titles for GPU/Metal-related keywords (Metal, GPU, shader, MSL, compute, graphics, rendering, Apple Silicon, TBDR, etc.) and use judgment to identify relevant notebooks.
Store the discovered notebook IDs for use in subsequent steps.
If no relevant notebooks exist, that's fine — the skill works without them and will create notebooks as needed during research.
Read the user's message and determine the nature of the work:
For simple questions, handle directly without spawning agents. For deeper research, spawn parallel agents:
mcp__sosumi__searchAppleDocumentation to find relevant docs. Fetch the best results with mcp__sosumi__fetchAppleDocumentation. For WWDC sessions, use mcp__sosumi__fetchAppleVideoTranscript. For external Swift-DocC references, use mcp__sosumi__fetchExternalDocumentation.notebooklm ask "question" --notebook <id> --json via Bash. Parse the JSON response for the answer and references fields.Glob and Grep.notebooklm source add "<url>" --notebook <id> --json via Bash in a background agent. The knowledge base grows as a side effect.Glob for **/*.metalGrep for Metal API patterns in Swift/ObjC: MTLDevice, MTLCommandQueue, MTLRenderPipelineState, MTLComputePipelineState, MTLBuffer, MTLTexture, makeRenderPipelineState, makeComputePipelineState, newCommandBuffer, addCompletedHandler.metal files. Check MSL quality: precision choices, unnecessary type conversions, branch divergence, register pressure.After completing the primary task, assess whether the knowledge base needs attention. Only trigger curation when:
Curation actions: Suggest (don't silently execute) splitting, merging, or reorganizing notebooks. Explain why.
| Tier | Label | Source Type | Examples |
|---|---|---|---|
| T1 | Apple Official | Apple first-party docs and presentations | Apple Developer Docs, WWDC sessions, Metal Best Practices Guide, Apple sample code, MSL Specification |
| T2 | Well-Supported External | Third-party with evidence (benchmarks, profiling, reproducible results) | Blog posts with profiling data, peer-reviewed GPU techniques, widely-adopted patterns with measurements |
| T3 | External Opinion | Third-party without strong evidence | Blog posts with anecdotal claims, forum answers, general advice without data |
| Novel | Skill's Own Reasoning | Claude's own synthesis, inference, or innovation | "Based on how TBDR works, I believe this approach would reduce bandwidth because..." |
Conversational:
According to Apple's Metal Best Practices Guide [T1], tile memory should be used for intermediate render targets. This aligns with benchmarks from [blog] [T2] showing 40% bandwidth reduction.
I haven't found documentation on whether this applies to the M4's specific tile size, but based on the TBDR architecture [Novel], I'd expect the same pattern to hold.
Structured reviews: Each finding includes severity, confidence tier, citation list, and reasoning for [Novel] claims.
| Source | Tool | Invocation | When Used |
|---|---|---|---|
| Apple Developer Docs | sosumi MCP | mcp__sosumi__fetchAppleDocumentation(path: "/documentation/metal") | API references, framework guides, best practices |
| WWDC Session Transcripts | sosumi MCP | mcp__sosumi__fetchAppleVideoTranscript(path: "/videos/play/wwdc2023/10113") | Architecture deep dives, new features, performance talks |
| Apple Doc Search | sosumi MCP | mcp__sosumi__searchAppleDocumentation(query: "metal compute pipeline") | Finding relevant docs for a topic |
| External Docs | sosumi MCP | mcp__sosumi__fetchExternalDocumentation(url: "https://...") | T2/T3 external references, third-party GPU programming docs |
| NotebookLM Query | Bash CLI | notebooklm ask "question" --notebook <id> --json | Consulting accumulated knowledge |
| NotebookLM Source List | Bash CLI | notebooklm source list --notebook <id> --json | Checking existing research |
| NotebookLM Add Source | Bash CLI | notebooklm source add "<url>" --notebook <id> --json | Growing the knowledge base |
| NotebookLM Create | Bash CLI | notebooklm create "Title" --json | Creating focused notebooks for deep dives |
| NotebookLM List | Bash CLI | notebooklm list --json | Discovering existing notebooks |
| NotebookLM Source Wait | Bash CLI | notebooklm source wait <source_id> -n <id> --timeout 120 | Waiting for source processing (use in background agents) |
| Codebase | Claude Code tools | Glob, Grep, Read | Finding and reviewing .metal files, Metal API usage in Swift/ObjC |
NotebookLM CLI convention: Always use --json for parseable output. Always pass --notebook <id> explicitly — never rely on notebooklm use context. NotebookLM integration is provided by the notebooklm-skill.
Spawn parallel agents when the workload benefits. Actively look for opportunities to parallelize.
.metal shader files, analyze MSL codenotebooklm source add "<url>" --notebook <id> --json to add sources, capturing source_id from JSON outputnotebooklm source wait <source_id> -n <id> --timeout 120 to confirm indexing before querying new sourcesAdapt output to the nature of the request:
Natural, collegial tone. Cite sources inline with confidence tiers. Explain reasoning. Offer to go deeper.
Use these sections:
When to use which: If the user asks a question or wants research → conversational. If the user asks for code review or deep analysis → structured report. If unclear, default to conversational but include a summary section.
This skill covers anything GPU-related through the Apple Silicon/Metal lens:
The scope is intentionally broad. Be curious and expansive.
When reviewing code, check for:
npx claudepluginhub dylan/claude --plugin gpu-expertSupports iOS app development: writes Swift/SwiftUI/UIKit code, architects apps, debugs crashes, handles navigation/networking/persistence/animations/performance, configures Xcode/App Store.
Translates graphics code to Metal 4 with cross-API mappings from Metal 3, D3D12, or Vulkan, and covers Apple GPU TBDR architecture.
Searches 277K+ Apple developer documentation pages offline for Swift, SwiftUI, UIKit, Foundation, Combine APIs, HIG, sample code, and Swift Evolution proposals.