dkarter/dotfiles/fix-flaky-pr-pdq
Claude Code and agent skill by dkarter/dotfiles
- community
Checking that the SKILL.md file is still in the repository.
Fix a flaky test and complete the connected delivery workflow in PDQ repos: reproduce/fix, verify with repeat-until-failure, open a draft PR with low-risk labeling, wait for Elixir CI to pass, create a Linear Platform ticket labeled engineering task, update the PR title with the ticket key (for example [PLT-123]), and rerun ticket requirement checks.
Install
npx vskill@latest install dkarter/dotfiles/fix-flaky-pr-pdqSKILL.md
Fix Flaky Pr Pdq
Overview
Use this workflow when the user asks for end-to-end flaky-test remediation plus PR, CI, and ticket automation. Keep changes minimal, verify the flaky test with stress reruns, and finish with an auditable PR linked to a Linear ticket.
Guardrails
- Work only on the requested flaky test and directly related code.
- Do not revert unrelated dirty workspace changes.
- Prefer deterministic test adjustments over production-code changes unless root cause is in production logic.
- Preserve the original intent of the test. If the only stable fix changes intent/coverage, stop and report that to the user instead of forcing a rewrite.
- Use conventional commits.
- Keep the PR in draft state until requested otherwise.
Workflow
- Identify the flaky test and nearby implementation.
- Reproduce with a focused command first (single test or file).
- Run dependency setup early:
mix deps.getandpnpm install.
- Apply the minimal fix.
- Stabilize timing/race-sensitive tests with tighter control of batch sizes, delays, or assertions.
- Prefer narrowing test setup to a single record when validating a specific race path.
- Verify locally.
- Run the specific test.
- Run repeat-until-failure once for the target test (use the repo's expected iteration count, often 100).
- Capture pass/fail outcome and seeds when available.
- Commit and open draft PR.
- Before commit/push, ensure dependencies are installed:
mix deps.getandpnpm install. - Stage only relevant files.
- Create a conventional commit message focused on why the test is now stable.
- If a PR template exists under
.github/, use it when composing the PR body. - Push branch and open a draft PR with clear summary and verification.
- Prefer creating the PR with label at creation time (
--label "low risk") instead of a follow-up edit.
- Wait for CI completion.
- Poll PR checks with
ghuntil Elixir tests complete. - Ignore non-blocking checks for this workflow such as Playwright suites and preview build/deploy (
Build and Push, web preview). - Continue only when Elixir tests are successful.
- Prepare Linear MCP access, then create Linear ticket.
- Ensure MCP servers are synced first:
task ai:mcps:sync:default. - Confirm Linear MCP is connected before ticket operations.
- Team: Platform.
- Add label:
engineering task. - Save returned issue key (for example
PLT-123).
- Update the ticket with implementation status.
- Add the draft PR URL.
- Add commit SHA.
- Include the core flaky failure signal (expected
{:error, _}, got:ok) and test location. - Note the next action: rerun ticketing check after PR title is updated with issue key.
- Update PR title and rerun ticket requirement check.
- Update PR title to include the issue key suffix, for example:
fix: stabilize rbac downgrade flaky test [PLT-123]. - Wait briefly for Linear automation to post the ticket comment on the PR.
- Rerun the CI check named
Test / Ensure work is ticketed. - Confirm the check passes.
Command Patterns
- Dependency bootstrap:
mix deps.getpnpm install- MCP bootstrap:
task ai:mcps:sync:defaultopencode mcp list- Focused flaky verification:
mix test path/to/test_file.exs:LINEmix test path/to/test_file.exs:LINE --repeat-until-failure 100- PR lifecycle:
gh pr create --draft --label "low risk" --title "..." --body-file .github/pull_request_template.md(or another repo template path, when present)gh pr edit <pr-number> --add-label "low risk"gh pr checks <pr-number> --watchgh run rerun <run-id>(for rerunningTest / Ensure work is ticketedonce ticket metadata is present)- Linear lifecycle (CLI naming may vary by environment):
- Create issue via Linear MCP with Platform team +
engineering tasklabel. - Update created issue with PR URL, commit SHA, and failure context.
- Capture the created key and inject it into the PR title.
Completion Criteria
- Target flaky test is stable in repeat-until-failure run.
- Draft PR exists and has
low-risklabel. - Elixir CI is green.
- Linear Platform issue with
engineering tasklabel exists. - PR title contains the Linear key.
- Ticket requirement CI check has been rerun and passed.
Example Failure Input
Use the exact user-provided failure to anchor reproduction:
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagents/skills/fix-flaky-pr-pdq/SKILL.md
Popularity
- Repository stars
- 127
- Repository forks
- 14
- 7-day trend score
- 24
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Oct 2026, 20 days ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dkarter/dotfiles/fix-flaky-pr-pdq)