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:
- Get current git branch:
git rev-parse --abbrev-ref HEAD
- Use GitHub MCP
search_pull_requests or list_pull_requests to find PR for the branch
- 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 ''. Please specify PR number with --pr option."
- Invalid PR number: "PR # 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:
- Detects current branch:
feature/SYN-1234-add-auth
- Finds PR #156 for this branch
- Analyzes commits:
- "Add authentication viewset"
- "Implement JWT token generation"
- "Add permission classes"
- Generates title:
[SYN-1234] 기능: 사용자 JWT 인증 시스템 구현
- Updates PR
- 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
1---2name: update-pr-title-command3description: 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.4---56<!-- Generated by tools/generate-agent-marketplaces.py; edit the source command or agent-plugin.yaml instead. -->78# platform-dev-team-common:update-pr-title Command Workflow910## Codex Adaptation1112- Treat the user request or explicitly supplied text as the command arguments.13- Use the available Codex file, search, terminal, and clarification capabilities that match the workflow.14- Do not depend on Claude-only slash command variables or tool names.1516# Update PR Title Command1718You will help the user update a PR title with various options using the GitHub MCP server.1920## Available Options2122- `--pr <number>`: Specify PR number (optional - uses current branch if not provided)23- `--lang <language>`: Title language (korean/english, default: korean)2425## Examples2627- `/update-pr-title --pr 123 --lang ko`: Update PR #123 with Korean title28- `/update-pr-title --lang eng`: Update current branch PR with English title29- `/update-pr-title`: Update current branch PR with Korean title (default)3031## Implementation Steps3233### 1. Parse Arguments3435Extract options from user input:36- PR number (if provided)37- Language preference (korean/english, default: korean)3839### 2. Determine PR Number4041If PR number not provided:421. Get current git branch: `git rev-parse --abbrev-ref HEAD`432. Use GitHub MCP `search_pull_requests` or `list_pull_requests` to find PR for the branch443. If no PR found, notify user and exit4546### 3. Gather PR Information4748Use GitHub MCP server tools:49- `get_pull_request`: Fetch existing PR details (current title, description, labels)50- `list_commits`: Get all commits in the PR to understand changes51- `get_file_contents`: Read key changed files to understand scope5253Analyze:54- Commit messages for feature/fix patterns55- Changed file types (models, views, serializers, tests, etc.)56- Scale of changes (number of files, lines changed)5758### 4. Extract Ticket ID5960Check existing PR title for ticket IDs:61- JIRA format: `SYN-1234`, `PROJ-567`62- GitHub issue format: `#123`6364Preserve the ticket ID in the new title.6566### 5. Generate Title6768Based on analysis, create a concise title:6970**Korean Format** (default):71```72[Ticket-ID] <type>: <concise description>73```7475**English Format**:76```77[Ticket-ID] <type>: <concise description>78```7980**Type Keywords**:81- feat / 기능: New feature82- fix / 수정: Bug fix83- refactor / 리팩토링: Code restructuring84- docs / 문서: Documentation changes85- test / 테스트: Test additions/changes86- perf / 성능: Performance improvements87- chore / 작업: Build/config changes8889**Guidelines**:90- Keep under 72 characters when possible91- Be specific but concise92- Use imperative mood (Add, Fix, Update, not Added, Fixed, Updated)93- Focus on WHAT changed, not HOW9495**Examples**:96- Korean: `[SYN-1234] 기능: 사용자 인증 API 엔드포인트 추가`97- English: `[SYN-1234] feat: Add user authentication API endpoints`9899### 6. Update PR Title100101Use GitHub MCP `update_pull_request` tool:102```103update_pull_request(104 pull_number=<pr_number>,105 title="<new_title>"106)107```108109### 7. Confirm Success110111Report to user:112- Old title → New title113- PR URL for reference114115## Error Handling116117- **No PR found**: "Could not find PR for branch '<branch>'. Please specify PR number with --pr option."118- **Invalid PR number**: "PR #<number> not found in this repository."119- **MCP server unavailable**: "GitHub MCP server not available. Please ensure GITHUB_TOKEN is set and MCP server is configured."120- **Permission denied**: "Insufficient permissions to update PR. Please check your GitHub token permissions."121122## Example Interaction123124**User**: `/update-pr-title --lang ko`125126**Assistant**:1271. Detects current branch: `feature/SYN-1234-add-auth`1282. Finds PR #156 for this branch1293. Analyzes commits:130 - "Add authentication viewset"131 - "Implement JWT token generation"132 - "Add permission classes"1334. Generates title: `[SYN-1234] 기능: 사용자 JWT 인증 시스템 구현`1345. Updates PR1356. Confirms: "✅ Updated PR #156 title: [SYN-1234] 기능: 사용자 JWT 인증 시스템 구현"136137## Title Optimization Tips138139- Extract ticket ID from branch name if not in title (e.g., `feature/SYN-1234-description`)140- If commits use conventional commit format, align title with primary change type141- For multi-purpose PRs, focus on the primary change142- Remove redundant words like "this PR", "changes", "updates"143144## Dependencies145146- GitHub MCP server configured in `.mcp.json`147- `GITHUB_TOKEN` environment variable with `repo` and `pull_requests` permissions148- Git repository with remote tracking branch