[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7981H812ME6PN46VT2M6Y9C":3,"skill-same:01M7981H812ME6PN46VT2M6Y9C":43},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":13,"repositoryHtmlUrl":26,"repositoryHomepageUrl":6,"ownerHtmlUrl":27,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":28,"install":29,"resources":42},"01M7981H812ME6PN46VT2M6Y9C","ascend-npu-distill-patterns",null,"Distill completed Ascend NPU optimization evidence into reusable optimize-knowledge pattern cards, then support simulation and mismatch analysis loops that verify whether staged skills can reproduce the optimization without seeing the answer.","Piagari\u002Fhelix","Piagari","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F129916910?v=4","01M7980QB9Y8WK5TSSRJDC7H1X","01M7980QCA2FWSBBSSM695Y10B",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Fcommon\u002Fascend-npu-distill-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ascend-npu-distill-patterns\ndescription: Distill completed Ascend NPU optimization evidence into reusable optimize-knowledge pattern cards, then support simulation and mismatch analysis loops that verify whether staged skills can reproduce the optimization without seeing the answer.\n---\n\n# Ascend NPU Distill Patterns\n\n## Goal\n\nConvert optimization evidence into durable, generic pattern-card guidance for\nthe active language's `\u003Clanguage>-npu-optimize-knowledge` skill. Use this skill\nwhen a command asks you to compare a baseline operator with an optimized answer,\nread a completed optimize workspace, update pattern cards, simulate applying\nthose cards, or analyze why a simulated candidate did not match the expected\noptimization.\n\n## Language Scope\n\nThe command prompt names the active operator language and editable knowledge\nskill. Use that skill as the source of truth, for example\n`triton-npu-optimize-knowledge` for Triton or `tilelang-npu-optimize-knowledge`\nfor TileLang.\n\nKeep cards reusable within the active language. Do not assume Triton syntax,\n`@triton.jit`, or Triton IR when the active language is TileLang. When evidence\nshows a cross-language Ascend NPU idea, write the mechanism in language-neutral\nterms first, then keep API names, code examples, and verification details tied to\nthe active language's knowledge skill.\n\n## Distillation Workflow\n\n1. Read the baseline and optimized answer first. Identify the actual code-shape\n   changes, correctness constraints, and performance intent before editing any\n   skill file.\n2. For optimize-process inputs, read `opt-note.md` before round files. Use\n   `learned_lessons.md`, `opt-round-*\u002Fsummary.md`, `opt-round-*\u002Fattempts.md`,\n   `round-state.json`, and optional `perf-analysis.md` as evidence hints, not as\n   substitutes for reading the code diff. For each `opt-round-*\u002F`, compare the\n   kernel snapshot to the previous round. Extract only performance-impactful\n   mechanisms; drop a change if any filter fails:\n   - Round speedup vs the previous round (or baseline for round 1) is below 1.05x.\n   - `opt-note.md` or the round summary does not describe it as a meaningful win.\n   - The change did not survive to the final optimized code.\n   - The change is cosmetic, debug-only, or benchmark showed no gain.\n   If no card updates are needed, set `\"aligned\": true` in the JSON output.\n3. Match optimization mechanisms semantically against the editable knowledge\n   skill's `references\u002Fpattern_index.md` and candidate cards under\n   `references\u002Fpatterns\u002F`. Do not rely on filename citations or keyword matches\n   alone. Treat logs and round notes as evidence hints; confirm from the code diff.\n4. If an existing card honestly covers the mechanism, update that card only when\n   the evidence exposes missing preconditions, anti-signals, repair steps, or\n   verification guidance.\n5. If no existing card's `## Summary` and `## Use When` fit, add a new generic\n   pattern card in the same knowledge tree. The new card must be reusable beyond\n   the current operator.\n6. Regenerate or update the pattern index after adding or editing cards when the\n   knowledge skill provides an index builder.\n\n## Pattern Card Contract\n\n- Every card starts with `# \u003CHuman Title>`.\n- The first section is `## Summary`.\n- The second section is `## Use When`.\n- Keep `## Summary` and `## Use When` concise and retrieval-oriented: include\n  applicability conditions, symptoms, and key code-shape cues, but keep detailed\n  reasoning, examples, and edge cases in later sections.\n- Put detection rules under `## Use When` or `## Signals`.\n- Put stop conditions under `## Avoid When`, `## Failure Modes`, or another\n  clearly named anti-signal section.\n- Put validation rules under `## What To Verify After Applying`.\n- Preserve existing valid guidance unless new evidence clearly supersedes it.\n- Keep final prose operator-agnostic and self-contained within the active\n  language. Avoid round IDs, artifact path narration, and benchmark-specific\n  labels except inside short examples where they are necessary to explain the\n  mechanism.\n- Every card must be ≤ 500 lines. Compress in place; never split one card into\n  multiple files.\n- Do not put operator names, function\u002Fvariable names, round IDs, benchmark\n  numbers, or exact shapes in `## Summary` or `## Use When`.\n- Only document kernel performance optimizations — not process, workflow, or\n  debugging rules.\n- Do not set `priority: high` on new or updated cards.\n\n## Simulation Rules\n\nWhen simulating an optimizer worker, use only the baseline file in the current\ndirectory and the staged skills. Do not read parent directories, optimized answer\nfiles, generated distillation JSON, unified diffs, reports, or other files that\nwould reveal the answer.\n\nApply the matched pattern names as retrieval hints, then write the optimized\ncandidate requested by the command. If a named pattern is not relevant after\nreading the baseline, prefer a conservative candidate over forcing an unrelated\ntransformation.\n\n## Analysis Rules\n\nWhen auditing a simulated candidate, compare it with the expected optimized\nanswer by mechanism, not by byte-for-byte equality. Mark it aligned when it\ncaptures the same important code changes and constraints, even if formatting or\nirrelevant local structure differs.\n\nIf the candidate misses the mechanism, update the editable knowledge skill with\nthe missing reusable guidance. Explain the gap in terms of semantic\npreconditions, code-shape change, observed mismatch, and verification checks for\nthe next iteration. Follow **Pattern Card Contract** when editing cards.\n\nIf the candidate overgeneralized a pattern, refine the existing card with\n`Avoid When`, anti-signals, or verification rules instead of only adding a new\npositive example.\n\n## Post-Update Review\n\nRun when the command asks for a post-update review. Review all updated cards\nholistically before export or promotion.\n\n1. **Index first** — read `references\u002Fpattern_index.md`; group by domain, flag\n   duplicates, non-performance cards, and overly specialized index entries. Do\n   not read every full card upfront.\n2. **Consolidate selectively** — read full cards only for merge candidates,\n   removal candidates, or index red flags. Merge same-mechanism duplicates;\n   delete process\u002Fmethodology cards, overly specialized cards, and near-duplicates.\n3. **Fix cross-references** — `## Related Patterns` must be bidirectional; patch\n   unchanged cards with missing back-links only; do not heavily rewrite stable cards.\n4. **Report** — write JSON describing groups, merges, removals, quality fixes, and\n   a brief summary. Edit cards on disk; the JSON describes work already done.\n\nOutput shape:\n\n```json\n{\n  \"groups\": [{\"name\": \"...\", \"cards\": [], \"merged\": [], \"removed\": [], \"kept_separate\": []}],\n  \"quality_issues\": [{\"card\": \"...\", \"severity\": \"error|warning\", \"category\": \"...\", \"detail\": \"...\", \"fixed\": true}],\n  \"summary\": \"...\"\n}\n```\n\n## Boundaries\n\n- This skill owns workflow guidance. The CLI owns workspace discovery, staging,\n  iteration, reports, and promotion.\n- Do not modify the live optimize workflow skill unless the command explicitly\n  asks for it.\n- Do not create progress tables or benchmark-specific inventories as part of the\n  default distillation flow.\n","# Ascend NPU Distill Patterns\n\n## Goal\n\nConvert optimization evidence into durable, generic pattern-card guidance for\nthe active language's `\u003Clanguage>-npu-optimize-knowledge` skill. Use this skill\nwhen a command asks you to compare a baseline operator with an optimized answer,\nread a completed optimize workspace, update pattern cards, simulate applying\nthose cards, or analyze why a simulated candidate did not match the expected\noptimization.\n\n## Language Scope\n\nThe command prompt names the active operator language and editable knowledge\nskill. Use that skill as the source of truth, for example\n`triton-npu-optimize-knowledge` for Triton or `tilelang-npu-optimize-knowledge`\nfor TileLang.\n\nKeep cards reusable within the active language. Do not assume Triton syntax,\n`@triton.jit`, or Triton IR when the active language is TileLang. When evidence\nshows a cross-language Ascend NPU idea, write the mechanism in language-neutral\nterms first, then keep API names, code examples, and verification details tied to\nthe active language's knowledge skill.\n\n## Distillation Workflow\n\n1. Read the baseline and optimized answer first. Identify the actual code-shape\n   changes, correctness constraints, and performance intent before editing any\n   skill file.\n2. For optimize-process inputs, read `opt-note.md` before round files. Use\n   `learned_lessons.md`, `opt-round-*\u002Fsummary.md`, `opt-round-*\u002Fattempts.md`,\n   `round-state.json`, and optional `perf-analysis.md` as evidence hints, not as\n   substitutes for reading the code diff. For each `opt-round-*\u002F`, compare the\n   kernel snapshot to the previous round. Extract only performance-impactful\n   mechanisms; drop a change if any filter fails:\n   - Round speedup vs the previous round (or baseline for round 1) is below 1.05x.\n   - `opt-note.md` or the round summary does not describe it as a meaningful win.\n   - The change did not survive to the final optimized code.\n   - The change is cosmetic, debug-only, or benchmark showed no gain.\n   If no card updates are needed, set `\"aligned\": true` in the JSON output.\n3. Match optimization mechanisms semantically against the editable knowledge\n   skill's `references\u002Fpattern_index.md` and candidate cards under\n   `references\u002Fpatterns\u002F`. Do not rely on filename citations or keyword matches\n   alone. Treat logs and round notes as evidence hints; confirm from the code diff.\n4. If an existing card honestly covers the mechanism, update that card only when\n   the evidence exposes missing preconditions, anti-signals, repair steps, or\n   verification guidance.\n5. If no existing card's `## Summary` and `## Use When` fit, add a new generic\n   pattern card in the same knowledge tree. The new card must be reusable beyond\n   the current operator.\n6. Regenerate or update the pattern index after adding or editing cards when the\n   knowledge skill provides an index builder.\n\n## Pattern Card Contract\n\n- Every card starts with `# \u003CHuman Title>`.\n- The first section is `## Summary`.\n- The second section is `## Use When`.\n- Keep `## Summary` and `## Use When` concise and retrieval-oriented: include\n  applicability conditions, symptoms, and key code-shape cues, but keep detailed\n  reasoning, examples, and edge cases in later sections.\n- Put detection rules under `## Use When` or `## Signals`.\n- Put stop conditions under `## Avoid When`, `## Failure Modes`, or another\n  clearly named anti-signal section.\n- Put validation rules under `## What To Verify After Applying`.\n- Preserve existing valid guidance unless new evidence clearly supersedes it.\n- Keep final prose operator-agnostic and self-contained within the active\n  language. Avoid round IDs, artifact path narration, and benchmark-specific\n  labels except inside short examples where they are necessary to explain the\n  mechanism.\n- Every card must be ≤ 500 lines. Compress in place; never split one card into\n  multiple files.\n- Do not put operator names, function\u002Fvariable names, round IDs, benchmark\n  numbers, or exact shapes in `## Summary` or `## Use When`.\n- Only document kernel performance optimizations — not process, workflow, or\n  debugging rules.\n- Do not set `priority: high` on new or updated cards.\n\n## Simulation Rules\n\nWhen simulating an optimizer worker, use only the baseline file in the current\ndirectory and the staged skills. Do not read parent directories, optimized answer\nfiles, generated distillation JSON, unified diffs, reports, or other files that\nwould reveal the answer.\n\nApply the matched pattern names as retrieval hints, then write the optimized\ncandidate requested by the command. If a named pattern is not relevant after\nreading the baseline, prefer a conservative candidate over forcing an unrelated\ntransformation.\n\n## Analysis Rules\n\nWhen auditing a simulated candidate, compare it with the expected optimized\nanswer by mechanism, not by byte-for-byte equality. Mark it aligned when it\ncaptures the same important code changes and constraints, even if formatting or\nirrelevant local structure differs.\n\nIf the candidate misses the mechanism, update the editable knowledge skill with\nthe missing reusable guidance. Explain the gap in terms of semantic\npreconditions, code-shape change, observed mismatch, and verification checks for\nthe next iteration. Follow **Pattern Card Contract** when editing cards.\n\nIf the candidate overgeneralized a pattern, refine the existing card with\n`Avoid When`, anti-signals, or verification rules instead of only adding a new\npositive example.\n\n## Post-Update Review\n\nRun when the command asks for a post-update review. Review all updated cards\nholistically before export or promotion.\n\n1. **Index first** — read `references\u002Fpattern_index.md`; group by domain, flag\n   duplicates, non-performance cards, and overly specialized index entries. Do\n   not read every full card upfront.\n2. **Consolidate selectively** — read full cards only for merge candidates,\n   removal candidates, or index red flags. Merge same-mechanism duplicates;\n   delete process\u002Fmethodology cards, overly specialized cards, and near-duplicates.\n3. **Fix cross-references** — `## Related Patterns` must be bidirectional; patch\n   unchanged cards with missing back-links only; do not heavily rewrite stable cards.\n4. **Report** — write JSON describing groups, merges, removals, quality fixes, and\n   a brief summary. Edit cards on disk; the JSON describes work already done.\n\nOutput shape:\n\n```json\n{\n  \"groups\": [{\"name\": \"...\", \"cards\": [], \"merged\": [], \"removed\": [], \"kept_separate\": []}],\n  \"quality_issues\": [{\"card\": \"...\", \"severity\": \"error|warning\", \"category\": \"...\", \"detail\": \"...\", \"fixed\": true}],\n  \"summary\": \"...\"\n}\n```\n\n## Boundaries\n\n- This skill owns workflow guidance. The CLI owns workspace discovery, staging,\n  iteration, reports, and promotion.\n- Do not modify the live optimize workflow skill unless the command explicitly\n  asks for it.\n- Do not create progress tables or benchmark-specific inventories as part of the\n  default distillation flow.\n",{"name":5,"description":7},"main","5d6a3de8bf1eb43267adffc8e27a87d85fd81a4b","skills\u002Fcommon\u002Fascend-npu-distill-patterns","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix","https:\u002F\u002Fgithub.com\u002FPiagari","2026-07-16 20:07:51",{"source":8,"skillName":5,"commands":30,"prompt":40,"zipAvailable":41},[31,34,37],{"tool":32,"command":33},"npx","npx skills add Piagari\u002Fhelix --skill ascend-npu-distill-patterns",{"tool":35,"command":36},"bunx","bunx skills add Piagari\u002Fhelix --skill ascend-npu-distill-patterns",{"tool":38,"command":39},"pnpm","pnpm dlx skills add Piagari\u002Fhelix --skill ascend-npu-distill-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Fcommon\u002Fascend-npu-distill-patterns\u002FSKILL.md",true,[],[44,51,58,65,72,77],{"skillNo":45,"name":46,"nameZh":6,"description":47,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":48,"categories":49,"keywords":50,"publishedAt":18},"01M7985HE7EHEXX41M79MSZCMJ","triton-npu-repair-guide","Heuristic fixes for Ascend Triton compile\u002FJIT\u002Fkernel errors and numerical precision mismatches when editing or converting the operator. Does not replace ascend-npu-gen-test, ascend-npu-gen-bench, or harness specs.","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-repair-guide\u002FSKILL.md",[],[],{"skillNo":52,"name":53,"nameZh":6,"description":54,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":18},"01M7985DFYH5RRCDFTWAFYDFGA","triton-npu-optimize","Iteratively optimize a Triton Ascend NPU operator with correctness and performance gates. Use for operator optimization tasks that need repeated correctness validation, benchmark validation, multi-round experiment tracking, reusable optimization notes, and profiler-backed performance analysis when benchmark results need deeper explanation.","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-optimize\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":18},"01M79858YFWE96X7ZA1BJRVDEX","triton-npu-optimize-knowledge","Generic reference-only optimize knowledge for pattern triage and evidence-backed symptom routing. This skill does not define optimize workflow or own round artifacts.","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-optimize-knowledge\u002FSKILL.md",[],[],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":18},"01M79854BZPJ0XY5PTPQWTCY7Q","triton-npu-optimize-knowledge-v3","Generic reference-only optimize knowledge (v3 working copy) for pattern triage and evidence-backed symptom routing. This skill does not define optimize workflow or own round artifacts; prefer this tree for ongoing knowledge updates.","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-optimize-knowledge-v3\u002FSKILL.md",[],[],{"skillNo":73,"name":60,"nameZh":6,"description":61,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":18},"01M79850QM6QZP8VP6ZRQBQHCT","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-optimize-knowledge-v2\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":18},"01M7984W6SW3BZM5EXGRJ1VBXY","triton-npu-convert-pytorch-operator","Convert one PyTorch operator into a Triton NPU-backed PyTorch operator, preserve the trailing input-helper block, and validate the converted output through standalone or differential testing.","https:\u002F\u002Fgithub.com\u002FPiagari\u002Fhelix\u002Fblob\u002Fmain\u002Fskills\u002Ftriton\u002Ftriton-npu-convert-pytorch-operator\u002FSKILL.md",[],[]]