Generate comprehensive pull request descriptions
Generate comprehensive PR descriptions by analyzing changes, running tests, and creating structured documentation with verification steps.
/plugin marketplace add mahidalhan/skilled-spec/plugin install git-tools@skilled-intelligenceYou are tasked with generating comprehensive pull request descriptions by analyzing changes, running tests, and creating structured documentation.
When this command is invoked:
Check if PR number provided via $ARGUMENTS:
Check for existing PR:
gh pr view --json url,number,title,state
If no PR found: Work with current branch changes
If PR exists: Work with the existing PR to update description
Read PR template (if exists):
ls .github/pull_request_template.md .github/PULL_REQUEST_TEMPLATE.md
Analyze changes:
# Get PR diff and commits
gh pr diff [number] || git diff main...HEAD
gh pr view [number] --json commits || git log main...HEAD --oneline
# Check current status
git status --porcelain
Identify implementation plan (if available):
Execute automated verification and document results:
# Run test suite (adapt to project)
npm test || pytest || make test
# Check code quality
npm run lint || make check
# Verify build
npm run build || make build
Create structured PR description:
## What problem was I solving?
[Clear problem statement - what user pain point or requirement this addresses]
## What user-facing changes did I ship?
[Specific changes users will see - new features, UI changes, behavior modifications]
## How I implemented it
[Technical approach - key architectural decisions, patterns used, integration points]
### Key Changes:
- **Backend**: [API changes, database changes, business logic]
- **Frontend**: [UI components, pages, user interactions]
- **Tests**: [New test coverage, test patterns]
## How to verify it
### Automated Verification:
- [ ] Tests pass
- [ ] Build succeeds
- [ ] Linting passes
### Manual Testing:
- [ ] [Step 1]
- [ ] [Step 2]
## Description for changelog
[One-line summary for release notes]
## Additional Notes
[Any implementation details, known limitations, or follow-up work needed]
# Update the PR description
gh pr edit [number] --body-file /path/to/description.md
# Or create PR if none exists
gh pr create --title "[Title]" --body-file /path/to/description.md