write-compressor

Derive encoder state machines that exactly invert given decoder operations.

134|21|Updated Nov 12, 2025
One-click install
npx skills add https://github.com/letta-ai/skills --skill write-compressor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-compressor
Source: https://github.com/letta-ai/skills/tree/main/ai/benchmarks/letta/terminal-bench-2/trajectory-feedback/write-compressor
Command: npx skills add https://github.com/letta-ai/skills --skill write-compressor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides building encoders whose outputs are the exact inverse of a given decoder's operations, applicable to arithmetic coding and other entropy-encoding schemes.

Core Features & Use Cases

  • Derivation of encoder state machines from decoder behavior
  • Phase-wise implementation and verification
  • Side-by-side state checks to ensure perfect reversibility

Quick Start

Derive the encoder operations for a provided decoder state machine and implement the first minimal case that round-trips perfectly.

Frequently Asked Questions about write-compressor

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

FAQPage Schema
How do I design an encoder that inverts a decoder's operations?

Design encoders as exact mathematical inverses of decoders by documenting the decoder's state machine, deriving encoder operations algebraically, and verifying perfect reversibility. This ensures compatibility in arithmetic coding, entropy encoding, and compression systems through side-by-side state verification and round-trip testing.

What's the best way to verify an encoder and decoder are true inverses?

Build verification harnesses that perform end-to-end round-trip testing: encode data, then decode it, and confirm the output matches the original input. Implement side-by-side state checks during phased development to catch inverse relationship violations early.

Can I use this approach with arithmetic coding systems?

Yes. This Skill applies directly to arithmetic coders and other entropy encoders where the encoder must be the precise inverse of an existing decoder. Derive the encoder's state transitions from the decoder's documented behavior and verify through bitstream-level round-trip testing.

How do I derive encoder operations from decoder state machines?

Document the decoder's state variables and transitions, then algebraically invert each operation to construct the encoder. Implement in phases, starting with the minimal case that round-trips perfectly, then expand coverage with unit tests and robust debugging strategies.

What happens if my encoder doesn't perfectly invert the decoder?

Mismatched inverses cause bitstream decode failures or data corruption. Use side-by-side state verification to identify where encoder and decoder diverge, then refine the mathematical inverse relationship. End-to-end round-trip testing detects these failures before production use.

Do I need specific dependencies to implement encoder-decoder inversion?

This Skill has no external dependencies. You need the decoder's specification or source code, encoding theory knowledge, and a testing framework for verification. The approach works with any compression or entropy-coding system where decoder behavior is documented.