create-pr
Automated PR workflow: analyze code changes, auto-generate Issue/PR descriptions, auto-commit with DCO sign-off, auto-push, auto-create Issue + PR, and link PR to Issue.
How do I install this agent skill?
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill create-prIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides a suite of tools for automating the creation of Issues and Pull Requests on platforms like GitHub and GitLab. It implements secure token management and uses standard git commands for repository analysis. No malicious patterns or security vulnerabilities were identified.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
- Runlayerwarn
7/7 files flagged
What does this agent skill do?
Create PR Skill v7.0.0
Platform-agnostic automated PR workflow:
- Analyze code changes and detect logic changes (functions/classes + file stats)
- Auto-generate Issue + PR titles and descriptions
- Auto-commit with DCO sign-off (
Signed-off-by) - Auto-push
- Auto-create Issue (optional, via API)
- Auto-create PR with Issue linkage (
Fixes #id)
Quick Start
1) Configure Token (one time, for API features)
The script supports multiple platforms via configuration:
# For GitCode/GitLab
git config --global gitcode.token "your_token"
# For GitHub
git config --global github.token "your_token"
# Or use environment variables
export GITCODE_TOKEN="your_token"
export GITHUB_TOKEN="your_token"
Token permissions: api, read_api, write_repository
2) Run
python scripts/create-pr/full_auto_pr.py
What It Does
- Deep change analysis from
git diff - Detects:
- added/modified/removed functions
- added/modified/removed classes
- top changed files with line stats
- Generates structured Issue + PR descriptions based on real diffs
- Auto-adds DCO sign-off (
Signed-off-by: Name <email>) - Pushes to remote
- Creates Issue + PR via platform API (when configured)
- Links PR to Issue (adds
Fixes #id) - Falls back to web interface if API unavailable
Usage Options
python scripts/create-pr/full_auto_pr.py --target main
python scripts/create-pr/full_auto_pr.py --no-issue
python scripts/create-pr/full_auto_pr.py --no-commit
python scripts/create-pr/full_auto_pr.py --no-push
python scripts/create-pr/full_auto_pr.py --analyze-only
Output Artifacts
Generated Issue description:
- Summary + change type
- Affected components
- Added/modified/removed functions and classes
- Key file changes with +/-
- File type stats
- Commit history
- Diff stats
Generated PR description:
- Summary (from commits)
- Changes (function/class + component groups)
- Test plan
- Related Issue (
Fixes #id)
Files
create-pr/
├── SKILL.md
├── CHANGELOG.md
├── README.md
├── examples/
│ └── example-workflow.md
├── references/
│ ├── commit-message-guide.md
│ ├── pr-description-template.md
│ ├── platform-apis.md
│ └── common-issues.md
└── scripts/
├── repo_api.py # Platform-agnostic API client + analyzer
└── full_auto_pr.py # End-to-end automation
Platform Support
The script automatically detects the platform from your git remote URL:
- GitCode/GitLab: Uses GitLab-compatible API v4
- GitHub: Uses GitHub REST API v3
- Others: Falls back to web-based PR creation
Notes
- DCO (Developer Certificate of Origin) is automatically added to commit messages
- Requires
git config user.nameandgit config user.emailto be set - Adds
Signed-off-by: Name <email>line to each commit - Ensures PR passes DCO validation checks
- Requires
- If platform API is not configured or fails, the script opens browser for manual PR creation
- Token can be set via git config, environment variables, or
~/.platform-tokenfile
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/openharmonyinsight/openharmony-skills/create-pr">View create-pr on skillZs</a>