shard

Split monolithic source files into focused modules and update imports.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/jtucker9/mystuff --skill shard-jtucker9
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shard
Source: https://github.com/jtucker9/mystuff/tree/main/skills/shard
Command: npx skills add https://github.com/jtucker9/mystuff --skill shard-jtucker9

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Shard splits monolithic source files into smaller, focused modules to improve readability, maintainability, and testability in large codebases.

Core Features & Use Cases

  • Proposes per-file splits to target 100-300 lines per new file
  • Preserves logical groupings for easier navigation and maintenance
  • Integrates with existing refactor workflows and deterministic protocols

Quick Start

Provide the target file path and let the skill propose a 100-300 line split per new file, then execute the refactor.

Frequently Asked Questions about shard

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

FAQPage Schema
How do I split a large source file into smaller modules?

To split a large source file into smaller modules, you provide the target file path and the tool proposes a split strategy targeting 100-300 lines per new file. It then creates the files, updates imports, and verifies the build.

When should I refactor a monolithic file into separate modules?

You should refactor a monolithic file into separate modules when it becomes difficult to maintain, read, or test. Splitting large files into logically grouped components improves codebase navigability and preserves logical groupings for easier maintenance.

What is the best way to break down a large UI module without breaking imports?

The best way to break down a large UI module without breaking imports is using a deterministic protocol that proposes a split strategy, creates focused files, and automatically updates existing imports to verify the build succeeds.

How many lines of code should a refactored module contain?

A refactored module should typically contain 100-300 lines of code. This targeted file size improves readability and maintainability while preserving logical groupings within your codebase.

Can I automate refactoring a large utility library into focused files?

Yes, you can automate refactoring a large utility library into focused files. The tool applies a deterministic protocol to identify the target file, propose a split strategy, create new files, update imports, and verify the build.

Does splitting code into smaller modules affect my existing build process?

Splitting code into smaller modules integrates with your existing refactor workflows by updating imports and verifying the build. This deterministic protocol ensures the refactoring process maintains build integrity throughout the file creation and import update stages.