# Update Pr Title Command

> Run the `platform-dev-team-common:update-pr-title` workflow from the original Claude slash command. Use when the user asks to updates PR title with auto-generated description based on commits and changes. Supports Korean and English, preserves ticket IDs.

- Skill: `datamaker-kr/update-pr-title-command` (Agent Skill)
- Install (CLI): `npx skillmds@latest add datamaker-kr/update-pr-title-command`
- Raw SKILL.md: https://api.skillmd.com/api/skills/datamaker-kr/update-pr-title-command/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: datamaker-kr (https://skillmd.com/u/datamaker-kr)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/datamaker-kr/update-pr-title-command

---


<!-- Generated by tools/generate-agent-marketplaces.py; edit the source command or agent-plugin.yaml instead. -->

# platform-dev-team-common:update-pr-title Command Workflow

## Codex Adaptation

- Treat the user request or explicitly supplied text as the command arguments.
- Use the available Codex file, search, terminal, and clarification capabilities that match the workflow.
- Do not depend on Claude-only slash command variables or tool names.

# Update PR Title Command

You will help the user update a PR title with various options using the GitHub MCP server.

## Available Options

- `--pr <number>`: Specify PR number (optional - uses current branch if not provided)
- `--lang <language>`: Title language (korean/english, default: korean)

## Examples

- `/update-pr-title --pr 123 --lang ko`: Update PR #123 with Korean title
- `/update-pr-title --lang eng`: Update current branch PR with English title
- `/update-pr-title`: Update current branch PR with Korean title (default)

## Implementation Steps

### 1. Parse Arguments

Extract options from user input:
- PR number (if provided)
- Language preference (korean/english, default: korean)

### 2. Determine PR Number

If PR number not provided:
1. Get current git branch: `git rev-parse --abbrev-ref HEAD`
2. Use GitHub MCP `search_pull_requests` or `list_pull_requests` to find PR for the branch
3. If no PR found, notify user and exit

### 3. Gather PR Information

Use GitHub MCP server tools:
- `get_pull_request`: Fetch existing PR details (current title, description, labels)
- `list_commits`: Get all commits in the PR to understand changes
- `get_file_contents`: Read key changed files to understand scope

Analyze:
- Commit messages for feature/fix patterns
- Changed file types (models, views, serializers, tests, etc.)
- Scale of changes (number of files, lines changed)

### 4. Extract Ticket ID

Check existing PR title for ticket IDs:
- JIRA format: `SYN-1234`, `PROJ-567`
- GitHub issue format: `#123`

Preserve the ticket ID in the new title.

### 5. Generate Title

Based on analysis, create a concise title:

**Korean Format** (default):
```
[Ticket-ID] <type>: <concise description>
```

**English Format**:
```
[Ticket-ID] <type>: <concise description>
```

**Type Keywords**:
- feat / 기능: New feature
- fix / 수정: Bug fix
- refactor / 리팩토링: Code restructuring
- docs / 문서: Documentation changes
- test / 테스트: Test additions/changes
- perf / 성능: Performance improvements
- chore / 작업: Build/config changes

**Guidelines**:
- Keep under 72 characters when possible
- Be specific but concise
- Use imperative mood (Add, Fix, Update, not Added, Fixed, Updated)
- Focus on WHAT changed, not HOW

**Examples**:
- Korean: `[SYN-1234] 기능: 사용자 인증 API 엔드포인트 추가`
- English: `[SYN-1234] feat: Add user authentication API endpoints`

### 6. Update PR Title

Use GitHub MCP `update_pull_request` tool:
```
update_pull_request(
    pull_number=<pr_number>,
    title="<new_title>"
)
```

### 7. Confirm Success

Report to user:
- Old title → New title
- PR URL for reference

## Error Handling

- **No PR found**: "Could not find PR for branch '<branch>'. Please specify PR number with --pr option."
- **Invalid PR number**: "PR #<number> not found in this repository."
- **MCP server unavailable**: "GitHub MCP server not available. Please ensure GITHUB_TOKEN is set and MCP server is configured."
- **Permission denied**: "Insufficient permissions to update PR. Please check your GitHub token permissions."

## Example Interaction

**User**: `/update-pr-title --lang ko`

**Assistant**:
1. Detects current branch: `feature/SYN-1234-add-auth`
2. Finds PR #156 for this branch
3. Analyzes commits:
   - "Add authentication viewset"
   - "Implement JWT token generation"
   - "Add permission classes"
4. Generates title: `[SYN-1234] 기능: 사용자 JWT 인증 시스템 구현`
5. Updates PR
6. Confirms: "✅ Updated PR #156 title: [SYN-1234] 기능: 사용자 JWT 인증 시스템 구현"

## Title Optimization Tips

- Extract ticket ID from branch name if not in title (e.g., `feature/SYN-1234-description`)
- If commits use conventional commit format, align title with primary change type
- For multi-purpose PRs, focus on the primary change
- Remove redundant words like "this PR", "changes", "updates"

## Dependencies

- GitHub MCP server configured in `.mcp.json`
- `GITHUB_TOKEN` environment variable with `repo` and `pull_requests` permissions
- Git repository with remote tracking branch

