symmetry-syncer

Synchronize symmetry-related Rust file pairs using diff, rustfmt, and wc.

1|Updated Sep 5, 2021
One-click install
npx skills add https://github.com/paruma/atcoder_rust --skill symmetry-syncer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: symmetry-syncer
Source: https://github.com/paruma/atcoder_rust/tree/main/.gemini/skills/symmetry-syncer
Command: npx skills add https://github.com/paruma/atcoder_rust --skill symmetry-syncer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures the structural parity of paired, symmetry-related source files by aligning their layout and eliminating non-essential differences after edits.

Core Features & Use Cases

  • Structural synchronization: Aligns the file structures of paired implementations (e.g., ext_int.rs and neg_ext_int.rs) so they remain identical in layout.
  • Diff-guided alignment: Uses a diff-based approach to distinguish essential structural differences from styling discrepancies, and applies non-destructive synchronization.
  • Automated formatting & verification: Runs rustfmt on both files and verifies final line counts to guarantee clone-like parity.

Quick Start

After editing a symmetry-related file, follow the Symmetry Sync Flow to compare, align, format, and confirm that both files are structurally identical.

Frequently Asked Questions about symmetry-syncer

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

FAQPage Schema
How do I keep paired Rust source files structurally identical after editing one?

Synchronizing symmetric code pairs involves applying a diff-driven alignment to remove non-essential differences, running rustfmt on both files, and verifying line counts with wc to ensure structural parity across paired implementations like ext_int.rs and neg_ext_int.rs.

What is structural synchronization for paired code files?

Structural synchronization for paired code files aligns the layout of symmetry-related implementations like ext_int.rs and neg_ext_int.rs. It removes non-essential differences after edits by comparing, formatting, and verifying parity to keep paired implementations in lockstep.

Do I need rustfmt and diff to synchronize symmetry-related code pairs?

Yes, synchronizing symmetry-related code pairs requires diff, rustfmt, and wc. Diff identifies structural differences, rustfmt formats both paired files to eliminate styling discrepancies, and wc verifies final line counts to guarantee clone-like parity.

What's the best way to verify code parity between paired Rust implementations?

The best way to verify code parity between paired Rust implementations is to run rustfmt on both files and verify their final line counts with wc. This confirms structural layout matches after diff-guided alignment, guaranteeing clone-like parity across symmetric file pairs.

Why does diff show differences between paired Rust files even after formatting?

Diff shows differences between paired Rust files when essential structural edits exist on one side of the symmetry pair. Diff-guided alignment distinguishes these essential structural differences from styling discrepancies, guiding non-destructive synchronization before rustfmt formatting and line-count verification.