pr-merge
Qué hace
Esta skill guía a un mantenedor en la revisión y la fusión de aportaciones enviadas como pull requests. Está pensada para propietarios de proyectos que quieren que los colaboradores conserven su crédito.
Cuándo usarla
- ✓Cuando tienes varios pull requests abiertos de colaboradores externos para revisar y fusionar.
- ✓Cuando un pull request tiene conflictos de fusión y quieres resolverlos sin reescribir el trabajo del colaborador.
- ✓Cuando solo quieres fusionar una parte de un pull request, como un conjunto de archivos seleccionados.
Link de la skill
https://github.com/HKUDS/OpenHarness/blob/main/.claude/skills/pr-merge/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“Revisa los pull requests abiertos de nuestro repositorio y fusiona los limpios manteniendo acreditado a cada autor.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
El agente enumera los pull requests abiertos y los clasifica. Fusiona los limpios a través de GitHub para conservar el autor, y para los más difíciles fusiona en local y resuelve los conflictos en un cambio aparte.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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)
Preguntas frecuentes
¿El colaborador seguirá recibiendo el crédito?
Sí. La skill prefiere las fusiones de GitHub y establece el autor al fusionar a mano, así se conserva el crédito.
¿Reescribe el código del colaborador?
No. La skill dice que primero hay que aceptar el enfoque del colaborador y resolver después los conflictos en un commit aparte.
¿Puedo fusionar solo algunos archivos de un pull request?
Sí. La skill permite una fusión selectiva que deja fuera los archivos ya implementados en local, y pide que anotes qué se dejó fuera.
Detalles
Descripción original del 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
Popularidad
- Estrellas en GitHub
- 16 mil
- Posición en el ranking
- #10803
- Licencia
- MIT
- Actualizada
- 3/6/2026
Comentarios
- …
Skills parecidas
openclaw-update
394 milAyuda a tu agente a actualizar una Gateway de OpenClaw que ya existe, eligiendo el método de actualización que encaja con cómo se instaló y manteniendo tu sesión activa.
diagnose-gateway
394 milAyuda a tu agente a averiguar por qué falla tu Gateway de OpenClaw, revisando ajustes, canales y puertos sin cambiar nada.
crabbox-apps
394 milAyuda a tu agente a abrir y ejecutar una app en una máquina temporal en la nube y mostrar su vista en el panel lateral de tu chat.