Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:27:04 +08:00
commit ddac736b5e
4 changed files with 223 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{
"name": "leapmultix-skill-creating-pull-requests",
"description": "Skill creating-pull-requests from LeapMultix",
"version": "1.0.0",
"author": {
"name": "Julien LE SAUX",
"email": "contact@jls42.org"
},
"skills": [
"./skills"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# leapmultix-skill-creating-pull-requests
Skill creating-pull-requests from LeapMultix

45
plugin.lock.json Normal file
View File

@@ -0,0 +1,45 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:jls42/leapmultix:leapmultix-marketplace/skills/creating-pull-requests",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "cbb792c79d843f7262e6772bf5689c37daf50da6",
"treeHash": "1040a2763cd258e9b3a0614b770fbb896ef20aeb2d03a7f7adf4f9d4c45e7904",
"generatedAt": "2025-11-28T10:19:12.317796Z",
"toolVersion": "publish_plugins.py@0.2.0"
},
"origin": {
"remote": "git@github.com:zhongweili/42plugin-data.git",
"branch": "master",
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
},
"manifest": {
"name": "leapmultix-skill-creating-pull-requests",
"description": "Skill creating-pull-requests from LeapMultix",
"version": "1.0.0"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "10f6b093e122708ea949d48d36541da9c98d2f16148233ed818cb4fe87c736f3"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "58a55fbcd45566ee4b14e702ead1ae5dac9f77c04f5d9c12ecc96577cac11876"
},
{
"path": "skills/creating-pull-requests/SKILL.md",
"sha256": "f17a8bcc223d570a852f352be91964691d1c15853dd12f7fa11befe1a36f0a84"
}
],
"dirSha256": "1040a2763cd258e9b3a0614b770fbb896ef20aeb2d03a7f7adf4f9d4c45e7904"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}

View File

@@ -0,0 +1,163 @@
---
name: creating-pull-requests
description: Creates GitHub Pull Requests with detailed descriptions generated from commits. Use when user wants to create a PR after committing changes
allowed-tools: Read, Grep, Glob, Bash
---
# PR Creator
Automatise la création de Pull Requests GitHub avec descriptions structurées.
## Table des matières
- [Quand utiliser ce Skill](#quand-utiliser-ce-skill)
- [Prérequis](#prérequis)
- [Workflow de création](#workflow-de-création)
- [Exemples de PR](#exemples-de-pr)
- [Gestion erreurs](#gestion-erreurs)
- [Checklist avant PR](#checklist-avant-pr)
- [Scripts npm utiles](#scripts-npm-utiles)
- [En cas de doute](#en-cas-de-doute)
## Quand utiliser ce Skill
- Quand l'utilisateur demande de "create a PR", "créer une PR"
- Après commits sur feature branch
- Feature terminée et prête pour review
## Prérequis
**GitHub CLI (gh) installé et configuré**
Vérifie : `gh --version` et `gh auth status`
## Workflow de création
### 1. Vérifier état branche
- Branche actuelle (pas main)
- Branche pushed vers remote
- Commits présents depuis main
### 2. Analyser les commits
Examine TOUS commits depuis main :
```bash
git log main...HEAD --oneline
git diff main...HEAD --stat
```
Identifie :
- Types (feat/fix/refactor/test/chore)
- Scopes (arcade/i18n/ui/pwa)
- Fichiers modifiés par catégorie
### 3. Générer titre PR
**Règles :**
- 1 commit → utilise message commit
- Similaires → généralise
- Mixte → "Multiple improvements (scopes)"
- Max 72 caractères
### 4. Générer description PR
**Structure :**
```markdown
## Summary
[1-4 bullet points changements clés]
## Changes
[Fichiers modifiés groupés par catégorie]
## Test Plan
- [ ] [Tests spécifiques]
- [ ] Run `npm run verify`
```
**Catégories :** arcade/, components/, core/, i18n/, tests/
### 5. Générer test plan basé sur fichiers
- Arcade → Test jeux, 60 FPS
- i18n → Test langues, `npm run i18n:compare`
- Tests → Coverage ≥ 80%
- Toujours → `npm run verify`, no console errors
### 6. Créer PR avec gh CLI
```bash
gh pr create \
--base main \
--title "type(scope): description" \
--body "$(cat <<'EOF'
## Summary
- Point 1
## Test Plan
- [ ] npm run verify
EOF
)"
```
**Options :** `--draft`, `--label`, `--reviewer`, `--assignee`, `--web`
## Exemples de PR
**1 commit feat :** `feat(arcade): implement power-up system`
**Multiple feat :** Généralise en titre synthétique
**Mixte (feat+fix+refactor) :** `Multiple improvements (arcade, ui)`
## Gestion erreurs
- Branche pas pushed → `git push -u origin $(git branch --show-current)`
- gh non auth → `gh auth login`
- PR existe → `gh pr edit` au lieu de create
- Sur main → Créer feature branch d'abord
## Checklist avant PR
- [ ] `npm run verify` passe
- [ ] `npm run i18n:compare` si i18n modifié
- [ ] Commits suivent Conventional Commits
- [ ] Branche pushed
- [ ] Pas secrets/keys
- [ ] Pas sur main
## Scripts npm utiles
```bash
npm run verify # Quality gate
npm run i18n:compare # Si i18n
git log main...HEAD # Commits
gh pr list # PRs existantes
```
## En cas de doute
**Source :** CLAUDE.md et PRs existantes (`gh pr list --state all`)
**Règles absolues :**
1. Vérifier qualité avant PR (`npm run verify`)
2. Analyser TOUS commits depuis main
3. Jamais PR depuis main
4. Jamais PR si tests échouent
5. Jamais mentionner AI
**Workflow minimal :**
```bash
npm run verify
git push -u origin $(git branch --show-current)
gh pr create --base main --title "..." --body "..."
```