Workflow de développement

VérifiéSûr

Fournit des commandes et workflows pour créer des branches (fetch, détection de la branche par défaut, nommage kebab-case) et gérer les retours de revue de code (récupération des commentaires en attente, correction et réponse avec référence au SHA de commit). Particulièrement utile pour standardiser les pratiques de branche et accélérer le traitement des feedbacks sur les PRs GitHub.

Spar Skills Guide Bot
DeveloppementIntermédiaire
13002/06/2026
Claude CodeCopilot
#branching#github#pr-management#review-feedback#git-workflow

Recommandé pour

Notre avis

Ce skill automatise les tâches de développement courantes : création de branches, gestion des pull requests et réponse aux retours de revue de code via GitHub CLI.

Points forts

  • Automatise le workflow de création de branches avec nommage cohérent basé sur la tâche
  • Facilite la récupération et le traitement par lots des commentaires de revue non résolus
  • Génère des réponses concises aux réviseurs en incluant le SHA du commit de correction
  • S'adapte aux conventions de préfixes de branches du dépôt (feature/, fix/, username/)

Limites

  • Nécessite GitHub CLI (gh) et git installés et configurés
  • Ne couvre pas les workflows de merge ou rebase après approbation
  • Dépend de la structure exacte de l'API GitHub (les champs JSON peuvent varier entre versions)
Quand l'utiliser

Idéal pour les développeurs qui veulent accélérer les tâches répétitives de gestion de branches et de revue de code sur GitHub.

Quand l'éviter

Évitez si vous utilisez une plateforme de gestion de code autre que GitHub (GitLab, Bitbucket) ou si vous préférez des interfaces graphiques.

Analyse de sécurité

Sûr
Score qualité85/100

Skill uses standard git and GitHub CLI commands for branching and PR review feedback, with no destructive or exfiltrating actions. All operations are legitimate development tasks.

Aucun point d'attention détecté

Exemples

Create a new branch for a feature
Create a new branch for adding two-factor authentication. Use the standard naming convention from the repo.
Address PR review comments
Address the pending review comments on PR #42. Fetch them, make fixes, and reply to each reviewer with the commit SHA.
Batch process review feedback
Get all unresolved review comments on PR #269 grouped by file, then fix the issues and reply accordingly.

name: dev description: Development workflow for this repository. Run make help to see available targets.

dev

Development workflow utilities for branching, PR management, and review feedback.

Creating branches

Create a new branch off the latest default branch commit.

Workflow

  1. Fetch latest from remote
  2. Detect default branch (main or master)
  3. Create branch with descriptive name based on task
  4. Switch to new branch

Branch naming

Generate a short, kebab-case name from the task:

  • add-user-auth not add-user-authentication-feature
  • fix-login-bug not fix-the-bug-in-the-login-flow
  • refactor-api not refactor-api-endpoints-for-better-performance

Use a prefix if the repo convention requires one (check existing branches).

# Fetch and get default branch
git fetch origin
git remote show origin | sed -n '/HEAD branch/s/.*: //p'

# Create branch from latest default branch
git checkout -b <branch-name> origin/main

# See existing branch naming patterns
git branch -r | head -20

If branches use prefixes like feature/, fix/, or username prefixes like wcm/, follow that pattern.

Review feedback

Address GitHub PR review comments and reply to reviewers.

Workflow

  1. Get pending review comments - fetch unresolved comments
  2. Address each comment - make code changes to resolve feedback
  3. Commit with clear message - reference what feedback was addressed
  4. Reply to reviewer - concise reply with commit SHA and explanation

Getting review comments

# All comments on a PR (includes replies)
gh pr view <pr-number> --comments --json comments

# Review comments (code-level feedback)
gh api repos/{owner}/{repo}/pulls/{pr}/comments --jq '.[] | {id, path, line, body, user: .user.login, in_reply_to_id}'

# Pending/unresolved comments (no replies yet)
gh api repos/{owner}/{repo}/pulls/{pr}/comments --jq '[.[] | select(.in_reply_to_id == null)] | .[] | {id, path, body: .body[0:100]}'

Replying to comments

# Reply to a review comment
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
  --method POST \
  -f body="Fixed in abc1234 - renamed to run-test.js" \
  -F in_reply_to=<comment-id>

Good reply format

Replies should be:

  • Concise - one sentence is often enough
  • Reference commit SHA - so reviewer can verify
  • Explain how - brief description of the fix

Examples:

  • Fixed in abc1234 - renamed to run-test.js as suggested
  • Addressed in def5678 - now uses a single rule in cook.mk
  • Good catch, fixed in 789abcd - removed the duplicate import

Complete example

# 1. Get pending comments on PR #269
gh api repos/whilp/world/pulls/269/comments \
  --jq '.[] | select(.in_reply_to_id == null) | {id, path, body}'

# Output:
# {"id":2702089939,"path":"lib/appscript/run-tests.js","body":"run-tests.js should be run-test.js..."}

# 2. Make the fix and commit
git mv lib/appscript/run-tests.js lib/appscript/run-test.js
git commit -m "appscript: rename run-tests.js to run-test.js"
# Commit SHA: abc1234

# 3. Reply to the comment
gh api repos/whilp/world/pulls/269/comments \
  --method POST \
  -f body="Fixed in abc1234 - renamed to run-test.js" \
  -F in_reply_to=2702089939

Batch processing

For multiple comments:

# Get all pending comments as JSON
gh api repos/{owner}/{repo}/pulls/{pr}/comments \
  --jq '[.[] | select(.in_reply_to_id == null)] | group_by(.path) | .[] | {path: .[0].path, comments: [.[] | {id, body}]}'

This groups comments by file for efficient processing.

Skills similaires