ascend-moe-optimizer-auto-trace

ascend-moe-optimizer-auto-trace is a skill for Claude Code, Codex from XiaoLuoLYG/GOD. It costs 170 tokens per session (10,105 once invoked), scanned A, original, Apache-2.0.

A tracing and profiling skill for adding measurement points to Ascend operators and producing Chrome trace data. Profiling records help show where an operator spends time.

In plain words
What is it for?
Use it when instrumenting MoE operators, compiling Ascend code, saving profiling data, or inspecting it in Chrome trace tools.
Why use it?
It connects source changes, compilation, example scripts, and trace-file output so performance data is not collected in only one incomplete part of the workflow.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when instrumenting MoE operators, compiling Ascend code, saving profiling data, or inspecting it in Chrome trace tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xiaoluolyg/god/ascend-moe-optimizer-auto-trace
About the project

GOD is a control room for observing and directing societies of language-model agents running in simulated worlds. It lets researchers inspect replays, question individual agents, alter future events, reset simulations, and export experiments for reuse. The catalogue entries are skills and agents for operating and investigating these simulations.

XiaoLuoLYG/GOD · 1,105 stars · on GitHub · xiaoluolyg.github.io

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add XiaoLuoLYG/GOD --skill ascend-moe-optimizer-auto-trace
Clone the repo
git clone --depth 1 https://github.com/XiaoLuoLYG/GOD

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ascend-moe-optimizer-auto-trace

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiaoluolyg/god/ascend-moe-optimizer-auto-trace/github.svg)](https://agentmods.dev/skills/xiaoluolyg/god/ascend-moe-optimizer-auto-trace)
Your own site
<a href="https://agentmods.dev/skills/xiaoluolyg/god/ascend-moe-optimizer-auto-trace"><img src="https://agentmods.dev/badge/skills/xiaoluolyg/god/ascend-moe-optimizer-auto-trace/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ascend-moe-optimizer-auto-trace

Your own site · 80×15
<a href="https://agentmods.dev/skills/xiaoluolyg/god/ascend-moe-optimizer-auto-trace"><img src="https://agentmods.dev/badge/skills/xiaoluolyg/god/ascend-moe-optimizer-auto-trace.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 170 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 10,105 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00170 $0.10105
Opus 5 $0.00085 $0.05053
Sonnet 5 $0.00034 $0.02021
Haiku 4.5 $0.00017 $0.01010

Measured 7d ago against content hash 229d65be0d4d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

ascend-moe-optimizer-auto-trace scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

The scan reads SKILL.md. This mod also ships 14 executable files (scripts/apply_trace_scaffold.sh, scripts/bootstrap_trace_toolchain.py, scripts/check_compile_safety.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

jiuwenclaw/jiuwenclaw/resources/agent/jiuwenclaw_workspace/skills/ascend-moe-optimizer-auto-trace/SKILL.md · 219 lines

How it starts

The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.

昇腾算子自动打点

Agent 速查(执行本 skill 时先读)

红线:用户未明确说「只要改源码里的 TRACE / 不要 GM / 不要改 Op 输出与 pybind」时,禁止只改 op_kernel 或只插桩不交联调脚本。须满足下表 G1–G5;任一缺失须在回复中写明「未完成项 + 后续风险」,不得宣称已闭环。

门禁 必须满足
G1 预处理 团队 compile_ascend_proj.sh(或等价) 已接入 trace_preprocessor.py hook当次编译在构建树生成 point_map.json,且与当前运行的 OPP/核同源
G2 输出位次 profiling_data 为全部 Tensor「数据输出」中的最后一个(主输出 1…N,再第 N+1 路 profiling)。op_host / infer / tiling(若描述输出)/ 类 Init / __global__ / aclnnInner_* / 手写 pregen/.../aclnn_* / EXEC_NPU_CMD 实参 顺序一致;禁止只改其中一层
G3 编译 用项目常用整条命令跑通 OPP(及若有的 pybind whl)。不等于仅通过 validate_trace_points.py / check_compile_safety.py
G4 联调与后处理 在既有 examples/*_sample.py 和/或 test_*.py 中:设备同步(如 torch_npu.npu.synchronize)→ trace_utils.save_profiling_data;若生成 Chrome:调用 trace_collector.py,且 point_map.json 满足 G1不得「算子已多一路输出,但脚本仍按旧 arity 解包且从不落盘」
G5 落盘路径 传给 save_profiling_data / trace_collectorprofiling_dirchrome_tracepoint_map:在 multiprocessing.spawn 或等价并行之前 一律 Path(...).expanduser().resolve() 为绝对路径。相对路径在 save_profiling_data 内会拼到 trace_utils.py 所在目录,与 shell cwd 不一致 → 易出现 No rank*.pt

模式 A / B(与步骤 7 一致)A = profiling_data OPTIONAL,Python 侧可不增返回值个数;B = 同一 torch.ops 名,返回值最后一项为 profiling。用户要落盘 / Chrome 时优先 B 或在 sample 中显式接 optional 内核参数;OpDef REQUIRED 时禁止用 nullptr 规避。

阅读顺序:本段门禁 → 下文「目标」与「全链路操作性定义」→ 必须执行的流程 1–7reference.md


目标

根据自然语言需求,为目标算子生成可落地的算子侧打点代码。

边界约束:

  • 本 skill 负责 算子代码插桩 + profiling 数据采集/解析工具链的完整闭环。
  • 本 skill 不修改 算子的业务逻辑(matmul、通信等功能代码),仅新增 profiling 相关代码。
  • 本 skill 需要支持 在仅有算子代码时,自动补齐打点所需工程脚本、编译接入、以及从 profiling tensor 到 Chrome Trace JSON 的完整处理链路。
  • 就地改造、少增文件:优先改现有编译脚本、示例与 UT;避免平行维护新 sh、新 run_*、新整文件测试副本(细则见步骤 6–7 与下表)。
  • 同一算子、同一接口名:profiling 视为对原算子的增强,禁止再注册名为 xxx_profiling*_with_profiling 或任何「看起来像另一个算子」的 Op / torch.ops 入口算子在图与 Python 侧的注册名保持不变(若工程允许 arity +1,仅在同一名下多返回 profiling 张量;输入形参名与顺序也尽量不变,新增输出走既有扩展约定而非改名分叉)。

Read the full file on GitHub · 219 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 219 lines · 170 tokens per session scan A 229d65be0d4d

Subscribe to this mod's changes

ascend-moe-optimizer-auto-trace is a skill published in the GitHub repository XiaoLuoLYG/GOD (1,105 stars, last pushed 14d ago), licensed Apache-2.0. It adds 170 tokens to every session and 10,105 once invoked, about $0.0009 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

triage-issues

Triage GitHub issues in the googleapis/mcp-toolbox repo: propose the correct labels (type / priority / product / status), check for duplicates, verify a bug has enough info to act on, and draft a triage comment. Use whenever a maintainer asks you to triage, label, categorize, prioritize, or "look at" an issue (or a…

googleapis/mcp-toolbox · 164 tokens

adk-debug

Diagnoses misbehaving ADK agents by inspecting sessions, events, tool calls, and the exact request that reached the model. Covers the adk run CLI and the adk web dev server with its session, trace, and debug HTTP endpoints. Use when an agent returns the wrong answer, ignores a tool or swallows a tool error, hangs…

google/adk-python · 191 tokens

claw-admin

Claw system administration: service management, IM connections, logs, cron, and workspace diagnostics. Use when the user asks to manage claw services, connect/disconnect IM platforms, view logs, or perform system-wide operations.

x-cmd/x-cmd · 48 tokens

session-investigator

Investigate fast-agent session and history files to diagnose issues. Use when a session ended unexpectedly, when debugging tool loops, when correlating sub-agent traces with main sessions, or when analyzing conversation flow and timing. Covers session.json metadata, history JSON format, message structure, tool…

evalstate/fast-agent · 68 tokens

rubber-duck

Adversarial "rubber duck" review that turns explaining-out-loud into a hallucination check. The main session is the PRESENTER (it did the work — a design doc, investigation, or analysis — and holds the real reasoning) and reconstructs the topic to a LISTENER — a spawned subagent pinned to a DIFFERENT-vendor model that…

kirodotdev/KiroCrew · 161 tokens

optimize

Review code for efficiency and performance. Triggered by "/optimize" when user wants to identify bottlenecks or improve performance.

x-cmd/x-cmd · 29 tokens