codec-rd-eval

codec-rd-eval is a skill for Claude Code from babyworm/rtl-agent-team. It costs 46 tokens per session (3,136 once invoked), scanned A, original, MIT.

A tool for comparing video encoder configurations by measuring the trade-off between file size or bitrate and picture quality. BD-rate and BD-PSNR are standard measures for comparing these rate-distortion results.

In plain words
What is it for?
It is for building C reference encoders, running encoding tests locally or on AWS Batch, and producing per-sequence and aggregate comparison reports.
Why use it?
It replaces informal quality comparisons with repeatable measurements across sequences, quality settings, and candidate configurations.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions CLAUDE.md.

Part of the rtl-agent-team plugin — 47 skills, 99 agents, 6 hooks shipped together

Good fit It is for building C reference encoders, running encoding tests locally or on AWS Batch, and producing per-sequence and aggregate comparison reports.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/babyworm/rtl-agent-team/codec-rd-eval
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add babyworm/rtl-agent-team --skill codec-rd-eval
Clone the repo
git clone --depth 1 https://github.com/babyworm/rtl-agent-team

Made for: Claude Code.

Or install rtl-agent-team, the plugin that ships this one along with the rest of its 47 skills, 99 agents, 6 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codec-rd-eval

README.md
[![agentmods](https://agentmods.dev/badge/skills/babyworm/rtl-agent-team/codec-rd-eval/github.svg)](https://agentmods.dev/skills/babyworm/rtl-agent-team/codec-rd-eval)
Your own site
<a href="https://agentmods.dev/skills/babyworm/rtl-agent-team/codec-rd-eval"><img src="https://agentmods.dev/badge/skills/babyworm/rtl-agent-team/codec-rd-eval/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codec-rd-eval

Your own site · 80×15
<a href="https://agentmods.dev/skills/babyworm/rtl-agent-team/codec-rd-eval"><img src="https://agentmods.dev/badge/skills/babyworm/rtl-agent-team/codec-rd-eval.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,136 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.03136
Opus 5 $0.00023 $0.01568
Sonnet 5 $0.00009 $0.00627
Haiku 4.5 $0.00005 $0.00314

Measured 5d ago against content hash cbdce58625f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

codec-rd-eval scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/aws_batch_submit.py, scripts/bd_rate.py, scripts/build_encoder.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/codec-rd-eval/SKILL.md · 233 lines

How it starts

The opening of the file, as written. The whole thing — 233 lines — stays where its author put it; the contents beside it link to each section on GitHub.

This skill automates the full Rate-Distortion evaluation pipeline:

  1. Build encoder binaries from refc/*.c (C11, gcc)
  2. Run parallel encoding simulations across (sequence, QP, config) combinations
  3. Compute BD-PSNR/BD-rate using VCEG-M33 polynomial interpolation (3+ points)
  4. Generate comparison reports with per-sequence and aggregate metrics

Scope: Encoder RD evaluation only. This skill evaluates encoder quality metrics (BD-PSNR, BD-rate, optional SSIM/VMAF). For decoder conformance testing against JVET/JCTVC bitstreams, use /rtl-agent-team:codec-conformance-eval.

Phase-agnostic: While commonly used during rat-dse Step 3b, this skill can be invoked at any Phase where quantitative RD comparison of encoder configurations is needed — Phase 1 (algorithm exploration), Phase 2 (architecture validation), Phase 4 (fixed-point precision impact), or standalone evaluation outside the pipeline.

Execution modes:

  • local: ProcessPoolExecutor-based parallel encoding on local CPU cores
  • aws-batch: Optional AWS Batch spot instance submission for large-scale evaluation

Key features:

  • N-candidate comparison: Compare 2+ configurations via candidates[] array (anchor + N tests)
  • Configurable encoder CLI: encoder_cmd_template supports any encoder (HM, VTM, custom). Available variables: {encoder}, {cfg}, {input}, {width}, {height}, {fps}, {frames}, {qp}, {bitstream}, {recon}, {bit_depth}, {chroma_format}
  • Configurable output parsing: Custom regex patterns for bitrate/PSNR extraction
  • SSIM/VMAF opt-in: Additional quality metrics on explicit user request only
  • bit_depth/chroma_format aware: YUV weighting adjusts per chroma format (420/422/444)
  • 3+ QP point support: Standard 4-point (exact fit), 5+ (least-squares), 3 (quadratic fallback)

<Use_When>

  • Comparing algorithm candidates with objective quality metrics (any Phase)
  • Measuring BD-PSNR/BD-rate between anchor and modified encoder configurations
  • Evaluating fixed-point precision impact on codec quality (e.g., 12-bit vs 16-bit paths)
  • Validating that HW-friendly algorithm modifications preserve acceptable quality
  • N-way comparison of multiple encoder configurations (candidates[] mode)
  • The user explicitly says "RD eval", "BD-PSNR", "BD-rate", "codec quality", "algorithm quality evaluation" </Use_When>

<Do_Not_Use_When>

  • No ref C model encoder exists yet (build ref model first via ref-model skill)
  • Comparing RTL vs C model output (use /rtl-agent-team:rtl-model-consistency instead)
  • Running decoder conformance tests against standard bitstreams (use /rtl-agent-team:codec-conformance-eval)
  • Running RTL-level conformance against reference decoder (use /rtl-agent-team:rtl-conformance-test)
  • Non-codec designs where RD metrics don't apply </Do_Not_Use_When>

<Why_This_Exists> In codec design, algorithm selection has the highest impact on final quality and area. Theoretical complexity analysis (operations/pixel, gate estimates) provides useful guidance but cannot capture the full picture — actual RD performance on representative sequences is the definitive metric.

BD-PSNR/BD-rate (VCEG-M33) is the universally accepted method in the video coding community for comparing codec configurations. It normalizes across different operating points (QP values) to produce a single, meaningful comparison metric.

Without this skill, teams either skip quantitative RD evaluation (risking suboptimal algorithm selection) or manually set up evaluation infrastructure (time-consuming and error-prone). </Why_This_Exists>

<Execution_Policy>

  • Requires refc/*.c to exist (or user-specified encoder source path)
  • HJSON test configuration defines all evaluation parameters
  • Local execution is the default; AWS Batch is opt-in via configuration
  • Simulation results are cached at .rat/scratch/rd-eval/ for re-analysis
  • Report is generated at the path specified in test configuration (default: docs/phase-1-research/rd-eval-report.md)
  • On build failure: report error details and stop (do not proceed with stale binaries)
  • On simulation failure: report failed jobs, compute BD metrics from successful jobs with warnings
  • On metric parsing failure (bitrate=0 or PSNR=0): mark job as failed with guidance to check output_parsing
  • timeout_per_job is in seconds (default: 3600s = 1 hour per encoding job)
  • SSIM/VMAF are computed ONLY when explicitly requested via quality_metrics config
  • Dependencies: gcc (C11), Python 3.9+, numpy, hjson. Optional: ffmpeg (required for SSIM/VMAF computation when quality_metrics includes "ssim" or "vmaf"), boto3 (required only for aws-batch execution mode)
  • Self-test: python3 {plugin_root}/skills/codec-rd-eval/scripts/bd_rate.py --test runs built-in unit tests ({plugin_root} = plugin root resolved from .rat/state/spawn-context.json) </Execution_Policy>

Read the full file on GitHub · 233 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 233 lines · 46 tokens per session scan A cbdce58625f4

Subscribe to this mod's changes

codec-rd-eval is a skill published in the GitHub repository babyworm/rtl-agent-team (51 stars, last pushed 16d ago), licensed MIT. It adds 46 tokens to every session and 3,136 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

hardware-health-check

Out-of-band hardware health via Redfish BMC (read-only) — power state, component health, thermal and power readings, firmware inventory, SEL log triage. Use when determining whether a host is powered off versus unreachable, checking hardware faults, reviewing thermal or PSU state, or triaging BMC event logs.

automateyournetwork/netclaw · 67 tokens

readable-verilog-generator

Use when creating, writing, reviewing, annotating, repairing, refactoring, or validating readable Verilog RTL, including synthesizable Verilog-2001 .v files, existing-RTL analysis, semantic comment annotation, testbench scaffold planning, ASIC-quality review, local or remote Vivado/xsim validation, evidence-backed…

Eriemon/verilog-generator · 77 tokens

hardware-saas-gtm

🇺🇸 Hardware + SaaS GTM Playbook — End-to-end go-to-market for consumer hardware products with software subscription models. Covers crowdfunding engineering (Kickstarter/Indiegogo/Makuake), KOL matrix for physical products, hardware PMF validation metrics, device-as-funnel subscription design, localization entry…

Gingiris-1031/gingiris-skills · 582 tokens

step-parts

Find, evaluate, and download low-level common standard CAD parts from step.parts, such as screws, bolts, nuts, washers, bearings, standoffs, electronics parts, motors, connectors, and other off-the-shelf components. Use when Codex needs to search the hosted step.parts catalog, resolve fuzzy part names, standards…

earthtojake/step.parts · 107 tokens

system-info

A skill for checking computer hardware, system status, running processes, and available disk space.

RTGS2017/NagaAgent · 41 tokens

hdldiagzero

Generate validated SVG block diagrams for HDL/RTL/FPGA/SoC designs. Use when asked to draw, diagram, sketch, render, or visualize Verilog, SystemVerilog, VHDL, Vivado BD, or LiteX architecture. Produces JSON specs plus SVGs, color-codes clock domains, distinguishes AXI/MM/Lite/Stream and TileLink, and hides…

lcapossio/hdldiagZero · 93 tokens