mbtorch-refactor

Community

Safely refactor MbTorch while keeping tests green

Authorc-tomioka
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Provides a disciplined, test-first approach to refactoring the MbTorch codebase so that internal structure, readability, and layering are improved without changing external behavior or breaking tests. It turns vague impulses to "clean up code" into concrete, auditable steps that respect project layering and TDD requirements.

Core Features & Use Cases

  • Refactoring coach: Guides the developer through safety rules, explicit problem statements, and small, test-verified change units.
  • Layering & dependency enforcement: Highlights and prevents layer-violation refactors (core, nn, optim, io) and suggests correct extraction locations.
  • TDD integration: Requires adding or strengthening tests before structural changes and prescribes atomic steps that keep tests green at every checkpoint.
  • Typical refactorings: File/function splitting for large tensor modules, consolidating scattered I/O into io/, and moving pure numeric ops from nn to core.
  • Use case: When core/tensor.mbt exceeds maintainable size or duplicated logic appears across modules, the skill produces a test-first plan to split, move, and re-export pieces safely.

Quick Start

Ask the assistant to analyze the target files, list concrete problems in the prescribed "問題/影響/対象/提案" format, and propose the first atomic refactoring step with required tests.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: mbtorch-refactor
Download link: https://github.com/c-tomioka/mbtorch/archive/main.zip#mbtorch-refactor

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.