What problem does it solve? Developing custom Ascend NPU operators requires a trusted numerical baseline to verify correctness, but hand-writing PyTorch reference implementations and their validation harnesses is repetitive and error-prone. This Skill automates the generation of {op}_golden.py files from operator specifications, complete with input factories, self-validation, and NPU performance profiling. ## Core Features & Use Cases - Deterministic scaffold generation: gen_golden_scaffold.py parses SPEC.md front matter and input/output tables to emit function signatures, _make_inputs() factories, and _validate() harnesses, leaving only the math body as TODOs. - NPU-first execution with controlled fallback: golden code runs on NPU via torch_npu, errors out with install guidance when torch_npu is missing, and falls back to CPU only when no NPU hardware exists. - Mandatory verification and profiling gates: generated files must pass python3 {op}_golden.py (exit code 0) and produce GOLDEN_PERF_REPORT.md via profile_golden.py before downstream stages. - Use Case: Given a SPEC.md describing a fused BatchMatmulMaxSum operator with P0 shapes and dtypes, generate a validated batchmatmulmaxsum_golden.py that aligns matmul FP32 accumulation semantics and profiles each P0 shape on an Ascend NPU. ## Quick Start Generate a golden reference implementation for my operator from its SPEC.md, validate it on the NPU, and produce the performance report.