Claude Code plugin with a flaky test patterns skill, plus Trunk commands that explain and fix flaky tests from your CI history.

How it works

Foe: Flaky Wisp, a failing or flaky test.

Foes

  • Flaky Wisp

Party · Context

  • SentinelYour agent100/100
  1. Flaky Wisp

    The Flaky Wisp blocks the way.

    What really happensIt stands for a failing or flaky test.

    Sentinel: Context 100/100.

  2. Flicker

    The Flaky Wisp uses Flicker.

    What really happensA flaky test passes on one run and fails on the next.

    Sentinel takes 8. Sentinel: Context 92/100.

  3. Trunk Flaky Tests

    The hero equips the Trunk relic when a test starts to flicker.

    What really happensThe flaky-test-patterns skill loads when you debug failing tests, write new ones, or mention flaky tests.

    Flaky Wisp takes 14.

  4. Trunk Flaky Tests

    It sorts the Flaky Wisp's tricks into known kinds.

    What really happensThe skill matches symptoms to causes: sleeps and races, clocks and timezones, shared state, real network calls, fixed ports and float precision.

    Flaky Wisp takes 11.

  5. Flicker

    The Flaky Wisp uses Flicker.

    Sentinel takes 8. Sentinel: Context 84/100.

  6. Trunk Flaky Tests

    Each trick meets its counter: patient waits, frozen clocks, fresh fixtures.

    What really happensIt applies the listed fixes, such as polling for a condition instead of sleeping, injecting a clock, isolating test data and using port 0.

    Flaky Wisp takes 27.

  7. Trunk Flaky Tests

    Linked to Trunk, the relic reads how often the wisp struck before.

    What really happensWith a Trunk account, /trunk:why-flaky asks the Trunk MCP server for the root cause and failure pattern without changing code.

    Flaky Wisp takes 25.

  8. Trunk Flaky Tests

    The fix lands and the wisp stops blocking the party.

    What really happens/trunk:fix-flaky shows Trunk's root cause and suggested fix, applies it if you agree, then suggests rerunning the test.

    Flaky Wisp takes 23. Flaky Wisp falls.

  9. Victory

    The Flaky Wisp falls.

Learn this spell

Claude Code

claude plugin marketplace add anthropics/claude-plugins-community
claude plugin install trunk@claude-community

Notes

The /trunk:fix-flaky, /trunk:why-flaky and /trunk:setup-uploads commands call the Trunk MCP server, which needs a Trunk account (OAuth sign in) and test results uploaded from CI. Without that, only the flaky-test-patterns skill helps: it maps symptoms such as sleeps, clock use, shared state, real network calls and fixed ports to fixes. In a sealed trial arena the MCP part cannot connect, and its .mcp.json means trials need --allow-hazards. A trunk-ci-setup skill covers CI upload config.

This spell has no recorded sessions in the curator's logs. Tried it? Send a spell report.