reshard-c4-data

Reshard large file collections into hierarchical shards with per-directory limits.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/bianhaifeng789-hue/openclaw-config --skill reshard-c4-data-bianhaifeng789-hue
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reshard-c4-data
Source: https://github.com/bianhaifeng789-hue/openclaw-config/tree/main/skills/tb2/reshard-c4-data
Command: npx skills add https://github.com/bianhaifeng789-hue/openclaw-config --skill reshard-c4-data-bianhaifeng789-hue

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill explains how to reorganize large file collections into hierarchical shards so that every directory in the output tree respects maximum item counts and file size limits, enabling scalable storage and reliable reconstruction.

Core Features & Use Cases

  • Hierarchical constraint planning: Calculate shards, groups, and nesting depth required when a per-directory item limit applies recursively to root, intermediate, and leaf directories.
  • File splitting and distribution: Guidance for splitting oversized files into chunks, evenly distributing files/chunks across shards, and tracking mappings.
  • Integrity and reconstruction: Generate .metadata.json with original path mappings, chunk order, and checksums to enable round-trip reconstruction and verification.
  • Use Case: Redistribute a 10k-file dataset into shards with a 30-item-per-directory cap by computing required shard and group counts, splitting oversized files, and producing verification metadata.

Quick Start

Use the resharding guidance to split oversized files, compute the required shard/group nesting, distribute files to meet per-directory limits, and emit reconstruction metadata with checksums.

Frequently Asked Questions about reshard-c4-data

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

FAQPage Schema
How do I reorganize a large dataset to comply with per-directory item and file-size limits?

To reorganize datasets into constraint-compliant shards, you calculate required shard and group nesting, split oversized files into chunks, and distribute them across a hierarchical directory tree. This ensures every root, intermediate, and leaf directory respects maximum item counts.

What is hierarchical data sharding and when do I need it for storage workflows?

Hierarchical data sharding is the process of splitting large file collections into nested directories to satisfy recursive per-directory item limits. You need it for scalable storage or distribution workflows where every directory level must comply with strict item and file-size constraints.

How do I split oversized files and track chunk mappings during data partitioning?

To split oversized files during data partitioning, you divide them into chunks and evenly distribute those chunks across computed shards. You track the chunk mappings and original path relationships by generating a metadata file for later reconstruction.

How are checksums and reconstruction metadata generated for resharded file collections?

Checksums and reconstruction metadata are generated by emitting a .metadata.json file alongside the resharded output. This file records original path mappings, chunk order, and checksums to enable round-trip reconstruction and verify data integrity across all directories.

Can I redistribute a 10,000-file dataset with a 30-item-per-directory cap?

Yes, you can redistribute a 10k-file dataset with a 30-item-per-directory cap by computing the required shard and group counts, splitting any oversized files, and distributing the items to meet per-directory limits while producing verification metadata.

What are the limitations of recursive directory constraints when planning nested shards?

The limitation of recursive directory constraints is that they require calculating exact shard, group, and nesting depth for root, intermediate, and leaf directories. Failing to split oversized files or validate item counts will break compliance and prevent accurate reconstruction.