PR Review Helper
Overview
Run deterministic PR review checks for langgenius/dify-plugins and submit the final review through gh.
Output local check results in readable markdown sections/tables.
Always include a summary markdown table in your response to the user with columns: issue link | decision.
If no issue link is available, use the PR link and note it in the analysis.
Use emoji to represent status (for example, ✅ pass and ❌ no pass) and keep all output GitHub-flavored Markdown so it renders correctly on GitHub.
Scope Guardrails
- •Skip this skill when the task is issue moderation (not PR review).
- •For
langgenius/dify-pluginsandlanggenius/dify-official-pluginsissues, skip if issue author association isMEMBERorCONTRIBUTOR. - •Use
dify-issue-moderatorfor issue moderation flows.
Workflow
- •Confirm this task is PR review (not issue moderation). If it is issue moderation in plugin repos and author is
MEMBERorCONTRIBUTOR, skip this skill. - •Request a PR URL or PR number when missing.
- •Run
scripts/review_pr.pyfrom the repository root. - •Let the script collect PR metadata, check out the PR branch, and run local pre-check logic matching
.github/workflows/pre-check-plugin.yaml. - •Let the script validate PR title/body language, ignore the fixed bilingual notice sentence
【中文用户 & Non English User】请使用英语提交,否则会被关闭 :), and skip Chinese checks in the PRSelf Checkssection forlanggenius/dify-pluginsandlanggenius/dify-official-plugins. - •Let the script unpack the changed
.difypkgand fail ifREADME.mdcontains any Chinese characters. - •Let the script verify
dify_plugin>=0.5.0in the test environment. - •Let the script switch back to the original branch and delete the checked-out PR branch after checks complete.
- •Submit review with
gh pr review:- •Approve with
LGTMonly when all checks pass. - •Request changes with highlighted markdown sections and tables otherwise.
- •Approve with
- •In the review comment to the plugin author, include a compact status table listing each check/action with an emoji +
pass/no passstatus and arequired actioncolumn, followed by a clearNext stepssection. - •In your response to the user, include the required summary table and a short analysis (2-4 sentences) explaining the decision and any notable failures. Use emoji in the decision/status cell and ensure GitHub-flavored Markdown rendering (proper table headers and separators, no raw HTML).
Commands
Use this as the default command:
python3 scripts/review_pr.py --pr <PR_URL_OR_NUMBER> --submit-review
Useful options:
- •
--repo <owner/repo>: Override repository (defaultlanggenius/dify-plugins). - •
--pr-content-max-cjk <int>: Maximum allowed Chinese/CJK in PR title/body after allowlist filtering (default0). - •
--allow-pr-cjk-snippet <text>: Extra allowlisted PR snippet containing CJK (repeatable). Default allowlist includes【中文用户 & Non English User】请使用英语提交,否则会被关闭 :). - •
--readme-max-cjk <int>: Maximum allowed Chinese/CJK characters inREADME.md(default0). - •
--approve-message <text>: Approval body text (defaultLGTM). - •
--keep-temp: Keep temporary artifacts for debugging.
Review Standard
Approve only if all of these pass:
- •Exactly one
.difypkgfile changed in the PR. - •PR title/body contains no Chinese characters except the allowlisted sentence
【中文用户 & Non English User】请使用英语提交,否则会被关闭 :), and the PRSelf Checkssection is excluded from Chinese checks forlanggenius/dify-pluginsandlanggenius/dify-official-plugins. - •Manifest author does not contain
langgeniusordify. - •Plugin icon exists and is not a default/template icon.
- •Plugin version is not already published on marketplace.
- •Dependency/install/packaging checks succeed locally.
- •
dify_pluginversion is at least0.5.0. - •Plugin
README.mdcontains no Chinese characters.
Failure Handling
When any check fails:
- •Use
REQUEST_CHANGES. - •Format the review comment using markdown headings and a status table.
- •Include each failed check with concrete details and an action request to update and push fixes.
- •When
README.mdfails language check, include this doc link in the review comment:https://docs.dify.ai/en/develop-plugin/features-and-specs/plugin-types/multilingual-readme#multilingual-readme. - •Ensure the status table uses
pass/no passand includes arequired actioncolumn plus aNext stepssection.- •Status cells must include emoji (for example,
✅ passor❌ no pass) while retaining the text.
- •Status cells must include emoji (for example,
Prerequisites
Run in a repo clone with:
- •
ghauthenticated - •
python3 - •
jq - •
unzip - •network access (for toolkit clone, daemon download, marketplace API)