Skip to content
Development
Command

/pr-create

Create a pull request with auto-detected context

From plugin
claude-code-engineering
1.1k11 skills16 agents11 commands
Install
$ npx -y skills add huangjia2019/claude-code-engineering --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/pr-create

Context preview

What this command does when you run it.

Create a pull request with auto-detected context

Command definition

pr-create.md
description: Create a pull request with auto-detected context
argument-hint: [title] [description]
allowed-tools: Bash(git:*), Bash(gh:*)

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:

## 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
Ships withclaude-code-engineering

This repository demonstrates how to use Claude Code to do real engineering work, not just writing code. 本项目是极客时间专栏 《Claude Code 工程化实战》 的官方配套示例仓库,目标就是: 👉 把 Claude Code 从“对话式编码工具”,变成 可设计、可复用、可治理的工程系统。

Get the whole plugin, auto-invoked
Stats
1,050
Stars
0
Views
373
Forks
Active
Maintenance
JavaScript
Language
16d ago
Last commit
6mo ago
Created

Repo: huangjia2019/claude-code-engineering