JavaScript is disabled. Some features may not work.
dev-team-pr — Install Guide | SkillsNav
🇺🇸 English🇨🇳 中文
SkillsNav
Home

dev-team-pr

readmeSafeIntermediateClaude

How to Install

Claude Code:
git clone --depth 1 https://github.com/fredericboyer/dev-team.git && cp dev-team/templates/skills/dev-team-pr ~/.claude/skills/dev-team-pr -r
--- name: dev-team-pr description: Create a well-formatted PR from the current branch using project config. disable-model-invocation: false --- Create a PR: $ARGUMENTS ## Setup 1. Parse any flags: - `--draft` — override config to create as draft PR - `--no-label` — skip auto-labeling even if enabled in config 2. Read PR config from `.dev-team/config.json` under the `pr` key: ```json { "pr": { "titleFormat": "conventional", "linkKeyword": "Closes", "draft": false, "template": ["summary", "testPlan"], "autoLabel": true } } ``` If the `pr` key is absent, use these defaults: - `titleFormat`: `"conventional"` - `linkKeyword`: `"Closes"` - `draft`: `false` - `template`: `["summary", "testPlan"]` - `autoLabel`: `true` ## Platform detection Before issuing any `gh` commands, check `.dev-team/config.json` for the `platform` field. If the project specifies a non-GitHub platform (e.g., `"gitlab"`, `"bitbucket"`), adapt PR commands accordingly — use `glab` for GitLab, the Bitbucket API, or the appropriate CLI for the configured platform. If `platform` is absent, default to `"github"`. The steps below assume GitHub. ## Step 1: Determine branch and issue context 1. Get the current branch name: ```bash git rev-parse --abbrev-ref HEAD ``` 2. Extract the issue number from the branch name. Branch naming follows `(feat|fix|chore)/-`: ```bash echo "$branch" | sed -n 's|^[^/]*/\([0-9]*\)-.*|\1|p' ``` 3. If an issue number was extracted, fetch the issue title for use in PR title formatting: ```bash gh issue view --json title --jq .title ``` 4. Verify the branch is pushed to remote: ```bash git ls-remote --heads origin "$branch" ``` If not pushed, push it: ```bash git push -u origin "$branch" ``` ## Step 2: Format the PR title Format the title based on the `titleFormat` config value: - **`conventional`** — Derive the type prefix from the branch prefix: - `feat/` -> `feat: ` - `fix/` -> `fix: ` - `chore/` -> `chore: ` - `docs/` -> `docs: ` - If the branch prefix is not recognized, use the description as-is. - **`plain`** — Use the issue title directly (or the branch description if no issue). - **`issue-prefix`** — `#: `. If no issue number, fall back to `plain`. The description portion comes from the issue title (if available) or from the branch name with hyphens converted to spaces. ## Step 3: Build the PR body Construct the PR body with the sections specified in the `template` array, in order. Each section maps to a heading and placeholder content: - **`summary`** -> ``` ## Summary <1-3 bullet points summarizing the changes> ``` - **`testPlan`** -> ``` ## Test plan ``` - **`breakingChanges`** -> ``` ## Breaking changes ``` - **`migration`** -> ``` ## Migration guide ``` Populate each section with actual content by examining the diff: ```bash git diff main...HEAD --stat git log main..HEAD --oneline ``` Append the issue link at the end of the body using the configured `linkKeyword`: ``` # ``` If no issue number was extracted, omit the issue link line. ## Step 4: Determine labels If `autoLabel` is `true` (and `--no-label` was not passed): 1. Derive label from the branch prefix: - `feat/` -> `enhancement` - `fix/` -> `bug` - `docs/` -> `documentation` - `chore/` -> `chore` 2. Verify the label exists on the repository before applying: ```bash gh label list --json name --jq '.[].name' ``` Only apply labels that already exist. Do not create new labels. ## Step 5: Create the PR Build the `gh pr create` command: ```bash gh pr create \ --title "" \ --body "" \ [--draft] \ [--label "

Details

Category Docs → readme
Sourcefredericboyer/dev-team
SKILL.mdView on GitHub →
Repo StarsN/A
Est. per SkillN/A (shared across 15 skills from this repo)
DifficultyIntermediate
Risk LevelSafe

Related Skills

Works Well With

Skills from the same repository — often designed to work together