mbtorch-architecture

Enforce layering rules and dependency directions for MbTorch codebase changes.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a consistent, repository-aware architecture and design guidance for contributors modifying MbTorch so changes land in the correct layer, respect dependency directions, and maintain testability and WASM-first constraints.

Core Features & Use Cases

  • Layering rules enforcement: Clear allowed and forbidden dependency directions between core, nn, optim, and io to prevent architectural regressions.
  • Change workflow guidance: A step-by-step checklist before code changes including module identification, searching for existing implementations, TDD-first testing, minimal changes, and documentation updates.
  • Review & refactor patterns: Recommendations for refactoring inverted dependencies, suggested alternative designs, and migration advice for public API changes.
  • Use Case: When adding a new optimizer or IO importer, this skill determines the correct directory, validates allowed imports, prescribes tests, and proposes backwards-compatible migration notes.

Quick Start

When proposing a change to core, nn, optim, or io, describe the module path, intended behavior, and dependencies and request an architecture-compliant design and test plan.

Frequently Asked Questions about mbtorch-architecture

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

FAQPage Schema
How do I enforce layering rules and dependency directions in a deep learning repository?

To enforce layering rules, validate allowed and forbidden dependency directions between core, nn, optim, and io directories to prevent architectural regressions. This maintains testability and structural constraints during code reviews and module additions.

What is the correct workflow for adding a new optimizer or IO importer to a machine learning codebase?

The correct workflow for adding an optimizer or IO importer involves identifying the correct directory, validating allowed imports, prescribing test-first development tests, and proposing backwards-compatible migration notes to ensure maintainable, architecture-compliant changes.

How do I refactor inverted dependencies and migrate public API changes in a neural network library?

To refactor inverted dependencies and migrate public API changes in a neural network library, apply suggested alternative designs and migration advice to ensure backwards compatibility while correcting forbidden dependency directions between core modules.

Does a WASM-first architecture constrain how I structure core, nn, and optim modules?

Yes, a WASM-first architecture constrains module structure by requiring changes to maintain testability and specific layering rules. You must ensure core, nn, optim, and io directories respect allowed dependency directions to preserve WASM compatibility.

What should I check before modifying core directories to prevent architectural regressions?

Before modifying core directories to prevent architectural regressions, check module paths, search for existing implementations, follow a test-first workflow, and verify allowed imports to strictly enforce repository layout and design guidelines.