pr-create
The pr-create command automates pull request creation by capturing the current Git branch context, recent commits, and changed files, then generates a PR with auto-detected title and description if not explicitly provided. Use this when you need to quickly create a pull request without manually gathering branch information or writing PR descriptions from scratch.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/huangjia2019/claude-code-engineering/HEAD/05-Commands/projects/02-advanced-commands/.claude/commands/pr-create.md -o ~/.claude/commands/pr-create.mdpr-create.md
Create a pull request. Title: $1 Description: $2 ## Current Context (Auto-detected) Current branch: !`git branch --show-current` Recent commits on this branch: !`git log origin/main..HEAD --oneline 2>/dev/null || echo "No commits ahead of main"` Files changed: !`git diff --stat origin/main 2>/dev/null || git diff --stat HEAD~3` ## Steps 1. Ensure we're not on main/master branch 2. Push current branch to remote (if not already) 3. Create PR using `gh pr create`: - Title: $1 (or auto-generate from branch name) - Body: $2 (or auto-generate from commits) 4. Return the PR URL ## PR Body Template If $2 is not provided, generate: ```markdown ## Summary [Auto-generated from commit messages] ## Changes [List of changed files with brief descriptions] ## Testing - [ ] Tests pass locally - [ ] Manual testing completed --- Created with `/pr-create` ``` ## Output ``` ✓ PR Created: [URL] Title: [title] Branch: [branch] → main Changes: [n] files ```
Deep analysis of code against project standards
API design patterns and conventions for this project. Covers RESTful URL naming, response format standards, error handling, and authentication requirements. Use when writing or reviewing API endpoints, designing new APIs, or making decisions about request/response formats.
Generate comprehensive API documentation by scanning Express route files.
Generate API documentation from code. Use when the user wants to document APIs, create API reference, generate endpoint documentation, or needs help with OpenAPI/Swagger specs.
Explore and analyze API-related code. Use when investigating endpoints, routing, or HTTP handling.
Generate API endpoint documentation from Express route files. Use when the user asks to generate, update, or review API docs for Express.js routes.
Explore and analyze authentication-related code. Use when investigating auth flows, session management, or security.
Analyze root cause of bugs after location is identified. Second step in bug investigation.