mbtorch-examples

Design and maintain runnable MbTorch example projects with the moon toolchain.

1|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/c-tomioka/mbtorch --skill mbtorch-examples
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mbtorch-examples
Source: https://github.com/c-tomioka/mbtorch/tree/main/.claude/skills/mbtorch-examples
Command: npx skills add https://github.com/c-tomioka/mbtorch --skill mbtorch-examples

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Examples and demos can easily drift out of sync with evolving APIs, become too large to run, or require heavy external setup that prevents users from quickly verifying behavior. This skill provides a lightweight, repeatable approach to designing, implementing, and maintaining examples so that they remain minimal, executable, and informative.

Core Features & Use Cases

  • Minimal runnable examples: Guidelines to create one-purpose examples with required files (main.mbt or lib.mbt, moon.pkg, README) that run with the moon toolchain and avoid internal/private APIs.
  • Example types and conventions: Patterns for CLI training scripts, browser/WASM demos, and edge-simulation examples; naming rules and a difficulty ladder from Hello-MLP to LoRA-style fine-tuning.
  • Maintainability & testing: Advice to keep examples executable with synthetic data, include quickstart steps, and add lightweight tests so CI can verify buildability and basic runtime behavior.
  • Use case: When adding a new fine-tuning API, create examples/fine_tune_lora demonstrating a minimal training loop, a README with the run/build steps, and a small test that executes a few training steps.

Quick Start

Create a minimal example directory that includes a main.mbt or lib.mbt, a moon.pkg, and a README showing the single moon run or moon build command needed to execute the demo.

Frequently Asked Questions about mbtorch-examples

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create minimal runnable MbTorch examples that stay in sync with API changes?

To create minimal runnable MbTorch examples, include a main.mbt or lib.mbt, a moon.pkg, and a README with the moon run or moon build command. Use only public APIs and synthetic data to prevent drift and ensure lightweight execution.

What types of MbTorch demo projects can I build for browser and edge environments?

You can build CLI training scripts, browser/WASM demos, and edge inference simulations. These examples follow a difficulty ladder from Hello-MLP to LoRA-style fine-tuning, ensuring they remain executable with the moon toolchain and minimal external dependencies.

How do I test MbTorch examples in CI to verify buildability and basic execution?

Test MbTorch examples in CI by adding lightweight tests that execute a few training steps or basic runtime behaviors. Use synthetic data to avoid heavy external setup, allowing CI to verify both buildability and execution without requiring large datasets or complex configurations.

Does the moon toolchain support WASM demos and edge inference simulations for MbTorch?

Yes, the moon toolchain supports browser/WASM demos and edge inference simulations for MbTorch. Examples must include required files like main.mbt or lib.mbt, a moon.pkg, and a README, relying only on public APIs to ensure they run correctly in these environments.

Why do my MbTorch fine-tuning examples break after API updates, and how do I fix them?

MbTorch fine-tuning examples break after API updates due to drift between examples and evolving APIs. Fix them by ensuring examples rely only on public APIs, include synthetic data, and add CI checks that verify builds and basic execution to catch synchronization issues early.

What files are required for a minimal MbTorch example directory?

A minimal MbTorch example directory requires a main.mbt or lib.mbt file, a moon.pkg for package configuration, and a README with quickstart steps showing the single moon run or moon build command. These files ensure the example is executable and self-documenting.