一键导入
pr-to-green
Bring a pull request to green by syncing with main, resolving conflicts safely, and fixing failing checks with CausalPy conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Bring a pull request to green by syncing with main, resolving conflicts safely, and fixing failing checks with CausalPy conventions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Review CausalPy pull requests end-to-end by classifying PR type, checking branch freshness, mergeability, remote CI, correctness, security, tests, docs, and maintainer concerns. Use when asked to review a PR, assess a branch before merge, summarize PR risks, or request changes.
Turn issues into PRs, handle commits, and run prek checks consistently.
Create, evaluate, and triage GitHub issues for CausalPy. Use when filing a bug, proposing an enhancement, analyzing existing issues, or splitting large work into parent-child sub-issues.
Choose the appropriate CausalPy experiment class from a causal or impact question, data structure, treatment assignment, and identification assumptions. Use before writing analysis code when the method is not yet settled, including plain-English questions about whether a campaign, policy, or intervention worked.
Explore unfamiliar APIs, libraries, or implementation behavior with minimal reproducible examples and documented findings. Use when implementation details are unclear and can be resolved by reading docs, inspecting code, and running focused experiments.
Detect, configure, and use a conda-compatible tool. Use before tasks that need the project environment, such as importing project code, running tests, building docs, or invoking repo tooling.
| name | pr-to-green |
| description | Bring a pull request to green by syncing with main, resolving conflicts safely, and fixing failing checks with CausalPy conventions. |
This skill provides a deterministic maintainer workflow for taking an in-flight PR branch to green.
main and needs sync/rebase$CONDA_EXE run -n CausalPy <command>If the user provides a PR number (for example PR #724), do this first:
gh pr view <number> to get title, state, head branch, base branch, mergeability, and check summary.gh pr checks <number> to get per-check pass/fail/pending status.gh pr checkout <number> (preferred) so local branch tracks the PR head.main).Triage and early exit
Sync branch with base
git fetch upstream then git rebase upstream/<base-branch> (or maintainer-preferred merge strategy).Fix failing checks with smallest valid change
causalpy/tests/ if behavior changes.Re-run checks in escalating scope
prek run --all-files before final handoff.Push and verify remote
git push).gh pr checks <number> until they complete or a timeout is reached.Prepare maintainer-ready status update
Use subagents (via the Task tool) when work is noisy, broad, or high-risk. Each subagent runs in its own context window and returns a condensed result.
ci-failure-investigatorTrigger when CI logs are long/noisy, failures span multiple jobs, or failure family is unclear.
Handoff (include in Task prompt):
gh run view outputmerge-conflict-analystTrigger when rebase/merge produces non-trivial conflicts, intent differs across branches, or conflict count is high.
Handoff (include in Task prompt):
git diff --name-only --diff-filter=U) and key conflict markers/snippetsDo not auto-resolve and continue silently when conflicts are highly complex. Instead, stop and request maintainer input with a brief report.
Escalate by default when:
.ipynb conflicts are messy (overlapping cell content plus metadata/output churn)Escalation report must include:
Do not keep patching silently when greening a PR turns into broader compatibility work outside the PR's feature surface. Stop after root-cause identification and ask the maintainer whether to continue in the PR or split the work into a separate branch/PR from main.
Escalate by default when:
Scope-drift report must include:
pytest tests in causalpy/tests/sample_kwargs