Logotipo de Merge Pr

Merge Pr

Comunidad
kdy1
merge-pr

Squash-merge GitHub pull requests immediately or enable auto-merge with the default commit subject when the user explicitly invokes this skill, requests a merge, or authorizes a handoff within that scope.

Descripción general

Editorkdy1
Repositoriokdy1-scripts
Nombre de la habilidadmerge-pr
Estrellas
33
Forks
0
Archivos incluidos
3
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando la petición encaja con la habilidad.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • Archivos incluidos: 3

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por kdy1 en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Merge Pr en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/kdy1/kdy1-scripts/tree/main/skills/merge-pr
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kdy1/kdy1-scripts.git /tmp/kdy1-scripts
mkdir -p .claude/skills
cp -r /tmp/kdy1-scripts/skills/merge-pr .claude/skills/merge-pr
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Merge Pr en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición encaja con la habilidad, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Merge Pr automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Merge Pr no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición que encaja con la habilidad, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

Merge PR

Merge the requested PRs immediately when possible, or enable auto-merge, and verify each result.

Authorization

An explicit user invocation of $merge-pr is a merge request and authorizes merging the targets identified by the user's request or conversation context. This authorization includes enabling auto-merge for those targets when immediate merging is unavailable. The authorized targets include PRs returned by a selection workflow requested in the same message. Do not request confirmation again because the targets came from tool results rather than manually supplied PR numbers.

Automatic skill selection alone does not authorize merging or enabling auto-merge. A request to edit, inspect, or discuss this skill authorizes that work only. A handoff must retain the original human merge authorization and target scope.

Core Rules

  • Always use gh pr merge with --squash. Do not substitute merge commits or rebase merges.
  • Never specify --subject or its short form -t, including an empty value. Leave the commit subject to the default gh and GitHub behavior. Do not override it interactively or through another merge interface.

See the GitHub CLI merge documentation for these options.

Resolve and Merge

Use the requested PR URLs, numbers, or selection criteria with the repository context. Resolve targets from the request and conversation context, including the complete results of a requested selection workflow. Use those targets even when the checkout has a detached HEAD.

Only when the request and conversation context do not identify targets, resolve the current branch's PR with the helper:

sh
node <SKILL_DIR>/scripts/merge-pr.mjs resolve-current

Use the returned url. A lookup failure does not select another target. Ask for a target only when neither source identifies the intended PRs or when the requested scope is genuinely ambiguous. Do not ask for merge authorization again after an explicit invocation. Replace <SKILL_DIR> with this skill's absolute directory when running commands.

For an explicitly authorized workflow handoff with merge gates, honor its narrower constraints: let the caller own readiness checks, pass its verified head through --match-head-commit SHA, and pass --no-auto when auto-merge is forbidden. Either option restricts the helper to one target. Return after the single requested layer. The caller owns dependent-stack progression and stops on failure or any pending/unverified result instead of advancing to an upper PR. These constraints do not change the default direct-invocation behavior below.

Once the target is identified for a direct invocation, attempt the merge immediately. Do not preflight authentication, CI, reviews, draft status, conflicts, squash support, merge queues, or head SHAs. Let GitHub enforce its merge requirements. Do not announce plans to check readiness.

sh
node <SKILL_DIR>/scripts/merge-pr.mjs merge <PR_URL> [<PR_URL>...]

An explicit PR number can replace <PR_URL>; use the repository checkout or pass --repo [HOST/]OWNER/REPO. The helper runs gh pr merge with --squash --auto by default, omits --auto with --no-auto, and never passes a subject, administrator bypass, or branch-deletion option. It accepts no arbitrary gh options. The head option requires a full 40-character SHA. Do not fix source, change PR metadata, submit approvals, or bypass rules to make the merge succeed. Additional actions require applicable human instructions. The two core rules still apply.

For multiple directly requested PRs without dependent-stack handoff constraints, pass them in the requested order, or the supplied list order when no separate order is specified. The helper attempts them sequentially and continues after an individual failure.

Verify and Report

The helper reads the PR through REST after each attempt, even when the merge command fails. It verifies the REST merged, merged_at, merge_commit_sha, and auto_merge fields. A numeric target without --repo retains the current-repository PR lookup before that REST read. Its JSON results preserve the input target, URL, outcome, mergeCommitSha, PR state, merge command exit code and output, and verification output/error.

  • merged: GitHub confirms merged state and a merge commit SHA. Report completion with its URL and SHA.
  • queued: GitHub confirms open state and the CLI explicitly confirms queue registration. Report queued and pending.
  • auto_merge_pending: GitHub confirms open state with non-null autoMergeRequest. Report auto-merge enabled and pending.
  • unverified: State, commit SHA, or the outcome cannot be confirmed. Report the verification error and any known state.

Queue eligibility or a promise to add the PR when ready does not confirm registration. Unknown or suppressed CLI output does not establish a queued result. Pending outcomes are not completed merges. Do not block the attempt because a queue applies or add --admin to bypass it.

Exit code 1 means a merge command failed or a result is unverified; inspect every result even on that exit code. Exit code 0 can include pending outcomes. If the command fails, including when auto-merge is disabled or permissions are insufficient, report the GitHub or CLI error briefly along with any verified outcome. The helper does not retry; do not rerun it automatically or start a merge-readiness investigation. Keep the final report concise.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Son archivos de solo lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Merge Pr?

Squash-merge GitHub pull requests immediately or enable auto-merge with the default commit subject when the user explicitly invokes this skill, requests a merge, or authorizes a handoff within that scope.

¿Por qué usar Merge Pr en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Merge Pr está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Merge Pr en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/kdy1/kdy1-scripts/tree/main/skills/merge-pr. TypingMind lee el archivo SKILL.md de esa carpeta, empaqueta los archivos de la carpeta e instala el conjunto como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Merge Pr?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Merge Pr?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Merge Pr con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Merge Pr?

kdy1 la ha publicado en GitHub. Consulta el repositorio para conocer las condiciones de la licencia. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver el directorio

Crea ya tu propio espacio de trabajo con IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇