mbtorch-api-design

Design and review public APIs for the MbTorch machine learning framework.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures MbTorch public APIs are consistent, discoverable, and easy to use by making design decisions from the user's perspective rather than implementation convenience. It reduces fragmentation, surprising behaviors, and costly breaking changes by enforcing naming conventions, sample-first design, clear error messages, and a checklist-driven review process.

Core Features & Use Cases

  • Naming & Conventions: Prescribes PascalCase for types, snake_case for functions, and alignment with PyTorch/JAX conventions where appropriate.
  • Sample-first API design: Forces writing caller-facing examples before committing signatures to ensure ergonomics and discoverability.
  • Compatibility & Error Guidance: Provides a backward-compatibility workflow, deprecation policy, and structured error message format for io/nn/core/optim changes.
  • Use case: Use this Skill when adding a new optimizer, changing Model I/O signatures (ONNX/safetensors/.mbt), standardizing layer names, or preparing breaking-change migration notes.

**Quick Start

Ask the assistant to review a proposed public API change for core/nn/optim, produce a sample-first usage example, validate naming consistency, and list backward-compatibility and documentation tasks.

Frequently Asked Questions about mbtorch-api-design

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

FAQPage Schema
How do I design a consistent public API for a machine learning framework?

To design a consistent public API, enforce naming conventions like PascalCase for types and snake_case for functions, validate ergonomics with sample-first usage examples, and use checklist-driven reviews to ensure discoverability and prevent surprising behaviors.

How do I handle backward compatibility when changing model I/O signatures?

Handle backward compatibility for model I/O signatures by following a structured deprecation policy, preparing breaking-change migration notes, and using a compatibility workflow that prevents fragmentation when modifying ONNX, safetensors, or .mbt file interfaces.

What should be included in API error messages for core and nn library changes?

API error messages for core and nn library changes should follow a structured format standard that provides clear guidance, ensuring users can easily understand and resolve interface issues without encountering surprising behaviors.

When do I need a checklist-driven API review for library maintainers?

You need a checklist-driven API review when adding new public functions, changing core/nn/optim interfaces, or standardizing layer names, ensuring that naming conventions, sample-first design, and backward-compatibility procedures are fully satisfied.