Diagnoses Qwegn engine crashes, Metal compiler failures, and performance regressions on Apple Silicon. Collects diagnostic bundles with QW_DUMP_PSOS, QW_TRACE_ACTIVATIONS, and MTL_DEBUG_LAYER, then drafts sanitized GitHub issues.
Ships in qwegn-mcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill when evaluating Qwegn (qwg / qwg serve) on a user's Mac and encountering a crash, Metal compiler failure, wrong/garbled output, OOM, or performance regression. Collect a minimal, one-round-trip diagnostic bundle and confirm with the user before filing on GitHub.
Verify Binary, Hardware, Pack Integrity, and Duplicates:
qwg --version
sw_vers
system_profiler SPHardwareDataType SPDisplaysDataType | grep -E "Model Identifier|Chip|Total Number of Cores|Memory|Metal"
qwg inspect <model-pack>
gh issue list --repo qwegnai/qwegn --state all --search "<keywords>" --limit 10
Confirm "geometryGuard": "ok" before attributing a failure to the engine.
Reproduce Deterministically with a Neutral Prompt: Bypass user profiles and sampling variance so the failure is reproducible:
qwg run <model-pack> --no-profile --temperature 0 --max-tokens 16 --prompt "What is 2+2?"
Run the 2-Minute Isolation Matrix (for Wrong Output or Runtime Errors):
--kv-mode f16 (isolates quantized KV cache).--mtp-drafts 0 (isolates speculative decoding).--gdn-prefill chunked vs --gdn-prefill naive (isolates prefill vs recurrent decode kernels).> 2564 tokens, test --lsa-mode off (isolates sparse attention).Capture the Compact Diagnostic Bundle (stderr):
QW_DUMP_PSOS=1 QW_TRACE_ACTIVATIONS=1 qwg run <model-pack> \
--no-profile --temperature 0 --max-tokens 4 --prompt "What is 2+2?" \
2> /tmp/qwg_trace.log
QW_TRACE_ACTIVATIONS_STEPS=<N> and QW_TRACE_ACTIVATIONS_LAYERS=<lo-hi>.MTL_DEBUG_LAYER=1 QW_DUMP_PSOS=1 qwg run <model-pack> \
--no-profile --temperature 0 --max-tokens 4 --prompt "What is 2+2?" \
2> /tmp/qwg_metal_debug.log
Sanitize Logs and Draft the GitHub Issue:
sed "s|$HOME|~|g" /tmp/qwg_trace.log > /tmp/qwg_trace_clean.log); never include API keys or private prompts.> *Generated with AI assistance during engine evaluation.*.[<subsystem>] <symptom> on <Chip> (<macOS>), environment snapshot, exact qwg command, isolation matrix results, and <details>-wrapped trace excerpts (or a sanitized gh gist create link if > 60 KB). See reporting-bugs.md for the full schema.Request Explicit User Confirmation Before Submitting: Show the sanitized draft to the user first. Only after explicit approval, create the issue:
gh issue create --repo qwegnai/qwegn --label bug \
--title "[<subsystem>] <symptom> on <Chip> (<macOS>)" \
--body-file /tmp/qwg_issue_body.md
| Failure | Fix |
|---|---|
qwg inspect fails geometryGuard or hash check | Re-download or re-pack the model (qwg pull <repo>) instead of filing an engine bug. |
qwg_trace.log exceeds GitHub's 65 KB issue limit | Narrow with QW_TRACE_ACTIVATIONS_LAYERS=0-3 / --max-tokens 4, or attach a sanitized gist via gh gist create. |
gh issue create returns authentication or permission error | Run gh auth status to verify login, or hand the sanitized Markdown body directly to the user to paste in the browser. |
Issue only reproduces under qwg serve (not qwg run) | Start QW_DUMP_PSOS=1 QW_TRACE_ACTIVATIONS=1 qwg serve <pack> --no-profile, send one temperature: 0 request via curl, and attach server stderr. |
MTL_DEBUG_LAYER=1 aborts before trace lines flush | Capture the Metal validation error message verbatim alongside QW_DUMP_PSOS=1 output and include both in the report. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
qwegn, bug-reporting, metal-debugging, apple-silicon, diagnostics
/qwegn-mcp:qwegn-bug-reportfrom qwegn-mcp
npx claudepluginhub qwegnai/qwegn --plugin qwegn-mcp6 skills in this plugin
/qwegn-compaction-and-episodicCompact long transcripts losslessly via qwg_compact_select and recover dropped commit SHAs, file paths, or error logs verbatim via qwg_episodic_recover./qwegn-guardGate mutating, destructive, or network shell commands with qwg_guard before execution, and screen untrusted external or RAG passages with qwg_rerank_screen before context injection./qwegn-mcp-setupWire Qwegn MCP and System-One endpoints into Claude Code, Codex, OpenCode, hermes, or omp, index Vault v2 code/PDF packs, and verify sidecar health.Other plugins' skills for the same job