pr-merge
O que ela faz
Esta skill orienta um mantenedor na revisão e no merge de contribuições enviadas como pull requests. É para donos de projetos que querem que os contribuidores mantenham o crédito.
Quando usar
- ✓Quando você tem vários pull requests abertos de contribuidores externos para revisar e fazer merge.
- ✓Quando um pull request tem conflitos de merge e você quer resolvê-los sem reescrever o trabalho do contribuidor.
- ✓Quando você só quer fazer merge de parte de um pull request, como um conjunto selecionado de arquivos.
Link da skill
https://github.com/HKUDS/OpenHarness/blob/main/.claude/skills/pr-merge/SKILL.mdCopie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.
Como usar
O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.
Mensagem pronta para colar
Para Claude Code, Codex ou Cursor: rode na pasta do projeto e a skill fica instalada.
Baixe o SKILL.md e coloque na pasta de skills do seu agente.
Exemplo do que pedir para a IA
“Por favor, revise os pull requests abertos do nosso repositório e faça merge dos que estão limpos, mantendo cada autor creditado.”
5 skills novas por semana. 1 minuto de leitura.
Como funciona
O agente lista os pull requests abertos e os ordena. Faz merge dos limpos pelo GitHub, para que o autor seja mantido, e para os mais difíceis faz o merge localmente e corrige os conflitos em uma mudança separada.
Conteúdo técnico (SKILL.md original)
Texto original do autor, em inglês, direto do GitHub.
PR Merge — Contributor-First Pull Request Integration
Merge external pull requests while maximizing original author attribution. Core principle: merge first, resolve conflicts after — never rewrite a contributor's work from scratch.
Core Principles
- Preserve authorship — use
gh pr merge --squashfor clean PRs. For manual merges, use--author="Name <email>". - Merge first, fix after — accept the PR's approach even if it differs from local style. Fix conflicts in a separate commit.
- Selective merge is OK — exclude files with
--excludewhen a PR contains features already implemented locally. Document what was excluded. - Never
git apply+ self-commit — this loses author attribution entirely.
Workflow
1. Triage Open PRs
gh pr list --repo OWNER/REPO --state open \
--json number,title,author,additions,deletions,mergeable
Classify each PR: merge directly, merge with conflict resolution, selective merge, or close.
2. Merge Clean PRs via GitHub
Prefer gh pr merge — preserves author automatically:
gh pr merge NUMBER --repo OWNER/REPO --squash \
--subject "feat: description (#NUMBER)"
3. Handle Conflicting PRs Locally
git fetch origin pull/NUMBER/head:pr-NUMBER
git merge pr-NUMBER --no-edit
# Resolve conflicts keeping both sides where possible
git add -A && git commit --no-edit
4. Selective Merge (Skip Some Files)
When a PR contains features already implemented locally:
gh pr diff NUMBER --repo OWNER/REPO | \
git apply --exclude='path/to/skip.py' --exclude='CHANGELOG.md'
git commit --author="Author Name <author@email>" \
-m "feat: description (#NUMBER)
Cherry-picked from PR #NUMBER. Excluded: file.py (already implemented)."
5. Close Duplicate/Superseded PRs
gh pr close NUMBER --repo OWNER/REPO \
--comment "Fixed via PR #OTHER. Thank you for the contribution!"
6. Post-Merge Verification
python -m ruff check src/ tests/ # lint
python -m pytest tests/ -q # unit tests
git push origin main # push
Then run harness-eval for end-to-end verification on an unfamiliar codebase.
Attribution Checklist
Before pushing a merged PR:
- Original author appears in
git log(via--authoror GitHub squash merge) - Commit message references PR number (
#NUMBER) - If selectively merged, commit body explains exclusions
- Closed PRs have a comment thanking the contributor
- Duplicate PRs acknowledge the contributor's investigation
Common Pitfalls
git apply+ self-commit loses author- Rewriting from scratch instead of merging — merge their code, fix style after
- Force-pushing main after merge — may remove contributor commits
- Forgetting CHANGELOG conflicts — always exclude and handle manually
- Not testing after merge — clean merge doesn't mean working code
Additional Resources
Reference Files
references/merge-scenarios.md— Detailed examples for each merge scenario (clean, conflicting, selective, duplicate)
Perguntas frequentes
O contribuidor continua recebendo o crédito?
Sim. A skill prefere merges pelo GitHub e define o autor ao fazer o merge manualmente, para que o crédito seja mantido.
Ele reescreve o código do contribuidor?
Não. A skill diz para aceitar primeiro a abordagem do contribuidor e corrigir os conflitos depois, em um commit separado.
Posso fazer merge de só alguns arquivos de um pull request?
Sim. A skill permite um merge seletivo que deixa de fora os arquivos já implementados localmente, e pede que você registre o que ficou de fora.
Detalhes
Descrição original do autor
This skill should be used when the user asks to "merge a PR", "review and merge pull requests", "integrate external contributions", "handle PR conflicts", "cherry-pick from a PR", or needs to merge GitHub PRs while maximizing contributor attribution.
repo: HKUDS/OpenHarness
Popularidade
- Estrelas no GitHub
- 16 mil
- Posição no ranking
- #10803
- Licença
- MIT
- Atualizada em
- 03/06/2026
Comentários
- …
Skills parecidas
openclaw-update
394 milAjuda seu agente a atualizar um OpenClaw Gateway existente, escolhendo o método que combina com a instalação e mantendo sua sessão funcionando.
diagnose-gateway
394 milAjuda seu agente a descobrir por que seu OpenClaw Gateway está falhando, verificando configurações, canais e portas sem alterar nada.
crabbox-apps
394 milAjuda seu agente a abrir e executar um app em uma máquina temporária na nuvem e depois mostrar a visualização dele no painel lateral do seu chat.