/dejavu:dejavu-test-writerfrom dejavu
Writes or extends DejaVu recomposition assertions in Compose UI tests for Android instrumentation and KMP common tests. Covers regression coverage, counter accuracy tests, and Compose-version behavior tests.
Ships in dejavu. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Establish the intended behavior before choosing an assertion. In DejaVu itself,
inefficient samples are deliberate tracer accuracy fixtures. Preserve them,
compare counts to an independent unkeyed SideEffect, and assert that an
intentionally too-tight budget throws UnexpectedRecompositionsError. Do not
turn test writing into app optimization or weaken expectations to get green tests.
Find existing coverage with rg and inspect its host, clock and source set. When
adding coverage is authorized, augment the relevant test by default; a separate
file is useful for a different lifecycle or target. No extra confirmation is
needed just because a test exists. Preserve UI assertions, activity type and
explicit timing semantics.
Read testing.md for the API and measurement pitfalls. This reference is bundled; repository-relative examples are optional, not files assumed to exist in a consuming app.
runRecompositionTrackingUiTest { … }
with setTrackedContent on KMP.waitForIdle() can erase the condition under test.exactly, atMost, or a range from the behavior contract.
assertStable() means no recompositions after initial composition. A legitimate
update can require a nonzero count; counting state sources does not predict it.SideEffect, record its settled baseline, and compare its
delta with DejaVu. Keep keyed callback counts separate. Include a nonzero
exercise and expected budget failure to catch disabled tracking.Keep assertions, caught-error message checks and tracer lifetime inside the KMP helper body; return its result for Wasm. Let helpers restore prior tracing state. Never add nested rules to work around missing tracking.
Run the relevant actual UI test and inspect counts/failures/skips. In this repo,
JVM, iOS and Wasm UI coverage lives in commonTest; Android UI coverage is
instrumented, not :dejavu:testDebugUnitTest. Runtime changes require the repo's
cross-platform checks. Prose edits don't require a UI matrix.
New Compose APIs belong in compose-experimental until the supported floor
includes them; retain older Android BOM coverage. Diagnose mismatches against
the oracle, mapping, lifecycle and fixture contract before choosing a fix.
Report the interaction, expected counts, independent evidence and command/result. Public examples: test patterns.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dejavu, compose-ui-testing, recomposition-testing, kmp-testing
4 skills in this plugin
/dejavu-error-triageDiagnose a DejaVu UnexpectedRecompositionsError, missing tag mapping, or suspicious recomposition count from a failing Compose UI test. Use for explaining a failure or applying a bounded fix. Read-only diagnosis stays read-only; iterative performance optimization belongs to dejavu-perf-loop./dejavu-onboardingInstall DejaVu and prove recomposition tracking in an Android or Compose Multiplatform project that does not have it yet. Use for dependency, compatibility, compiler source information, test host, or first-test setup. For an already configured project, use test writing or failure triage instead./dejavu-perf-loopMeasure and reduce unnecessary recompositions in application code using DejaVu tests, preserving UI behavior and an agreed performance budget. Use when asked to optimize or iteratively tighten a recomposition budget. Do not optimize deliberate tracer accuracy fixtures or turn a diagnosis-only request into edits.npx claudepluginhub mttmcknn/dejavu --plugin dejavuOther plugins' skills for the same job