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.
npx agentmods add skills/axera-tech/magnetar/exportnpx skills add AXERA-TECH/Magnetar --skill exportgit clone --depth 1 https://github.com/AXERA-TECH/MagnetarWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00035 | $0.00735 |
| Opus 5 | $0.00017 | $0.00367 |
| Sonnet 5 | $0.00007 | $0.00147 |
| Haiku 4.5 | $0.00003 | $0.00073 |
Grade A, and why
export 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 2d ago.
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.
What it actually says
EXPORT
执行
MobileNet 可直接调用 sample = magnetar.stages.export.run_mobilenet(task_dir)。
其他模型需 Agent 自行实现:导出静态 ONNX → onnx.checker 验证 → ONNX Runtime 与原模型对分(cosine ≥ 0.99)→ 生成 model_meta.json 和校准数据。
校准数据尽量用真实业务数据(run_generic(calibration_data=…) 或 scripts/export_onnx.py --calib-dir);
随机/扰动数据仅兜底,需在 export_report.md 标注来源。
LLM 分支(model_route=llm,自回归/类 LLM 模型)
不导出 ONNX,改为:
- 验证 HuggingFace 权重可推理:跑通一次 source 生成(greedy),保存参考输出到
export/llm_reference.txt或 npy; - 生成可复现
export/llm_build.sh:完整pulsar2 llm_build2命令 (--input_path origin/<model> --output_path compile/llm_out --chip <chip> --max_context <LLM_MAX_CONTEXT> --prefill_len ... --weight_type s8|s4 --hidden_state_type bf16,Pulsar2 ≥ 6.0); - 确认 tokenizer:origin 中已有
tokenizer.txt/*_tokenizer.txt直接用; 没有则按 ax-llm 文档从 HF tokenizer 转换(third_party/tokenizer.axera工具), 无法生成时 STOP 说明; - 记录模型参数(model_type、num_hidden_layers、hidden_size、vocab_size、 tokenizer_type)到 export_report.md。
hybrid 组合模型(AR-TTS 等):LLM/AR 子模型按本分支准备,非 LLM 子模型 (vocoder/encoder 等)继续走本文件上方的通用 ONNX 导出,拆分开的产物分别记录。
验证
export/model.onnx为静态 shape,onnxruntime 可加载export/model_meta.json含完整 input/output name/shape/dtype/layout- Torch/ONNX cosine ≥ 0.99
export/calib_data/input.tar.gz存在(≥3 组样本)export/export_report.md标注校准来源(real 业务数据 / perturbed 兜底)- LLM 分支:
export/llm_build.sh存在且命令完整可复制;参考输出已保存; tokenizer 已确认
STOP
- ONNX 对分失败(cosine < 0.99)
- 模型含动态 shape 且静态化失败
- 仅有随机/扰动校准数据且用户未确认(校准集应尽量用真实业务数据,随机数据可能在真实业务上崩)
- LLM 分支:tokenizer 无法生成;llm_build2 不支持该架构且用户未确认回退方向
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.
- 2d ago First seen · 46 lines · 35 tokens per session scan A a429ff6f5251
export is a skill published in the GitHub repository AXERA-TECH/Magnetar (22 stars, last pushed 19d ago), licensed MIT. It adds 35 tokens to every session and 735 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
agent-code-analyzer
Agent skill for code-analyzer - invoke with $agent-code-analyzer.
foundry-config-setup
Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.
evolve
Start or monitor an evolutionary development loop.
agent-memory
../../../engineering/agent-memory/skills/agent-memory/SKILL.md.
agile-product-owner
../../../product-team/agile-product-owner/skills/agile-product-owner/SKILL.md.
dogfood
Systematically explore and test a mobile app on iOS/Android with agent-device to find bugs, UX issues, and other problems. Use when asked to dogfood, QA, exploratory test, find issues, bug hunt, or test this app on mobile.