fix-flaky-pr-pdq
БесплатноБез исполняемых скриптовНе проверен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…
от dkarter★ 130 звёзд на GitHubОб этом скилле
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.
- Before commit/push, ensure dependencies are installed:
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.
- Poll PR checks with
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).
- Ensure MCP servers are synced first:
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.
- Update PR title to include the issue key suffix, for example:
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.
- Create issue via Linear MCP with Platform team +
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:
1) test run_rbac_downgrade/1 returns an error if none of the permissions are updated (Houston.RolesTest)
lib/houston/roles_test.exs:487
match (=) failed
code: assert {:error, _} = Task.await(task)
left: {:error, _}
right: :ok
stacktrace:
lib/houston/roles_test.exs:514: (test)
Установить fix-flaky-pr-pdq в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл fix-flaky-pr-pdq?
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.
Как установить скилл fix-flaky-pr-pdq?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fix-flaky-pr-pdq запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic