Synthèse automatique
Crée une pull request GitHub à partir des modifications indexées en générant une branche, un titre et une description, avec un brouillon par défaut.
Points forts
- Vérifie la présence de modifications indexées et avertit lorsque des changements non indexés seront exclus.
- Génère un nom de branche ou de tâche court et dérive du diff un titre et une description en s'appuyant sur le code environnant.
- Prend en charge des indications libres pour le mode brouillon ou prêt, les forks, la branche de base, le projet, le type de changement et la réutilisation de branche.
- Crée par défaut des pull requests en brouillon afin d'éviter l'assignation automatique d'un codeowner aléatoire.
Limites
- Nécessite la CLI GitHub (`gh`) authentifiée et un dépôt distant GitHub ; ne fonctionne pas avec d'autres forges.
- Seules les modifications indexées sont prises en compte ; les changements non indexés sont volontairement ignorés.
- Repose sur l'analyse de texte libre et sur les conventions du `CONTRIBUTING.md` du dépôt, ce qui peut réduire la précision si les indications sont ambiguës ou les conventions absentes.
À utiliser lorsque des modifications indexées sont prêtes à être regroupées dans une pull request GitHub et que vous voulez générer automatiquement la branche, le titre et la description.
À éviter lorsque vous devez inclure des modifications non indexées ou non commitées, ou lorsque le dépôt n'est pas hébergé sur GitHub.
Analyse de sécurité
PrudenceThe skill is a workflow wrapper around ordinary git/gh commands (diff, branch, commit, push, PR create) with no exfiltration, obfuscation, destructive filesystem operations, or safety-disabling instructions. Its power comes from pushing commits and opening PRs, which is exactly the intended function and is gated behind an explicit user confirmation. Minor concerns are unbounded memory-file reads and unquoted interpolation of user-supplied $ARGUMENTS into shell commands.
- •Skill executes state-modifying and networked commands (`git checkout -b`, `git commit`, `git push`, `gh pr create`, `gh api user`) — all legitimate for its purpose, but they do write to remotes and create PRs, so a mis-parsed instruction could push unintended code. Mitigated by an explicit confirmation gate (AskUserQuestion) before any mutating step.
- •Instructs the agent to 'read relevant memory files' without specifying paths, leaving scope for the agent to read arbitrary files it deems 'memory'; low risk but unbounded.
- •Free-form `$ARGUMENTS` are parsed heuristically (fork/reuse-branch/base/type) and injected into branch names and git/gh commands via shell; no quoting guidance is given for these interpolated values, so a crafted argument could contain shell metacharacters.
- •Performs state-modifying and external side-effect commands (git checkout -b, git commit, git push -u, gh pr create, gh api user), though these are gated behind explicit AskUserQuestion confirmation and are legitimate for the stated purpose.
- •PR title/commit message are model-generated from staged diff content and interpolated into shell commands inside double quotes (--title "<title>"), so a crafted diff could in principle inject command substitution into the title line; the HEREDOC bodies are safely quoted ('EOF') but the title is not.
- •Step 0 tells the agent to 'read relevant memory files' without specifying paths or contents, leaving the directory/files read implementation-defined; not dangerous but underspecified.
Exemples
Create a draft PR from my staged changes, base it on master, and mention that this fixes the header validation bug.Open a ready-for-review pull request for the staged refactor, push it to my fork, and use type: refactor.Ship these staged changes to GitHub with an auto-generated branch and description.name: pr description: Create a PR from staged changes with auto-generated branch, title, and description. Use this skill whenever the user wants to create a pull request, ship changes, open a PR, send code for review, or push staged work to GitHub — even if they don't explicitly say "PR". allowed-tools: Bash, Read, Grep, Glob, AskUserQuestion
Create a pull request with automatically generated title and description based on staged changes.
Before starting, read relevant memory files (especially PR-related feedback memories). Memory preferences override the defaults below.
User instructions: $ARGUMENTS
PRs are created as drafts by default (non-draft PRs auto-assign a random codeowner as reviewer, which then has to be reassigned).
If user instructions are non-empty, parse them for the following hints (they are free-form text, not structured flags):
- "ready" (or "not draft", "no-draft", "non-draft") → create the PR as ready-for-review instead of a draft
- "fork" → push to the user's own fork instead of
origin - "reuse-branch" → reuse the current branch instead of creating a new one (default is to create a new branch)
- A base branch (e.g., "base: shreyan/project/pr1", "base is master") → use as the PR base branch instead of auto-detecting
- A project name (e.g., "project is spice", "project: resharding") → use as the project instead of auto-detecting
- A change type (e.g., "type: fix", "type is refactor") → use as the change type instead of auto-detecting
- Any other text → treat as extra context to incorporate into the PR description
Follow these steps in order:
-
Validate:
- Record the current branch name
- Run
git diff --cachedto capture the staged diff. If empty, warn the user and stop - If there are unstaged changes, briefly warn the user that they won't be included in the PR
- Do NOT analyze unstaged changes
- Fetch the GitHub username by running:
gh api user --jq .login - Determine
reuse-branchand base branch:- If user instructions specify "reuse-branch", set
reuse-branch = true. - Otherwise, set
reuse-branch = false(this is the default). - Base branch: if user instructions specify a base branch, use that. If
reuse-branchis true, usemaster. Otherwise, use the current branch. - When
reuse-branchis true, use the current branch name as the branch name.
- If user instructions specify "reuse-branch", set
- Detect push remote:
- If user instructions contain "fork", determine the user's fork remote:
- List remotes:
git remote -v - Look for a remote whose URL contains the GitHub username (e.g.,
github.com/{username}/). This is the fork remote. - Record the fork remote name for later use.
- List remotes:
- If "fork" is not specified, the push remote is
origin.
- If user instructions contain "fork", determine the user's fork remote:
-
Analyze staged changes (reuse the diff output from Step 1):
- Read the modified files to understand the surrounding code context
- Identify the project/area (e.g., spice, resharding, state-sync, ci). If changes span multiple projects, pick the most dominant one. If user instructions specify a project, use that instead.
- Read the
CONTRIBUTING.md"## Pull Requests" section for valid change types and PR title conventions - Determine the change type (fix, feat, refactor, doc, test, chore, perf, revert). If multiple apply, pick the most dominant. If user instructions specify a type, use that instead.
- Generate a short hyphenated task name, 2-4 words (e.g.,
add-metrics,fix-header-validation,refactor-chunk-apply)
-
Generate all details — do NOT run any state-modifying commands (no creating branches, committing, or pushing) in this step:
- Branch name (local) and remote branch name:
- If
reuse-branchis true: the local branch name is the current branch. Skip collision checks. - Otherwise, generate a new local branch name:
- If pushing to a fork:
{project}/{task} - If pushing to origin:
{username}/{project}/{task} - Check for collisions:
git branch --list <name>(local) andgit ls-remote --heads <push-remote> <name>(remote) - On collision, append
-2,-3, etc.
- If pushing to a fork:
- Remote branch name: when pushing to origin, the remote branch must have the
{username}/prefix. If the local branch name already starts with{username}/, the remote name is the same. Otherwise, prepend it:{username}/{local-branch-name}. When pushing to a fork, the remote branch name is the same as the local branch name.
- If
- Commit message: single line, same style as the PR title
- PR title:
<type>(<project>): <title>— title must be lowercase (perCONTRIBUTING.md)- Example:
feat(state-sync): add metrics tracking
- Example:
- PR description:
- Concise summary of what changed and why. Use prose, bullet points, or a mix — whatever fits the change best. A one-line description is fine for small changes.
- Incorporate any extra context from user instructions
- Do not include implementation details, test plan sections, or AI attribution
- Draft: false if user instructions opt out via "ready" (or "not draft", "no-draft", "non-draft"), true otherwise
- Push remote: the fork remote name if "fork" was specified, otherwise
origin
- Branch name (local) and remote branch name:
-
Confirm with user:
- First, print the details in exactly this format (no horizontal rules, no extra fields):
Branch: <local-branch-name> (remote: <remote-branch-name>) Push remote: <push-remote> Base branch: <base-branch> Draft: Yes/No PR title: <title> PR description: <description> - Then use
AskUserQuestionwith two options: "Yes, create PR" / "Abort"- Do NOT put the details inside the
AskUserQuestionoptions - The user can select "Other" (built-in) to provide edits — apply their changes and re-confirm
- Do NOT put the details inside the
- If "Abort": stop immediately. Nothing was modified, so no cleanup is needed.
- First, print the details in exactly this format (no horizontal rules, no extra fields):
-
Execute — only after user confirms:
- If
reuse-branchis false, create the branch:git checkout -b <branch-name> - Commit staged changes using a HEREDOC for the message:
git commit -m "$(cat <<'EOF' <commit message> EOF )" - Push:
git push -u <push-remote> <local-branch-name>:<remote-branch-name>(If local and remote names are the same,git push -u <push-remote> <branch-name>is fine.) - Create the PR using a HEREDOC for the body:
- If pushing to a fork, use
--head <username>:<remote-branch-name>:gh pr create --base <base-branch> --head <username>:<remote-branch-name> \ --title "<title>" \ --body "$(cat <<'EOF' <description> EOF )" - If pushing to origin, use
--head <remote-branch-name>:gh pr create --base <base-branch> --head <remote-branch-name> \ --title "<title>" \ --body "$(cat <<'EOF' <description> EOF )"
--draftif the draft flag is set. - If pushing to a fork, use
- Display the PR URL on success
- If push or PR creation fails but the branch was already created locally, tell the user the branch exists and suggest how to retry
- If
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-pr-from-staged-changes-automatically-mwpwqffk/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-pr-from-staged-changes-automatically-mwpwqffk' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/create-a-pr-from-staged-changes-automatically-mwpwqffk/download' --output '.skill-downloads/create-a-pr-from-staged-changes-automatically-mwpwqffk/SKILL.md.part' && mv '.skill-downloads/create-a-pr-from-staged-changes-automatically-mwpwqffk/SKILL.md.part' '.skill-downloads/create-a-pr-from-staged-changes-automatically-mwpwqffk/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.
Outils déclarés par l’auteur (à vérifier dans votre agent) : Bash, Read, Grep, Glob, AskUserQuestion
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-pr-from-staged-changes-automatically-mwpwqffk/SKILL.md' && test -s '.skill-downloads/create-a-pr-from-staged-changes-automatically-mwpwqffk/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/pr' && cp -R '.skill-downloads/create-a-pr-from-staged-changes-automatically-mwpwqffk' '.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-pr-from-staged-changes-automatically-mwpwqffk'openskills read 'create-a-pr-from-staged-changes-automatically-mwpwqffk'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-pr-from-staged-changes-automatically-mwpwqffk/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.