organize-modules

Official

Organize modules with private/public re-exports.

Authorr3bl-org
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill helps teams keep Rust crates clean and maintainable by applying a private-modules-with-public-re-exports pattern, and by enabling conditional visibility to keep internal details hidden while allowing docs and tests to reference a stable API surface.

Core Features & Use Cases

  • Private modules with public re-exports to present a flat, stable API while preserving internal structure.
  • Conditional visibility for docs and tests using cfg(any(test, doc)) to keep internals private in production builds.
  • Step-by-step guidance for organizing mod.rs files, applying the pattern during module creation or refactoring, and ensuring transitive visibility across linked modules.
  • Real-world scenarios include refactoring large crates, modularizing domains, and avoiding API breakage during iterative changes.

Quick Start

  1. Identify candidate internal modules and wrap them in private modules with public re-exports in the root mod.rs.
  2. Add conditional visibility for doc/test builds where you need rustdoc links to private internals.
  3. Verify that re-exports maintain a flat API, and run cargo test and cargo doc to confirm correctness.

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: organize-modules
Download link: https://github.com/r3bl-org/r3bl-open-core/archive/main.zip#organize-modules

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.