Agent skill

Publish Model

by ayutaz in ayutaz/piper-plus

学習済み Lightning checkpoint (.ckpt) を ONNX export → sanity check → RTF benchmark → HuggingFace upload まで連鎖実行する read-mostly skill。

MITAuto-check passedAI & LLM Engineering

Install Publish Model

skills CLI
$ npx skills add ayutaz/piper-plus --skill publish-model -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ayutaz/piper-plus publish-model --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ayutaz/piper-plus.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/publish-model .claude/skills/publish-model && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
publish-model
GitHub stars
230
Token cost
~1.1k tokens
SKILL.md length
245 words
Files
1
Skills in repo
20
Repo updated
First seen
Licence
MIT

At a glance

学習済み Lightning checkpoint (.ckpt) を ONNX export → sanity check → RTF benchmark → HuggingFace upload まで連鎖実行する read-mostly skill。

  • Tasks that involve Model hubs and datasets
  • SKILL.md covers 引数, 現在の状態, フェーズ 1: 事前検査 and フェーズ 2: ONNX export, plus 7 more sections
  • Calls uv, cargo and git

What it does

Publish Model is an agent skill from ayutaz/piper-plus. 学習済み Lightning checkpoint (.ckpt) を ONNX export → sanity check → RTF benchmark → HuggingFace upload まで連鎖実行する read-mostly skill。 export 仕様 (FP16 / EMA / emblang unify / opset 15) を docs/spec/onnx-export-contract.toml から取得し、 全 7 ランタイムでの load 可否を gate する。

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Model hubs and datasets. It works with ONNX and Hugging Face. The repository describes itself as: Multilingual neural TTS (6 languages: JA/EN/ZH/ES/FR/PT, code supports SV) — C++, C, Rust, Go, Python, npm (WASM). VITS + Prosody, streaming, CUDA/CoreML/DirectML. pip install…. The licence is MIT.

When your agent uses it

  • Tasks that involve Model hubs and datasets

Example prompts

  • “/publish-model”

Requirements

  • Python 3
  • Pre-approved tools (allowed-tools): Bash(uv run *), Bash(ls *), Bash(stat *), Bash(sha256sum *), Bash(file *), Bash(git diff *), Bash(git status *), Read, Edit, Grep

What it can do on your machine

Read from SKILL.md and the folder at commit 421d066. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Bash(uv run *)
    • Bash(ls *)
    • Bash(stat *)
    • Bash(sha256sum *)
    • Bash(file *)
    • Bash(git diff *)
    • Bash(git status *)
    • Read
    • Edit
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • cargo
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv and git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Publish Model loads about 1.1k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 245 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~67
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ayutaz/piper-plus at commit 421d066, republished under its MIT licence (© ayutaz). 245 words, ~1,112 tokens.

Download SKILL.mdSave it as .claude/skills/publish-model/SKILL.md (or your agent's skills folder).
name
publish-model
description
学習済み Lightning checkpoint (.ckpt) を ONNX export → sanity check → RTF benchmark → HuggingFace upload まで連鎖実行する read-mostly skill。 export 仕様 (FP16 / EMA / emb_lang unify / opset 15) を `docs/spec/onnx-export-contract.toml` から取得し、 全 7 ランタイムでの load 可否を gate する。
allowed-tools
Bash(uv run *), Bash(ls *), Bash(stat *), Bash(sha256sum *), Bash(file *), Bash(git diff *), Bash(git status *), Read, Edit, Grep
argument-hint
<ckpt-path> [--output <onnx-path>] [--repo <hf-repo>] [--skip-benchmark]
disable-model-invocation
true

Model Publish Pipeline Skill

Lightning checkpoint から HuggingFace 公開までを 1 つの skill に集約。 現状 4 ステップ手動運用 (export → infer test → RTF bench → HF push) で、 工程間の引き継ぎミスが頻発する。

memory feedback_merge_caution.md に従い、 publish (HuggingFace への push) は確認後に明示実行。 デフォルトは export + sanity + bench までで停止。

引数

  • $1 (必須): checkpoint パス、 例 /data/piper/output-tsukuyomi-finetune-6lang-v2/last.ckpt
  • --output PATH: 出力 ONNX パス (デフォルト: checkpoint 隣に .onnx)
  • --repo OWNER/REPO: HuggingFace repo 名 (デフォルト: ayousanz/<voice-key>)
  • --skip-benchmark: フェーズ 4 を skip
  • --apply: フェーズ 5 (HuggingFace upload) も実行

現在の状態

  • ブランチ: !git rev-parse --abbrev-ref HEAD
  • 引数: $ARGUMENTS

フェーズ 1: 事前検査

bash
# Checkpoint 存在 / サイズ確認
ls -la "$1"
file "$1"  # PyTorch Lightning checkpoint であることを確認

# Contract gate (drift 検出して bump 前 fail)
uv run python scripts/check_onnx_export_contract.py 2>&1 | tail -3
uv run python scripts/check_phoneme_set_version.py 2>&1 | tail -3

フェーズ 2: ONNX export

CLAUDE.md の推奨設定 (FP16 + EMA + stochastic + emb_lang 自動統一) を使う:

bash
CUDA_VISIBLE_DEVICES="" uv run python -m piper_train.export_onnx \
    "$CKPT_PATH" "$OUTPUT_ONNX"

出力後の verification:

bash
# ONNX checker / shape inference
uv run python -c "import onnx; m=onnx.load('$OUTPUT_ONNX'); onnx.checker.check_model(m); onnx.shape_inference.infer_shapes(m)"

# Size 確認 (FP16 で ~50% 削減されているか)
ls -la "$OUTPUT_ONNX"

フェーズ 3: Inference sanity check

bash
# JSONL 1 行入力で推論テスト
echo '{"phoneme_ids": [1, 2, 3, 4, 5], "speaker_id": 0}' | \
    CUDA_VISIBLE_DEVICES="" uv run python -m piper_train.infer_onnx \
        --model "$OUTPUT_ONNX" --output-dir /tmp/sanity

# 出力 wav の sanity 確認
ls -la /tmp/sanity/*.wav

無音 / クリップ / 形状不一致を catch。

フェーズ 4: RTF benchmark (optional)

bash
uv run python tools/benchmark/run_benchmark.py \
    --model "$OUTPUT_ONNX" --warmup 5 --runs 30 \
    --output /tmp/rtf_$(basename "$OUTPUT_ONNX" .onnx).json

baseline (README.md の Benchmark 表、 Xeon E5-2650 v4 / 25 phoneme 英文 / 27ms) と比較し、 ±30% 以内なら OK、 大きい drift があれば warning。

フェーズ 5: HuggingFace upload (apply モードでのみ)

bash
# config.json も同送 (model_resolution_vectors.json で alias を canonical 化)
uv run python scripts/upload_model_to_hf.py \
    --onnx "$OUTPUT_ONNX" \
    --config "$OUTPUT_ONNX.json" \
    --repo "$HF_REPO" \
    --license cc-by-nc-sa-4.0

upload 後、 docs/spec/model-sha256-manifest.toml に新 entry を追加するための diff 提案 (sha256sum 値含む)。

フェーズ 6: 7-runtime load 確認 (optional / 軽量検証)

各 runtime で「model を load できるか」 だけ確認 (full inference は時間がかかる):

bash
# Python
uv run python -c "from piper import PiperVoice; v = PiperVoice.load('$OUTPUT_ONNX', '$OUTPUT_ONNX.json'); print('Python: OK')"

# Rust
(cd src/rust && cargo run --release --bin piper-plus -- --model $OUTPUT_ONNX --text 'test' --output-file /tmp/r.wav 2>&1 | tail -3)

# Go / C# / C++ / WASM はオプション

注意

  • memory feedback_training_cost: 学習時間は見送り理由にならない。 benchmark で出る drift は publish 中止の理由にもならない (regression 報告)。
  • memory feedback_data_asset_distribution: 新 voice 追加時は 7 manifest 同期が必要。 publish 後 check-new-runtime-asset skill を呼ぶ。
  • memory feedback_merge_caution: HuggingFace push は --apply 指定時のみ。 default は dry-run。
  • --skip-benchmark は CI 環境で RTF 測定が無意味な場合のみ使う (ローカル開発機推奨)。

使用例

text
# 通常のリリース前 publish
/publish-model /data/piper/output-tsukuyomi-finetune-6lang-v2/last.ckpt

# Benchmark をスキップして export + sanity だけ
/publish-model /data/piper/last.ckpt --skip-benchmark

# 確認後 HuggingFace へ実 publish
/publish-model /data/piper/last.ckpt --repo ayousanz/piper-plus-newvoice --apply

期待効果

  • 学習完了 → 公開までの 4-step 手動運用を 1 skill 化
  • ONNX export 仕様 drift (opset / FP16 / EMA / emb_lang) の commit-before-export catch
  • RTF benchmark の regression early detection
  • model SHA256 manifest 更新の markdown diff 自動生成
  • 7-runtime load 可否の publish 前 sanity

© ayutaz, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/publish-model of ayutaz/piper-plus.

Open the folder on GitHubat commit 421d066

Compare with similar skills

Publish Model next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Publish Model compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Publish Model this skillayutaz/piper-plus230—~1.1kAutomated safety check: PassMIT
Configure G1 Sim2realEGalahad/sim2real145—~1.5kAutomated safety check: PassNone
Xybrid Initxybrid-ai/xybrid467—~3kAutomated safety check: PassApache-2.0
Community Model ConversionRisorseArtificiali/anti-vocale117—~2.2kAutomated safety check: PassApache-2.0
Quark Torch Exportamd/Quark181—~1.5kAutomated safety check: PassMIT
Quark Torch Ptqamd/Quark181—~2.3kAutomated safety check: PassMIT

Similar skills

  • Configure G1 Sim2real

    EGalahad/sim2real

    Install, repair, and verify sim2real on G1 robot computers. An agent skill from EGalahad/sim2real.

    145 GitHub stars~1.5k tokensUpdated 11 days ago
    AI & LLM EngineeringAuto-check passed
  • Xybrid Init

    xybrid-ai/xybrid

    Generate model metadata for an ML model so it works with xybrid.

    467 GitHub stars~3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Community Model Conversion

    RisorseArtificiali/anti-vocale

    Convert a HuggingFace ASR fine-tune into a sherpa-onnx external model, publish it, and add it to the Anti-Vocale community catalog.

    117 GitHub stars~2.2k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Prepare export and downstream evaluation handoff for a planned or completed Quark PTQ run.

    181 GitHub stars~1.5k tokensUpdated 11 days ago
    AI & LLM EngineeringAuto-check passed
  • Runs an end-to-end AMD Quark post-training quantization workflow for PyTorch / Hugging Face LLMs: inspect a Hub or local model, choose a quantization plan, create reproducible artifacts, request…

    181 GitHub stars~2.3k tokensUpdated 11 days ago
    AI & LLM EngineeringAuto-check passed
  • Official

    Integrate a HuggingFace Computer Vision model into the NVIDIA TAO Toolkit ecosystem (tao-core config, tao-pytorch trainer, tao-deploy TensorRT pipeline).

    3.5k GitHub stars~4.5k tokensUpdated today
    AI & LLM EngineeringAuto-check: notes

More from ayutaz/piper-plus

All 20 skills in this repo
  • Skill Health

    ayutaz/piper-plus

    .claude/skills//SKILL.md の frontmatter / referenced script 実在 / trigger 衝突 / .claude/hooks/.sh の executable+shebang を検査する meta-skill。

    230 GitHub stars~626 tokensUpdated today
    Auto-check passed
  • Bump Deps

    ayutaz/piper-plus

    ORT / openjtalk / ruff のような cross-runtime に canonical sync が必要な依存関係を 1 コマンドで bump する read-mostly skill。

    230 GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Check Cross Runtime

    ayutaz/piper-plus

    Python canonical (src/pythonrun/piperplus/, src/python/pipertrain/, src/python/g2p/piperplusg2p/) を変更した PR で、 ONNX I/O 以外の追随漏れ (phonemizer / config schema / CLI flag / data 形式 / API 変更) を 7 ランタイム +…

    230 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Check Loanword

    ayutaz/piper-plus

    ZH-EN code-switching loanword の同期と forward-compat を 1 コマンドで検査。zhenloanword.json を編集したり 5 ランタイムのいずれかに新規エントリを追加する前後に呼ぶ。Python source を canonical とし、Rust×2 / Go / C / WASM / C++ の 6 mirror + Python…

    230 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Check New Runtime Asset

    ayutaz/piper-plus

    新規データアセット (JSON/TOML) を追加した PR で「7 箇所の package metadata 更新が全て揃っているか」を 1 コマンドで確認。MANIFEST.in / pyproject package-data / Cargo features / npm files / C Content / Android assets / SPM resources の更新漏れを…

    230 GitHub stars~964 tokensUpdated today
    Auto-check passed
  • Check PR Ready

    ayutaz/piper-plus

    PR 作成前の最終チェックリスト (lint/test/docs/CHANGELOG/未コミット確認)。/precheck の拡張版で、ドキュメント整合性も検証します。

    230 GitHub stars~687 tokensUpdated today
    Auto-check passed

Questions about Publish Model

What does Publish Model do?

学習済み Lightning checkpoint (.ckpt) を ONNX export → sanity check → RTF benchmark → HuggingFace upload まで連鎖実行する read-mostly skill。. Publish Model is an agent skill from ayutaz/piper-plus.

When should I use Publish Model?

Publish Model fits situations like: tasks that involve Model hubs and datasets.

How do I install Publish Model in Claude Code?

Run `npx skills add ayutaz/piper-plus --skill publish-model -a claude-code`. Or copy the skill folder (.claude/skills/publish-model in ayutaz/piper-plus) into .claude/skills/publish-model in your project. Claude Code loads it when a task matches its description.

How do I install Publish Model in Codex?

Run `npx skills add ayutaz/piper-plus --skill publish-model -a codex`. Or copy the skill folder (.claude/skills/publish-model in ayutaz/piper-plus) into .agents/skills/publish-model in your project. Codex loads it when a task matches its description.

Can I use Publish Model in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ayutaz/piper-plus --skill publish-model -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/publish-model, .gemini/skills/publish-model, .github/skills/publish-model and .opencode/skills/publish-model in your project.

What does Publish Model need to run?

Going by SKILL.md and its folder, Publish Model needs the command-line tools its instructions call (uv, cargo and git). Our summary lists: Python 3. Its frontmatter pre-approves these tools: Bash(uv run *), Bash(ls *), Bash(stat *), Bash(sha256sum *), Bash(file *), Bash(git diff *), Bash(git status *), Read, Edit, Grep.

Does Publish Model access the network?

SKILL.md contains no URLs. Its commands use uv and git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Publish Model safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Publish Model use?

Publish Model is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Publish Model use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Publish Model?

Skills that share tags, products or a category with Publish Model: Configure G1 Sim2real (EGalahad/sim2real, 145 stars), Xybrid Init (xybrid-ai/xybrid, 467 stars), Community Model Conversion (RisorseArtificiali/anti-vocale, 117 stars) and Quark Torch Export (amd/Quark, 181 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Publish Model?

ayutaz (a GitHub user) maintains it in ayutaz/piper-plus, which has 230 GitHub stars. The repository holds 20 skills in this directory. The repository was last updated on October 8, 2026.

Source: ayutaz/piper-plus on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.