Borrowing it
Nothing to install: this file belongs to AXERA-TECH/Magnetar. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/AXERA-TECH/Magnetar/main/.codex/skills/magnetar/hidden/publish/SKILL.mdgit clone --depth 1 https://github.com/AXERA-TECH/MagnetarWrote 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.
[](https://agentmods.dev/skills/axera-tech/magnetar/publish)<a href="https://agentmods.dev/skills/axera-tech/magnetar/publish"><img src="https://agentmods.dev/badge/skills/axera-tech/magnetar/publish.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00031 | $0.00743 |
| Opus 5 | $0.00015 | $0.00371 |
| Sonnet 5 | $0.00006 | $0.00149 |
| Haiku 4.5 | $0.00003 | $0.00074 |
Grade A, and why
publish 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 6d 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
PUBLISH
STOP 点——必须询问用户
进入本阶段时,暂停并向用户确认以下三项,缺一不可:
- 发布到哪里? GitHub / HuggingFace
- 仓库名叫什么?(默认
{model_name}-axmodel) - 凭据在哪? GitHub 用
GITHUB_TOKEN环境变量,HF 用HF_TOKEN
执行
result = magnetar.stages.publish.publish(
pkg=task_dir / "package",
target="github", # 或 "huggingface"
repo_name="my-model-axmodel",
token=None, # None → 自动读 GITHUB_TOKEN / HF_TOKEN 环境变量
org="AXERA-TECH", # 可选,GitHub org 或 HF namespace
model_name="my_model",
)
分发策略
| 平台 | 内容 | 理念 |
|---|---|---|
| GitHub | 完整包(含 model_convert/ + C++ 源码) | 客户可复现编译流程 |
| HuggingFace | 精简包(models/ + python/ + cpp/ + reports/ + setup.sh + run.sh) | 客户直接用预编译模型和库 |
HF 特殊处理
- 剔除
model_convert/、.git、__pycache__(cpp/ 编译产物保留) - README.md 自动添加 YAML frontmatter(license、pipeline_tag、tags)
- 上传到 HF model repo
GitHub 特殊处理
- 在 package 目录内
git init+git push --force - 使用
https://oauth2:{token}@github.com/{org}/{repo}.git认证
验证
- GitHub:确认 push 成功,返回 repo URL
- HF:确认 upload_folder 成功,返回 model URL
- 端到端 NPU 跑通(RUNONBOARD 通过)时,发布包 SDK 为 NPU 专用版:
无
onnxruntime/torch/transformers运行时回退,依赖仅numpy + pyaxengine - 检查
package/NPU_ONLY_SDK.md存在且python/*_sdk/inference.py无import onnxruntime
LLM 分支(model_route=llm)
- 发布内容以 axllm 模型目录(
models/内 config.json + tokenizer + *.axmodel) 与 OpenAI 兼容 Python SDK(依赖仅 requests)为主; - GitHub:model_convert 含可复现
llm_build.sh(完整 llm_build2 命令); - HuggingFace:上传模型目录 + SDK + setup.sh/run.sh(含 axllm 安装脚本说明);
- README frontmatter 的
pipeline_tag用text-generation。
失败处理
- 凭据缺失 → 返回错误信息,重新询问用户
- 推送/上传失败 → 返回错误详情,用户决定重试或跳过
- huggingface_hub 未安装 → 提示
pip install -i https://mirrors.aliyun.com/pypi/simple/ huggingface_hub
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.
- 6d ago First seen · 68 lines · 31 tokens per session scan A c5b80f91ac39
publish is a skill published in the GitHub repository AXERA-TECH/Magnetar (22 stars, last pushed 3d ago), licensed MIT. It adds 31 tokens to every session and 743 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-release-swarm
Agent skill for release-swarm - invoke with $agent-release-swarm.
agent-release-manager
Agent skill for release-manager - invoke with $agent-release-manager.
agent-github-modes
Agent skill for github-modes - invoke with $agent-github-modes.
github-automation
GitHub workflow automation, PR management, issue tracking, and code review coordination. Integrates with GitHub Actions and repository management. Use when: PR creation, code review, issue management, release automation, workflow setup. Skip when: local-only changes, non-GitHub repositories.
agent-framework-py-release
Use when cutting a Python release for the microsoft/agent-framework monorepo. Triggers on "bump py versions", "cut a python release", "prepare release PR for python", "release py packages", "bump python to X.Y.Z", or similar requests to bump Python package versions and prepare a release PR. Handles all four lifecycle…
changelog-scan
Scan merged PRs and commits since a given reference, extract titles, labels, types, and signals. Produces structured input for release notes drafting.