Create Fix Pr

作者 launchdarkly2fc544d3140fApache-2.026 个星标收录于 2026年10月8日更新于 2026年10月8日仓库昨天更新

Investigates a root cause and files a minimal fix PR for a reported bug or observability finding.

AI 生成的概览

调查已报告的缺陷或可观测性问题,并在 GitHub 上提交最小修复的拉取请求。

功能
该技能引导智能体调查已报告的缺陷或可观测性问题以确定根本原因,然后提交最小修复的拉取请求。它使用 GitHub CLI 克隆仓库、检查是否已有重复的 PR 并创建 PR,同时遵循 agents.md 或 CLAUDE.md 等仓库特定约定。它还说明了什么算作好的修复、什么不算,并列出绝不应出现在 PR 中的内容。
适用场景
当已报告缺陷或可观测性问题,并需要以拉取请求形式提出代码修复时使用。它适用于根本原因位于可访问代码中且适合最小差异修改的情况。它不适用于需要配置更改、开关切换或可访问代码之外更改的修复,这类情况应改为描述解决方案。
运行要求
需要 git 和已通过身份验证登录的 GitHub CLI(gh),以及 Bash、Edit、Read 和 Grep 工具。它配合 investigate 技能使用,并读取 agents.md 或 CLAUDE.md 等仓库约定文件。它不附带脚本,但引用 pr-conventions.md 文档。

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/ai-tooling位于skills/observability/create-fix-pr提交2fc544d

许可证: Apache-2.0

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架