Create pr

From openharmonyinsight/openharmony-skills · View interactive version

Create pr is an AI agent skill from the GitHub repository openharmonyinsight/openharmony-skills. 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 to use this skill

Skill file

Create PR Skill v7.0.0

Platform-agnostic automated PR workflow:

  1. Analyze code changes and detect logic changes (functions/classes + file stats)
  2. Auto-generate Issue + PR titles and descriptions
  3. Auto-commit with DCO sign-off (Signed-off-by)
  4. Auto-push
  5. Auto-create Issue (optional, via API)
  6. 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

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:

Generated PR description:

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:

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.