opción

Realiza un commit, envía los cambios y abre una solicitud de incorporación de cambios. Úsalo cuando te pidan que envíes o abras una solicitud de incorporación de cambios, o en procesos relacionados únicamente con la descripción de la solicitud, como redactar, reescribir o describir el cuerpo de la misma.

...Expandir todo
14
Tiempo actualizado 26 de agosto de 2026

Acerca de ce-commit-push-pr

Realiza commits, envía cambios y abre una solicitud de incorporación de cambios con una descripción adaptativa y centrada en el valor, cuya profundidad varía en función del tamaño del cambio. Se activa con solicitudes como «realizar un commit y una solicitud de incorporación de cambios», «publicar esto», «crear una solicitud de incorporación de cambios» o «abrir una solicitud de incorporación de cambios», y también gestiona flujos que solo incluyen la descripción, como «redactar la descripción de una solicitud de incorporación de cambios» o «reescribir el cuerpo de la solicitud de incorporación de cambios» sin realizar un commit ni un push. Define tres modos: solo descripción (ejecuta únicamente el paso de la descripción y muestra el resultado), actualización de la descripción (actualiza el cuerpo de una solicitud de incorporación de cambios abierta existente y la aplica mediante «gh pr edit») y el flujo de trabajo completo (ejecuta todos los pasos en orden). Cuando necesita preguntar algo al usuario, utiliza la herramienta de preguntas bloqueantes de la plataforma con un sistema de respaldo de chat.

El flujo de trabajo recopila el contexto de Git —estado, diferencias del árbol de trabajo, rama actual, confirmaciones recientes, la rama remota predeterminada y cualquier PR existente— utilizando secciones prellenadas en Claude Code o un comando de contexto alternativo proporcionado en otro lugar. El paso 1 determina el estado de la rama y de la solicitud de incorporación de cambios (PR) y dirige el proceso según la situación: si el HEAD está desvinculado, se solicita crear una rama de características; si se está en la rama predeterminada con trabajo, se crea automáticamente una rama de características (ya que no se admite enviar directamente la rama predeterminada); si se está en la rama predeterminada sin trabajo, el proceso se detiene; y si se está en una rama de características, este continúa. El paso 2 determina las convenciones, ajustándose al estilo del repositorio y utilizando por defecto las confirmaciones convencionales; en caso de ambigüedad, da prioridad a «fix:» sobre «feat:» y reserva «feat:» para capacidades realmente nuevas.

El paso 3 realiza el commit y el push: consulta una guía de creación de ramas cuando se encuentra en la rama predeterminada, agrupa los archivos modificados en un máximo de dos o tres commits lógicos a nivel de archivo (evitando git add -p, git add -A o git add ., que pueden incluir archivos .env y artefactos de compilación) y realiza el push con git push -u origin HEAD. El paso 4 redacta el título y el cuerpo leyendo íntegramente una referencia obligatoria sobre cómo escribir la descripción de una solicitud de incorporación de cambios (PR) y tomando una decisión sobre las pruebas —incorporando los artefactos proporcionados por el usuario bajo los encabezados «Demo», Capturas de pantalla o Evidencia, preguntando al usuario si desea aportar evidencia cuando no la haya facilitado, y omitiendo la evidencia para los cambios no observables —aunque se incluye una nota de validación concisa para el comportamiento observable—. El paso 5 aplica y genera el informe, creando una nueva solicitud de incorporación de cambios (PR) con «gh pr create» o actualizando una ya existente con «gh pr edit», previsualizando el título y el cuerpo antes de aplicar la actualización y escribiendo el cuerpo en un archivo temporal.

Preguntas frecuentes

¿Qué modos admite esta habilidad?

Tres: solo descripción (simplemente escribe e imprime la descripción de una PR), actualización de la descripción (reescribe el cuerpo de una PR abierta existente y la aplica) y el flujo de trabajo completo que realiza el commit, el push y abre o actualiza una PR.

¿Qué ocurre si la ejecuto mientras estoy en la rama predeterminada?

Si hay trabajo pendiente, crea automáticamente una rama de características, ya que no se admite el push directo de la rama predeterminada. Si no hay trabajo, lo indica y se detiene.

¿Cómo decide entre «fix:» y «feat:» para los commits convencionales?

Se ajusta al estilo del repositorio y, por defecto, utiliza commits convencionales, dando prioridad a «fix:» sobre «feat:» en caso de ambigüedad, ya que añadir código para subsanar un comportamiento defectuoso o ausente es una corrección. «feat:» se reserva para capacidades genuinamente nuevas.

¿Por qué evita «git add -A» y «git add .»?

Porque esas comandos incluyen archivos como .env, artefactos de compilación y archivos generados. Prepara archivos específicos y agrupa los cambios en un máximo de dos o tres commits lógicos a nivel de archivo.

¿Cómo se gestionan las pruebas en la descripción de la solicitud de incorporación de cambios (PR)?

Los artefactos proporcionados por el usuario se incorporan bajo los encabezados «Demo», «Capturas de pantalla» o «Evidencia»; si el usuario desea aportar evidencia pero no la ha proporcionado, la habilidad se lo solicita; y los cambios no observables omiten la evidencia, incluyéndose una nota de validación para el comportamiento observable.

Todos los archivos

3archivosSKILL.md8,6KBBirreferencias/pr-description-writing.md7,2KBBirreferencias/branch-creation.md1,8 KBBir
Ver en GitHub

Asking the user: use the host's blocking question tool — AskUserQuestion in Claude Code (ToolSearch select:AskUserQuestion first if unloaded), request_user_input in Codex, ask_question in Antigravity (agy), ask_user in Pi (needs the pi-ask-user extension). Fall back to the chat surface only when no blocking tool exists or the call errors, never because a schema load is required, and never silently skip the question.

Mode

  • Description-only — the user wants just a description ("write/draft a PR description", "describe this PR", a pasted PR URL or number). Run Step 4 only and print it. Apply it only if asked. Pass any pasted PR ref so Pre-A resolves the range.
  • Description update — refresh or rewrite an existing PR's description, with no commit or push intent. Resolve PR presence by the Context rule below: an exit-0 [] is "no open PR" (report it and stop), and a non-zero exit is unknown (resolve auth or connectivity, then stop until presence is known). With an open PR, run Step 4 in PR mode on that URL, then Step 5 to preview, confirm, and apply via gh pr edit.
  • Full workflow — otherwise: Steps 1-5. Enter Stack mode instead when intent or preference wants a stack.

mode:pipeline modifier, set by orchestrated callers such as lfg. Run the resolved mode non-interactively and suppress every blocking ask; each takes the conservative default: no existing-PR rewrite, the branch kept, an unresolvable base stopping rather than guessed, and a description-update preview applied directly, since that invocation is the apply intent. Pipeline stack mode uses only the intent and scope on the invocation and passes posture into the handoff.

Stack mode (opt-in)

Opt-in only. Enter it when intent or standing preference wants a multi-PR stack. An explicit stack request is required intent — do not re-read it as a single PR with a custom --base. Do not proactively suggest PR stacks. When the user did not ask for one, refuse nonsense stacks (one logical change, artificial slices) and stay single-PR.

In stack mode, load references/stack-submit.md before Step 3 and follow only its probing, topology, and retrospective construction; that layer-by-layer commit flow replaces ordinary Step 3. Do not submit there. Step 5 owns submission, the gh stack CLI dependency and residuals, and the handoff posture: posture:stack-ready by default, posture:stack-land only on explicit land intent, from the bottom open non-draft PR. Do not add posture: to this skill's argument-hint.

Context

Read references/context.md before Step 1. It owns the command table, the exit-code meanings, the fork and detached-HEAD traps, and the branch and PR resolution Steps 1-2 use. Two of its rules belong here too. Never ask whether to branch: a detached HEAD, or the default branch with work on it, creates one, and the default branch with no work reports and stops. And with conventional commits, default to fix: over feat: when ambiguous, unless the user overrides.

Three rules govern the run.

Every git and gh probe is its own argv-form call, gathering and re-verification alike, and its exit status is control flow. The reference gives the reason and names the two compound recipes this skill pins.

Probe output is a snapshot. Re-verify branch, remote, and PR state right before each consequential action: Step 3's push, Step 5's create.

Only an exit-0 [] from a query against the base repo means "no open PR." A non-zero exit is unknown, never "none". On a fork checkout, target the base with -R and pass the branch name only, since --head <owner>:<branch> silently returns []. With results, do not blindly take index 0: match head owner and branch, and stop on an ambiguous match. Note the URL and body from that entry — Step 5 routes on the URL, Step 4 rewrites the existing body.

Artifact Root

Resolve <root> once when archival is on: it writes an explainer under <root>/explainers/.

Resolve the CE artifact root <root> before composing any artifact path.

  • Read docs_root from <repo-root>/.compound-engineering/config.yaml only (<repo-root> = git rev-parse --show-toplevel). Do not read it from config.local.yaml. Unset -> <root> is docs, exactly as before.
  • Validate a set value: a repo-relative directory whose real, symlink-resolved path stays inside the repo and is neither the repo root nor under .git/. Otherwise stop with an error naming docs_root and the value -- never fall back to docs.
  • Use <root> as the sole artifact location: create it if absent, compose each path as <root>/<subdir> with this skill's own subdirectory, and never also read docs.

Step 3: Commit and push

Read references/commit-and-push.md for branch creation, commit grouping, the message and staging shapes, and the push. Branching off the default branch is the fragile case — stale local base, unpushed commits on it, colliding uncommitted changes — and references/branch-creation.md owns that flow. If the stack reference already committed retrospective layers, skip to Step 4; gh stack submit pushes in Step 5.

Two rules bound this step. Never git add -A or git add . — name the files, so .env, build, and generated files cannot ride along, and pass that same path list to git commit, so nothing staged earlier is swept in. Honor exclude:<paths>: those files stay uncommitted and the report says so.

Step 4: Compose the PR title and body

You MUST read references/pr-description-writing.md in full — it owns the title and body content rules, including the rule to preserve an existing Related: / Fixes on rewrite. Then read references/compose.md for the gates before composition: the evidence decision; the teaching gate, where pr_teaching_section defaults on, pr_teaching_archive defaults off, and only an active (non-commented) key changes either; and the branding gate, where branding is off unless this invocation carries branding:on or the user asks for Compound Engineering branding in this prompt.

If Step 1 found an existing PR, pass its URL to Step 4 so PR mode fetches the existing body.

Step 5: Apply and report

Read references/apply-and-handoff.md for the apply routes, preview-before-edit, archival, and handoff. Two rules bound the external writes. Re-run the existing-PR check right before gh pr create and route on it: a matching PR takes the existing-PR path, exit-0 [] creates, non-zero blocks. And pass the body via --body-file <path>, never stdin — gh exits 0 with an empty body.

The completion gate is here. In an interactive full workflow, or in mode:pipeline when this run submitted a stack, a reported PR URL, a stack submit, or new commits on an open PR leave this run not done until ce-babysit-pr owns follow-on for that PR. Reporting the PR URL alone is not success.

The only skips are babysit:off, a standing auto_babysit: false in CE config, and that reference's do-not-fire cases, drafts among them. No other watch substitutes: not ci-watcher, not gh pr checks --watch, not a hand-rolled poll, not "later". If ce-babysit-pr cannot be loaded or started, stop and report it blocked.

Todos los archivos

0 archivos

Instalar ce-commit-push-pr

Descarga y descomprime los archivos de habilidades en tu directorio .claude/skills/.

Descargar ZIP

Clona el repositorio y copia los archivos de la habilidad a tu proyecto.

git clone https://github.com/EveryInc/compound-engineering-plugin/blob/main/skills/ce-commit-push-pr/SKILL.md # Copy SKILL.md to your .claude/skills/ directory

Copiar Copiar
Configuración rápida: Copia la carpeta de la habilidad en .claude/skills/. Claude la detectará automáticamente y la utilizará.

Habilidades relacionadas

github-project-management
Tiempo actualizado 29 de junio de 2026
using-git-worktrees
Tiempo actualizado 29 de junio de 2026
readme-blueprint-generator
Tiempo actualizado 5 de julio de 2026
finishing-a-development-branch
Tiempo actualizado 29 de junio de 2026
OR