Synthèse automatique
Automatise l'ouverture d'une pull request depuis la branche courante vers `main` : création de branche si besoin, plan de version Nx, commit, push et rédaction du corps de la PR.
Points forts
- Déroule tout le flux sans demander de confirmation, ce qui limite les allers-retours
- Vérifie l'existence d'un plan de version Nx et le crée par paquet affecté avant de pousser
- Comportement idempotent : détecte un plan de version ou une PR déjà existants et s'arrête
- Rédige une description centrée sur le « pourquoi » et des étapes de test concrètes dérivées du diff
Limites
- Suppose des conventions propres au dépôt : préfixe de branche `DLS-<numéro>`, répertoire `.nx/version-plans/`, skill `release-plan` disponible
- Ne couvre pas la gestion des conflits, des rebases ou de l'assignation de reviewers
- Le corps de la PR est écrit dans un fichier temporaire fixe `/tmp/pr-body.md`, ce qui peut entrer en collision avec d'autres exécutions
À utiliser quand vous êtes sur une branche de fonctionnalité et demandez explicitement l'ouverture ou la création d'une PR vers `main`.
À éviter sur un dépôt qui ne suit pas les conventions Nx/`main` de ce projet, ou si vous voulez relire et ajuster manuellement le message de commit avant qu'il soit créé.
Analyse de sécurité
PrudenceThe skill automates a legitimate development workflow (commit, push, create PR) but involves powerful actions like staging all changes, pushing to remote, and creating a PR without confirmation. It does not perform destructive or exfiltration actions, so it is not risky, but the automatic commit and push warrant caution.
- •Automatically stages all changes with `git add -A` and commits without confirmation, which could unintentionally commit sensitive or unrelated files.
- •Pushes to the remote and creates a PR automatically, which can expose changes publicly without a final review.
- •Uses GitHub CLI and git commands even though no allowed-tools are declared.
Exemples
Open a PR from this branch to main.Commit my uncommitted changes, push, and create the pull request with a description and testing steps.I'm on main with uncommitted changes — ticket DLS-1423 — create a branch and open the PR to main.name: open-pr
description: >-
Open a PR from the current branch to main: commit if needed, ensure an Nx
version plan exists, push, and create the PR with a filled-in description and
testing steps. Run only when the user explicitly asks to open/create a PR.
disable-model-invocation: true
open-pr
Open a PR from the current branch to main. Commit if needed, push, then create the PR with a filled-in description and testing steps.
Important: Do NOT ask for confirmation at any step. Run the entire flow automatically from start to finish. Only stop and ask the user if something fails or if the branch is main and you need a branch name.
Step 0: Ensure we are on a feature branch
Run git branch --show-current to check the current branch.
- If already on a feature branch: skip to Step 1
- If on
main: Ask the user for a Jira ticket number, generate a descriptive branch name from uncommitted changes, then create and switch toDLS-<number>-<branch-name>:git checkout -b DLS-<number>-<branch-name>
Step 1: Ensure an Nx version plan exists
Run:
git diff main...HEAD --name-only -- .nx/version-plans/
- If the output is non-empty, a version plan already exists — skip to Step 2.
- Otherwise, create one. The rules — path→package mapping, always-
patch, one file per affected package, filename convention — live in therelease-planskill; follow them. In short: look at the changed paths (git diff main...HEAD --name-only), and create one.nx/version-plans/version-plan-<timestamp>-<pkg>.mdper affected package with single-packagepatchfrontmatter, using a description line that matches the PR title / commit message style.
Step 2: Create a commit if needed
-
If
git statusshows nothing to commit, skip to Step 3. -
If
git statusshows uncommitted changes (staged or unstaged):- Summarise the diff in one short sentence.
- Generate a conventional commit message (e.g.
feat(select): add custom trigger support). - Run immediately without asking for confirmation:
git add -A git commit -m "Your generated message"
Step 3: Push the branch
Push the branch to the remote (or update it if already pushed):
git push -u origin HEAD
Step 4: Check for an existing PR
Run:
gh pr view --json url
- If a PR already exists, print the existing PR URL and stop.
- Otherwise, continue to Step 5.
Step 5: Prepare PR body
-
Generate the PR body using the following structure:
## Description <!-- Focus on WHY the change is being made — the motivation, problem, or goal. Briefly mention what was done only to give context for the why. If the change is UI-related, remind to add screenshots. --> ## How to test <!-- Add concrete testing steps derived from the changed code. e.g. which screen to open, what to tap, what to expect. Must be specific enough for a reviewer to follow. --> ## Screenshots <!-- Before/after screenshots if UI change, otherwise N/A --> -
Fill in the template:
- Description: Analyse the diff against
main(git diff main...HEAD). Write a description focused on why the change is being made. Briefly mention what was done to give context. - How to test: Derive concrete, specific testing steps from the changed code (e.g. which screen to open, what to interact with, what to expect).
- Screenshots: If the change is UI-related, add "Add before/after screenshots here"; otherwise write "N/A".
- Description: Analyse the diff against
-
Save the body to
/tmp/pr-body.md.
Step 6: Create the PR with GitHub CLI
-
Generate a PR title using a conventional commit message. Format:
<prefix>(<scope>): <summary>. Pick the most appropriate prefix:feat— new feature or user-facing additionfix— bug fixrefactor— code restructuring without behaviour changechore— maintenance, dependency updates, CI changesdocs— documentation onlytest— adding or updating testsstyle— formatting, whitespace, etc.
Include an optional scope in parentheses when it helps clarify the area (e.g.
feat(select): ...,fix(button): ...). The title should be a concise, human-readable summary. -
Run:
gh pr create --title "<generated title>" --base main --body-file /tmp/pr-body.mdIf
ghis not installed or not authenticated, tell the user to install the GitHub CLI and rungh auth login, then rerun the command. -
Output the PR link. After the PR is created, print a clickable link to the PR URL.
-
Clean up by deleting
/tmp/pr-body.md.
Summary
- Ensure we are on a feature branch (create one if on
main). - Ensure an Nx version plan exists in
.nx/version-plans/— create one if missing, based on affected packages and change type. - If there are uncommitted changes, create a commit with a clear conventional message.
- Push the branch to the remote.
- Check if a PR already exists — if so, skip creation and print the URL.
- Build the PR body with Description (why), How to test (concrete steps), and Screenshots.
- Run
gh pr create --base main --body-file /tmp/pr-body.mdand output a clickable link to the created PR. - Delete the temporary body file.
Du fichier au premier essai
Le téléchargement contient exactement le contenu affiché sur cette fiche. Cette copie peut différer de la dernière version du dépôt source.
Consulter la source et ses fichiers annexesCe téléchargement contient uniquement SKILL.md. Les scripts, références, modèles et dépendances éventuels ne sont pas inclus. Récupérez les fichiers nécessaires depuis la source en conservant leur arborescence avant de poursuivre.
1. Télécharger le fichier
Télécharger SKILL.mdDepuis la racine d’un projet de test, enregistrez le fichier sous .skill-downloads/open-a-pull-request-from-current-branch-mu26hank/SKILL.md, ou utilisez la commande suivante. Ce dossier sert à examiner la skill avant son installation.
Commande pour macOS/Linux ou WSL : un shell POSIX et curl sont nécessaires. Sous Windows sans WSL, utilisez le bouton de téléchargement et créez le dossier manuellement.
mkdir -p '.skill-downloads/open-a-pull-request-from-current-branch-mu26hank' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/open-a-pull-request-from-current-branch-mu26hank/download' --output '.skill-downloads/open-a-pull-request-from-current-branch-mu26hank/SKILL.md.part' && mv '.skill-downloads/open-a-pull-request-from-current-branch-mu26hank/SKILL.md.part' '.skill-downloads/open-a-pull-request-from-current-branch-mu26hank/SKILL.md'2. Vérifier les prérequis
Lisez SKILL.md avant de l’utiliser. Si le fichier cite des scripts ou services externes, examinez-les et préparez les accès nécessaires dans votre environnement de test.
Aucune section de prérequis reconnue dans ce fichier. Cela ne signifie pas qu’il est autonome : les bibliothèques, outils et accès peuvent être cités ailleurs dans le contenu ou dans le dépôt source.
Les plateformes de la fiche sont des indications du catalogue. Les chemins ci-dessous suivent la documentation des outils ; ils ne prouvent pas que cette skill y a été exécutée. Aucune version minimale de ces outils n’est attestée pour cette fiche.
3. Charger la skill
Après vérification, copiez le dossier complet dans le projet avec l’une des commandes ci-dessous, puis ouvrez une nouvelle session de l’outil. La commande s’arrête si un dossier du même nom existe déjà : comparez les fichiers avant de le remplacer.
Claude Code
test -f '.skill-downloads/open-a-pull-request-from-current-branch-mu26hank/SKILL.md' && test -s '.skill-downloads/open-a-pull-request-from-current-branch-mu26hank/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/open-pr' && cp -R '.skill-downloads/open-a-pull-request-from-current-branch-mu26hank' '.claude/skills/open-pr'OpenSkills
OpenSkills doit déjà être installé. La procédure locale install/read est contrôlée avec OpenSkills 1.5.0, qui exige Node.js ≥ 20.6.0. Aucun slug du catalogue n’est résolu automatiquement.
Installation officielle d’OpenSkillsopenskills install './.skill-downloads/open-a-pull-request-from-current-branch-mu26hank'openskills read 'open-a-pull-request-from-current-branch-mu26hank'La lecture doit afficher le contenu du fichier installé et son dossier de base. Elle ne lance ni la skill ni ses dépendances.
Pour un agent qui lit AGENTS.md, synchronisez ensuite l’index. Cette commande modifie AGENTS.md : relisez le diff avant de l’utiliser.
openskills syncMode manuel ou autre outil : joignez SKILL.md à une conversation, ou ouvrez-le dans un agent capable de lire les fichiers. Ajoutez les ressources annexes nécessaires. Il n’existe pas de dossier universel reconnu par tous les outils.
4. Faire un premier essai
Utilisez une entrée courte et fictive : un endpoint d’API, un petit document ou un brief d’interface. Dans une nouvelle conversation, joignez le fichier ou donnez son chemin à l’agent, puis adaptez cette demande :
Lis .skill-downloads/open-a-pull-request-from-current-branch-mu26hank/SKILL.md et applique ses instructions à cet exemple : [décrire une entrée de test]. Indique les fichiers, dépendances ou accès qui manquent. Produis le résultat demandé par la skill sans inventer de données ni exécuter de script non examiné.Résultat attendu : une sortie correspondant aux instructions de la skill, ou une liste précise des prérequis manquants. Une simple confirmation de lecture ne valide pas le premier usage. Si une ressource externe est indisponible, ce parcours reste à tester.
Configurer un canal de discussion avec SecretRefs
DevOps
Configurez des canaux de discussion avec des commandes non interactives, les secrets étant uniquement des SecretRefs. Couvre les étapes de collecte, modification, réparation et vérification.
Enquêter sur les échecs CI de ClickHouse
DevOps
Investigue un échec CI de ClickHouse de bout en bout à partir d'une URL de PR ou de rapport S3. Récupère les tests échoués, classe flaky vs vraie régression, et cherche des issues/fixes existants.
Revue de PR Ansible
DevOps
Examine une PR Ansible selon le processus standardisé du projet, incluant la validation des changelogs, la couverture de tests et le suivi des commentaires.