Synthèse automatique
Crée une pull request GitHub pour la branche courante, fait passer les tickets Jira liés en revue et enregistre l’URL de la PR sur ces tickets.
Points forts
- Automatise le flux complet : push, création de la PR, transition Jira et liaison des tickets.
- Prend en charge plusieurs tickets Jira par branche et déduit leurs clés depuis les sujets des commits.
- Vérifie des préconditions utiles (commits de test, branche non protégée, passage de pr-check) avant de créer la PR.
- Gère les conventions Liferay : dépôts cibles, alias d’équipes et forks.
Limites
- Fortement spécifique à Liferay : dépôts, branches de base, Jira et liste d’équipes sont codés en dur.
- Dépend d’un skill pr-check externe et d’un remote/fork correctement configuré.
- Refuse la création sans commit de test, sauf justification ou changement sans code.
À utiliser lorsqu’une branche de développement Liferay est prête et que l’on veut ouvrir une PR avec mise à jour des tickets Jira associés.
À éviter pour un dépôt hors écosystème Liferay ou lorsque le flux Jira/pr-check n’est pas disponible.
Analyse de sécurité
PrudenceThe skill is a legitimate PR-creation workflow built on git and the gh CLI. It contains no destructive commands, no obfuscated payloads, no credential handling, and no data exfiltration; the temp file is created with mktemp and removed, and the body marker is passed via --body-file specifically to avoid shell history expansion. The residual risk is inherent to its purpose: it pushes code, opens PRs, and mutates Jira tickets in an external system, and it embeds environment-specific identifiers and a webhook-read hidden marker. That warrants a caution rating rather than safe, but nothing rises to risky.
- •Performs state-changing external actions without a confirmation gate: pushes the current branch to a remote, creates GitHub PRs, and transitions Jira tickets / writes custom fields (customfield_10201) via transition IDs.
- •Executes shell commands via Bash (`git`, `gh pr create`, `mktemp`, `rm` on the temp file); all are scoped and non-destructive, but `gh` performs authenticated network writes.
- •Depends on hardcoded internal identifiers (Liferay org/repo names, Jira transition IDs 61/41/71/31, custom field 10201, specific team forks) that could cause unintended actions if the file is reused outside that environment.
- •Embeds a hidden HTML-comment marker consumed by an internal webhook to set commit status/labels; mechanism is opaque to a reviewer reading the rendered PR body.
- •Uses powerful tooling for legitimate ends: `git push`, `gh pr create`, and Jira REST mutations (status transitions, customfield_10201 writes) — no destructive or exfiltrating patterns, no curl|sh, no credential handling.
- •Jira transitions are applied unconditionally to every ticket in the set (In Progress → In Review/In Peer Review) without an explicit per-action user approval step, unlike the PR body which is shown before submission.
- •The 'supersede' path can close a pre-existing pull request; it is gated on an explicit user choice, and falls back to a `ci:close` comment when permission is lacking, which is reasonable but still a write action on someone else's PR.
- •Uses `mktemp` for the PR body file and `rm`s only that temp file — no risky filesystem operations.
- •Contains no hidden instructions, obfuscated payloads, or attempts to influence the auditor; content is straightforward workflow documentation.
Exemples
Create a pull request for my current branch, pull the Jira ticket keys from the commit messages, and target the default fork./pr --skip-pr-check docs-only markdown updateOpen a PR for this branch in brianchandotcom/liferay-portal and include every Jira ticket from the commits.allowed-tools: [Bash, Glob, Grep, Read, Skill] argument-hint: "[optional target-org/repo, message hint, --skip-pr-check, or --skip-pr-reviewer <reason>]" description: Create a GitHub PR for the current branch. Use when the user asks to create a PR, send a PR, or invokes /pr. name: pr
Create a Pull Request
Create a GitHub PR for the current branch, transition the linked Jira tickets to review, and record the PR URL on those tickets.
Repository Settings
The base branch is master in liferay/liferay-portal and master-private in liferay/liferay-portal-ee. Use the base branch of the repository that a remote of this checkout points at (check git remote --verbose).
Below, ${BASE_BRANCH} stands for that base branch, and <repository> stands for that repository without its organization, such as liferay-portal.
Preconditions
-
At least one commit adds tests. When none do, ask the user for a rationale and refuse to proceed without one. The only exceptions are PRs with no code changes (e.g., language key updates or markdown changes).
-
The current branch is a development branch, not
${BASE_BRANCH}or any other protected branch. -
The
pr-checkskill must pass. Skip only when${ARGUMENTS}contains--skip-pr-check. A skip requires a reason: take it from the text following the flag when present, otherwise prompt the user for one. The reason is recorded in the PR Check section, which is written for a skip rather than omitted. When${ARGUMENTS}contains--skip-pr-reviewer, pass the flag and the text following it topr-check, which skips only its PR Reviewer validation.
Input
Branch
The current Git branch must contain the commits ready to ship.
Jira Tickets
A branch may span more than one ticket. Resolve the ticket set — every ticket the PR touches.
The ticket key follows the pattern LPD-12345, LCD-12345, LRCI-1234, and similar forms (uppercase letters, hyphen, digits).
Collect every distinct ticket key from the subjects of the branch's commits relative to ${BASE_BRANCH}. Each subject is prefixed with its ticket (LPD-12345 <subject>); extract every distinct key, in commit order (oldest first). When no commit carries a ticket, prompt the user for one.
Target Repository
The target repository defaults to <fork-owner>/<repository>. When ${ARGUMENTS} names a different org/repo, use that; when it matches an alias below, expand the alias; otherwise, ask the user to choose <fork-owner> from the teams below, leaving out any team that has no fork of <repository>:
liferay-acliferay-appsecliferay-bpmliferay-commerceliferay-content-managementliferay-core-infraliferay-database-infraliferay-devtoolsliferay-frontendliferay-headlessliferay-page-managementliferay-platform-experienceliferay-searchliferay-site-management
When the pr-check run reports that the branch sits on the forward target and ${ARGUMENTS} names no repository, use the forward target instead of asking.
The following short aliases resolve to a target repository:
brian→brianchandotcom/<repository>
The PR head is <github-username>:<branch-name> (the GitHub username is read from the user's origin remote URL — for example, git@github.com:brianchandotcom/liferay-portal.git yields brianchandotcom), and the base is ${BASE_BRANCH}.
Expected Output
Pushed Branch
Push the current branch to the user's remote when it has not been pushed yet or when new local commits exist.
Pull Request
The title is concise (under 72 characters) and prefixed with the key of the first ticket in the set:
LPD-83847 Fix OutOfMemoryError during batch engine import
The body follows this format, with one browse link per ticket in the set:
https://liferay.atlassian.net/browse/TICKET-ID-1
https://liferay.atlassian.net/browse/TICKET-ID-2
## What Is Being Fixed
Explain the problem or bug that motivated the change — what was going wrong or what was missing.
## How It Is Being Fixed
Explain the approach taken across all commits. Describe the key changes and the reasoning behind the approach. Write in plain prose rather than bullet points.
## Why Are There No Tests?
This optional section is only included when the commits do not add any tests. It should contain the rationale provided by the user.
## PR Check
<pr-check Results Summary>
<!-- pr-check {"result": "<state>", "sha": "<tested-SHA>"} -->
The PR Check section is the Results Summary block emitted by the pr-check skill that ran as the precondition — the overall state line, the tested SHA, the table of validations, and every note appended below it, since any row can carry a note, a PASS included — pasted verbatim, followed by a hidden marker. The marker is an HTML comment, invisible in rendered Markdown, whose payload is a JSON object of the form <!-- pr-check {"result": "<state>", "sha": "<tested-SHA>"} -->, where <state> is success when the overall state is PASS and failure when it is FAIL, so a run carrying NOT VERIFIED rows records success, and <tested-SHA> is the full 40-character SHA from the Results Summary. The webhook reads the result and sha fields to apply the pr-check commit status to that SHA and the pr-check - <state> label to the PR, so this skill records no status or label itself.
When build/test-plan/result.json exists and its head is the tested SHA, add a Test plan: <count> run, <passed> passed. line between the Results Summary block and the marker. Leave it out otherwise. Put a blank line before and after it. <count> is the number of entries in tests. <passed> is the number of those entries whose result is passed.
When pr-check was skipped via --skip-pr-check, still write the section, but as a skip rather than a run. Under the same ## PR Check heading, the body is a single **pr-check: SKIPPED** — <reason> line with no table, and the marker payload adds a reason field alongside result (set to skipped) and the PR head SHA. The JSON object keys are alphabetical (reason, result, sha).
**pr-check: SKIPPED** — <reason>
<!-- pr-check {"reason": "<reason>", "result": "skipped", "sha": "<head-SHA>"} -->
The webhook applies the status and label when it processes the pull_request event for the newly opened PR, so no publish step is needed at creation. Use the pr-check-publish skill only to record a later pr-check run on an existing PR.
Use a direct, to-the-point style. Avoid being verbose. Present the proposed title and body to the user before submitting, and proceed once they approve.
Create the pull request with --body-file, or with --body from a quoted-heredoc variable; either keeps the marker's literal ! off the command line, where it could otherwise trigger history expansion and corrupt the marker. Use mktemp for the file so it stays out of the working tree, and remove it afterward.
body_file=$(mktemp)
gh pr create \
--base "${BASE_BRANCH}" \
--body-file "${body_file}" \
--head <github-username>:<branch-name> \
--repo <target-org/repo> \
--title "<title>"
rm "${body_file}"
Transitioned Jira Tickets
Apply the steps below to every ticket in the ticket set, recording the outcome per ticket and continuing on failure.
For each ticket, fetch it (issue type, status, subtasks) and resolve the target ticket — the one whose status reflects active work and on which the PR URL is recorded:
| Ticket Type | Target |
| --- | --- |
| Bug (10004) | The bug itself |
| Task (10002) | Its Technical Task (10153) subtask |
| Technical Task (10153) | Itself |
When the target is not already in an in-progress status, transition it first:
| Target Type | Destination | Transition ID |
| --- | --- | --- |
| Bug | In Progress | 61 |
| Technical Task | In Progress | 41 |
Then transition it to review:
| Target Type | Destination | Transition ID |
| --- | --- | --- |
| Bug | In Review | 71 |
| Technical Task | In Peer Review | 31 |
When the review transition fails (for example, because the ticket is already in a later status), still proceed to record the PR URL.
Set the Git Pull Request field (customfield_10201) on the target ticket to the new PR URL.
Existing Pull Request
This handling applies per target ticket, while recording the PR URL above.
When the Git Pull Request field already holds one or more PR URLs, ask the user whether the new PR supersedes the existing one or is added alongside it.
When the user chooses supersede:
-
Overwrite Git Pull Request with the new PR URL, dropping the previous value.
-
Add a comment on the previous PR, linking to the new one (for example,
Superseded by <new-pr-url>.). -
Close the previous PR when possible. When the user lacks permission to close it directly, add a
ci:closecomment instead, so the CI bot closes it.
When the user chooses add:
- Append the new PR URL to the existing value, separating each URL with a comma and a space.
Summary
Report back to the user with:
- Each ticket in the set, with its resulting status and link.
- The PR URL.
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/create-a-github-pull-request-mwrc4xmv/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/create-a-github-pull-request-mwrc4xmv' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-a-github-pull-request-mwrc4xmv/download' --output '.skill-downloads/create-a-github-pull-request-mwrc4xmv/SKILL.md.part' && mv '.skill-downloads/create-a-github-pull-request-mwrc4xmv/SKILL.md.part' '.skill-downloads/create-a-github-pull-request-mwrc4xmv/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/create-a-github-pull-request-mwrc4xmv/SKILL.md' && test -s '.skill-downloads/create-a-github-pull-request-mwrc4xmv/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/create-a-github-pull-request-mwrc4xmv' '.claude/skills/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/create-a-github-pull-request-mwrc4xmv'openskills read 'create-a-github-pull-request-mwrc4xmv'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/create-a-github-pull-request-mwrc4xmv/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.
Bonnes pratiques React Hook Form
Developpement
Maîtrisez React Hook Form : évitez les anti-patterns, gérez les abonnements, et traitez correctement reset, dirty state et entrées contrôlées.
Migration Emotion vers Mantine
Developpement
Migrer les styled-components Emotion vers des composants Mantine avec style props et modules CSS. Pour convertir .styled.tsx ou supprimer les imports @emotion.
Détecteur de dérive de périmètre
Developpement
Analyse les diffs git par rapport à une intention pour détecter la dérive de périmètre, fichiers non liés et PR trop larges, puis suggère de garder, diviser ou justifier.