create-fix-pr

作者: launchdarkly

调查根本原因,并为报告的bug或可观测性发现提交一个最小修复的PR。

npx skills add https://github.com/launchdarkly/ai-tooling --skill create-fix-pr

Create a fix PR

Overview

You are investigating a problem and filing a pull request that resolves it. This builds on the investigate skill — do the investigation properly first, don't jump to a fix without evidence.

Use the gh CLI for all GitHub operations (auth comes from your gh login) and standard Bash / Edit / Read / Grep for everything else.

Workflow

  1. Investigate. Use the investigate skill to find the root cause. Cite the exact trace ID, log line, error group, and code location that pins the problem.
  2. Confirm there isn't already a PR open. Before filing anything, search GitHub for an existing open PR addressing the same issue — gh pr list --search "<keywords>" --state open. If one exists, direct the user to it — do not create a duplicate.
  3. Judge whether a PR is the right tool. If the fix requires a config change, a flag flip, or a change outside the code you can access, describe the solution instead of filing a PR.
  4. Get the repo. Clone it if you don't already have it locally — gh repo clone <owner>/<repo>.
  5. Check for repo conventions. Read agents.md or CLAUDE.md at the repo root — these describe repo-specific rules your fix needs to respect.
  6. Make the change. Minimal diff. Don't refactor surrounding code, don't add features, don't fix unrelated bugs you happen to notice. One PR, one fix.
  7. Set git identity before committing — see pr-conventions.md.
  8. Commit, push, and file the PR. See pr-conventions.md for branch naming and PR body rules.

What's a good fix

  • Changes the smallest possible number of lines
  • Preserves current production behavior unless the bug IS the current behavior
  • Doesn't depend on assumptions you can't verify from the evidence
  • Would pass a code-review skill's check if one existed

What isn't

  • Sweeping refactors unrelated to the reported problem
  • Speculative null checks or error handling added "while you're in there"
  • Changes to tests that hide the underlying bug
  • Bumping dependency versions to fix a symptom

Restricted tools

If gh isn't installed or gh auth status shows no auth, surface the error to the user and stop — don't try alternative auth schemes.

Never include in a PR

  • GitHub access tokens or any other secrets or credentials.
  • Debugging logs or print statements you added during investigation.

Follow the repo's own commit and PR conventions for everything else.

来自 launchdarkly 的更多技能

aiconfig-online-evals
launchdarkly
已弃用的重定向——此技能已重命名为 online-evals。请勿使用此技能,改为调用 online-evals。保留此技能仅用于旧引用…
official
launchdarkly-experiment-setup
launchdarkly
在 LaunchDarkly 中设置和运行实验。使用指标、处理方案和标志配置创建实验,开始迭代以收集数据,在设计之间切换…
official
custom-metrics
launchdarkly
为配置创建、跟踪、检索、更新和删除自定义业务指标。涵盖完整生命周期:通过API定义指标类型,通过SDK发送事件,以及…
official
projects
launchdarkly
在代码库中设置LaunchDarkly项目的指南。帮助您评估技术栈、选择正确方法,并集成项目管理,从而…
official
aiconfig-ai-metrics
launchdarkly
已弃用的重定向——此技能已重命名为built-in-metrics。请勿使用此技能,改为调用built-in-metrics。保留此技能仅用于旧引用…
official
aiconfig-projects
launchdarkly
已弃用的重定向——此技能已重命名为projects。请勿使用此技能,改用projects。保留此条目仅因旧引用指向aiconfig-projects……
official
aiconfig-migrate
launchdarkly
已弃用的重定向——此技能已重命名为migrate。请勿使用此技能,改为调用migrate。仅保留以便旧引用aiconfig-migrate仍能……
official
aiconfig-tools
launchdarkly
已弃用的重定向——此技能已重命名为tools。请勿使用此技能,改用tools。保留此条目仅为了旧引用中指向aiconfig-tools的链接仍能生效……
official