valdi-pr-review

Reviews Valdi pull requests for regression risk, gating, thread safety, and platform parity.

16.4k|541|Updated Nov 6, 2025
One-click install
npx skills add https://github.com/Snapchat/Valdi --skill valdi-pr-review
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: valdi-pr-review
Source: https://github.com/Snapchat/Valdi/tree/main/ai-skills/skills/valdi-pr-review
Command: npx skills add https://github.com/Snapchat/Valdi --skill valdi-pr-review

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reviewing changes to a cross-platform UI framework like Valdi requires more than correctness checks: ungated code paths, per-frame allocations, JNI roundtrip costs, and JS-to-native thread races can regress every existing consumer while still passing CI. This Skill applies a framework maintainer's review lens so those risks are surfaced before merge.

Core Features & Use Cases

  • Lint and format pre-gate: Discovers the repo's configured linter and formatter from AGENTS.md, package.json, or CI config, runs them on changed files, and reports failures as blocking findings.
  • Gating and blast-radius analysis: Flags ungated changes in shared or hot code paths and weights findings by whether they touch the runtime, scoped modules, or developer tooling.
  • Native platform checks: Covers C++ JS-engine boundaries, Android onDraw and JNI predicate costs, and iOS main-thread and retain-cycle pitfalls, plus cross-platform parity and resource lifecycle checks.
  • Use Case: When reviewing a PR that adds an attributed-text animation check inside Android onDraw, the Skill flags the O(N JNI) per-frame predicate cost and recommends caching the result at bind time behind a feature gate.

Quick Start

Review this Valdi pull request for regression risk, gating, thread safety, performance, and platform parity, and report findings with snake_case categories.

Frequently Asked Questions about valdi-pr-review

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

FAQPage Schema
How do I review a Valdi pull request for regression risk?

Check whether new or changed code runs for existing consumers without a gate such as a feature flag or null check. Then weight findings by blast radius: runtime and renderer changes carry the highest bar, while developer tooling carries the lowest.

What should I check when reviewing Android onDraw changes in Valdi?

Flag attributed-text predicates like hasAnimationTransform() called per frame, since they cost O(N) JNI crossings. The result should be computed once at bind time and cached, and per-frame allocations or tree walks should be flagged.

Why do green JVM tests not guarantee Android performance safety?

JVM and Robolectric tests cannot measure JNI roundtrip cost, real onDraw frame time, native allocation pressure, or low-end-device behavior. Perf-critical Android changes need a feature flag as the practical safety net.

Does this review approach replace normal correctness review?

No, it complements correctness review rather than replacing it. It adds a regression, gating, and performance lens specific to framework code, and deliberately avoids style, naming, or organization feedback.

What thread safety issues should I look for in Valdi iOS code?

Flag @synchronized combined with synchronous dispatch to another thread, which is a known deadlock pattern. Also check for auto& captures in ObjC++ blocks that fail to retain, and missing isKindOfClass: checks before casts.