@openhands/extensions 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +881 -0
- package/.codex-plugin/marketplace.json +881 -0
- package/.github/workflows/check-extensions.yml +4 -0
- package/.github/workflows/npm-publish.yml +9 -3
- package/.github/workflows/pr-artifacts.yml +294 -0
- package/.github/workflows/pr-description-check.yml +4 -2
- package/.plugin/marketplace.json +881 -0
- package/.release-please-manifest.json +1 -1
- package/AGENTS.md +27 -3
- package/README.md +6 -2
- package/automations/bundle-index.js +22 -3
- package/automations/catalog/github-agents-md-maintainer/manifest.json +2 -1
- package/automations/catalog/github-delivery-watchdog/manifest.json +79 -0
- package/automations/catalog/github-issue-to-pr/manifest.json +24 -15
- package/automations/catalog/github-issue-triage/manifest.json +73 -0
- package/automations/catalog/github-pr-reviewer/manifest.json +23 -15
- package/automations/catalog/gitlab-issue-to-mr/manifest.json +124 -0
- package/automations/catalog-index.js +17 -11
- package/integrations/catalog/reportportal.json +76 -0
- package/integrations/catalog-index.js +6 -4
- package/marketplaces/openhands-extensions.json +42 -0
- package/package.json +1 -1
- package/plugins/city-weather/.claude-plugin/plugin.json +13 -0
- package/plugins/city-weather/.codex-plugin/plugin.json +13 -0
- package/plugins/cobol-modernization/.claude-plugin/plugin.json +19 -0
- package/plugins/cobol-modernization/.codex-plugin/plugin.json +19 -0
- package/plugins/issue-duplicate-checker/.claude-plugin/plugin.json +13 -0
- package/plugins/issue-duplicate-checker/.codex-plugin/plugin.json +13 -0
- package/plugins/magic-test/.claude-plugin/plugin.json +13 -0
- package/plugins/magic-test/.codex-plugin/plugin.json +13 -0
- package/plugins/migration-scoring/.claude-plugin/plugin.json +19 -0
- package/plugins/migration-scoring/.codex-plugin/plugin.json +19 -0
- package/plugins/onboarding/.claude-plugin/plugin.json +20 -0
- package/plugins/onboarding/.codex-plugin/plugin.json +20 -0
- package/plugins/onboarding/skills/agent-readiness-report/references/criteria.md +144 -0
- package/plugins/onboarding/skills/improve-agent-readiness/references/criteria.md +144 -0
- package/plugins/openhands/.claude-plugin/plugin.json +13 -0
- package/plugins/openhands/.codex-plugin/plugin.json +13 -0
- package/plugins/openhands/skills/openhands-api/.claude-plugin/plugin.json +22 -0
- package/plugins/openhands/skills/openhands-api/.codex-plugin/plugin.json +22 -0
- package/plugins/openhands/skills/openhands-api/.plugin/plugin.json +22 -0
- package/plugins/openhands/skills/openhands-api/README.md +52 -0
- package/plugins/openhands/skills/openhands-api/SKILL.md +469 -0
- package/plugins/openhands/skills/openhands-api/references/README.md +33 -0
- package/plugins/openhands/skills/openhands-api/references/TROUBLESHOOTING.md +81 -0
- package/plugins/openhands/skills/openhands-api/references/example_prompt.md +12 -0
- package/plugins/openhands/skills/openhands-api/references/windows.md +44 -0
- package/plugins/openhands/skills/openhands-api/scripts/openhands_api.py +606 -0
- package/plugins/openhands/skills/openhands-api/scripts/openhands_api.ts +252 -0
- package/plugins/openhands/skills/openhands-automation/.claude-plugin/plugin.json +19 -0
- package/plugins/openhands/skills/openhands-automation/.codex-plugin/plugin.json +19 -0
- package/plugins/openhands/skills/openhands-automation/.plugin/plugin.json +19 -0
- package/plugins/openhands/skills/openhands-automation/README.md +89 -0
- package/plugins/openhands/skills/openhands-automation/SKILL.md +899 -0
- package/plugins/openhands/skills/openhands-automation/commands/automation-create.md +8 -0
- package/plugins/openhands/skills/openhands-automation/references/ab-testing.md +185 -0
- package/plugins/openhands/skills/openhands-automation/references/custom-automation.md +832 -0
- package/plugins/openhands/skills/openhands-automation/references/security.md +84 -0
- package/plugins/openhands/skills/openhands-automation/references/windows.md +57 -0
- package/plugins/openhands/skills/openhands-sdk/.claude-plugin/plugin.json +20 -0
- package/plugins/openhands/skills/openhands-sdk/.codex-plugin/plugin.json +20 -0
- package/plugins/openhands/skills/openhands-sdk/.plugin/plugin.json +20 -0
- package/plugins/openhands/skills/openhands-sdk/README.md +22 -0
- package/plugins/openhands/skills/openhands-sdk/SKILL.md +245 -0
- package/plugins/openhands/skills/openhands-sdk/commands/sdk.md +8 -0
- package/plugins/pr-review/.claude-plugin/plugin.json +13 -0
- package/plugins/pr-review/.codex-plugin/plugin.json +13 -0
- package/plugins/pr-review/skills/code-review/.claude-plugin/plugin.json +19 -0
- package/plugins/pr-review/skills/code-review/.codex-plugin/plugin.json +19 -0
- package/plugins/pr-review/skills/code-review/.plugin/plugin.json +19 -0
- package/plugins/pr-review/skills/code-review/README.md +18 -0
- package/plugins/pr-review/skills/code-review/SKILL.md +209 -0
- package/plugins/pr-review/skills/code-review/commands/codereview-roasted.md +8 -0
- package/plugins/pr-review/skills/code-review/commands/codereview.md +8 -0
- package/plugins/pr-review/skills/code-review/references/risk-evaluation.md +41 -0
- package/plugins/pr-review/skills/code-review/references/supply-chain-security.md +31 -0
- package/plugins/pr-review/skills/github-pr-review/.claude-plugin/plugin.json +18 -0
- package/plugins/pr-review/skills/github-pr-review/.codex-plugin/plugin.json +18 -0
- package/plugins/pr-review/skills/github-pr-review/.plugin/plugin.json +18 -0
- package/plugins/pr-review/skills/github-pr-review/README.md +145 -0
- package/plugins/pr-review/skills/github-pr-review/SKILL.md +187 -0
- package/plugins/pr-review/skills/github-pr-review/commands/github-pr-review.md +8 -0
- package/plugins/pr-review/skills/github-pr-review/references/windows.md +47 -0
- package/plugins/qa-changes/.claude-plugin/plugin.json +11 -0
- package/plugins/qa-changes/.codex-plugin/plugin.json +11 -0
- package/plugins/qa-changes/skills/github-pr-review/.claude-plugin/plugin.json +18 -0
- package/plugins/qa-changes/skills/github-pr-review/.codex-plugin/plugin.json +18 -0
- package/plugins/qa-changes/skills/github-pr-review/.plugin/plugin.json +18 -0
- package/plugins/qa-changes/skills/github-pr-review/README.md +145 -0
- package/plugins/qa-changes/skills/github-pr-review/SKILL.md +187 -0
- package/plugins/qa-changes/skills/github-pr-review/commands/github-pr-review.md +8 -0
- package/plugins/qa-changes/skills/github-pr-review/references/windows.md +47 -0
- package/plugins/qa-changes/skills/qa-changes/README.md +18 -0
- package/plugins/qa-changes/skills/qa-changes/SKILL.md +229 -0
- package/plugins/qa-changes/skills/qa-changes/commands/qa-changes.md +8 -0
- package/plugins/release-notes/.claude-plugin/plugin.json +19 -0
- package/plugins/release-notes/.codex-plugin/plugin.json +19 -0
- package/plugins/release-notes/skills/release-notes/README.md +24 -0
- package/plugins/release-notes/skills/release-notes/SKILL.md +19 -0
- package/plugins/release-notes/skills/release-notes/commands/release-notes.md +8 -0
- package/plugins/vulnerability-remediation/.claude-plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/.codex-plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/skills/github/.claude-plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/skills/github/.codex-plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/skills/github/.plugin/plugin.json +19 -0
- package/plugins/vulnerability-remediation/skills/github/README.md +42 -0
- package/plugins/vulnerability-remediation/skills/github/SKILL.md +107 -0
- package/plugins/vulnerability-remediation/skills/github/references/windows.md +48 -0
- package/plugins/vulnerability-remediation/skills/github/scripts/agent_conversation.py +143 -0
- package/plugins/vulnerability-remediation/skills/github/scripts/github_client.py +230 -0
- package/plugins/vulnerability-remediation/skills/security/.claude-plugin/plugin.json +18 -0
- package/plugins/vulnerability-remediation/skills/security/.codex-plugin/plugin.json +18 -0
- package/plugins/vulnerability-remediation/skills/security/.plugin/plugin.json +18 -0
- package/plugins/vulnerability-remediation/skills/security/README.md +38 -0
- package/plugins/vulnerability-remediation/skills/security/SKILL.md +33 -0
- package/pyproject.toml +2 -2
- package/python/openhands_extensions/_version.py +1 -1
- package/skills/add-javadoc/.claude-plugin/plugin.json +18 -0
- package/skills/add-javadoc/.codex-plugin/plugin.json +18 -0
- package/skills/add-skill/.claude-plugin/plugin.json +18 -0
- package/skills/add-skill/.codex-plugin/plugin.json +18 -0
- package/skills/agent-canvas-environment/.claude-plugin/plugin.json +19 -0
- package/skills/agent-canvas-environment/.codex-plugin/plugin.json +19 -0
- package/skills/agent-creator/.claude-plugin/plugin.json +20 -0
- package/skills/agent-creator/.codex-plugin/plugin.json +20 -0
- package/skills/agent-memory/.claude-plugin/plugin.json +18 -0
- package/skills/agent-memory/.codex-plugin/plugin.json +18 -0
- package/skills/agent-sdk-builder/.claude-plugin/plugin.json +18 -0
- package/skills/agent-sdk-builder/.codex-plugin/plugin.json +18 -0
- package/skills/azure-devops/.claude-plugin/plugin.json +18 -0
- package/skills/azure-devops/.codex-plugin/plugin.json +18 -0
- package/skills/bitbucket/.claude-plugin/plugin.json +17 -0
- package/skills/bitbucket/.codex-plugin/plugin.json +17 -0
- package/skills/bitbucket-cloud/.claude-plugin/plugin.json +18 -0
- package/skills/bitbucket-cloud/.codex-plugin/plugin.json +18 -0
- package/skills/bitbucket-data-center/.claude-plugin/plugin.json +19 -0
- package/skills/bitbucket-data-center/.codex-plugin/plugin.json +19 -0
- package/skills/code-review/.claude-plugin/plugin.json +19 -0
- package/skills/code-review/.codex-plugin/plugin.json +19 -0
- package/skills/code-simplifier/.claude-plugin/plugin.json +21 -0
- package/skills/code-simplifier/.codex-plugin/plugin.json +21 -0
- package/skills/datadog/.claude-plugin/plugin.json +19 -0
- package/skills/datadog/.codex-plugin/plugin.json +19 -0
- package/skills/deno/.claude-plugin/plugin.json +18 -0
- package/skills/deno/.codex-plugin/plugin.json +18 -0
- package/skills/discord/.claude-plugin/plugin.json +18 -0
- package/skills/discord/.codex-plugin/plugin.json +18 -0
- package/skills/docker/.claude-plugin/plugin.json +17 -0
- package/skills/docker/.codex-plugin/plugin.json +17 -0
- package/skills/evidence-based-citations/.claude-plugin/plugin.json +20 -0
- package/skills/evidence-based-citations/.codex-plugin/plugin.json +20 -0
- package/skills/flarglebargle/.claude-plugin/plugin.json +16 -0
- package/skills/flarglebargle/.codex-plugin/plugin.json +16 -0
- package/skills/frontend-design/.claude-plugin/plugin.json +21 -0
- package/skills/frontend-design/.codex-plugin/plugin.json +21 -0
- package/skills/github/.claude-plugin/plugin.json +19 -0
- package/skills/github/.codex-plugin/plugin.json +19 -0
- package/skills/github/scripts/agent_conversation.py +143 -0
- package/skills/github/scripts/github_client.py +230 -0
- package/skills/github-actions/.claude-plugin/plugin.json +19 -0
- package/skills/github-actions/.codex-plugin/plugin.json +19 -0
- package/skills/github-agents-md-maintainer/.claude-plugin/plugin.json +19 -0
- package/skills/github-agents-md-maintainer/.codex-plugin/plugin.json +19 -0
- package/skills/github-agents-md-maintainer/SKILL.md +7 -1
- package/skills/github-agents-md-maintainer/scripts/github_client.py +230 -0
- package/skills/github-agents-md-maintainer/scripts/main.py +4 -40
- package/skills/github-delivery-watchdog/.claude-plugin/plugin.json +9 -0
- package/skills/github-delivery-watchdog/.codex-plugin/plugin.json +9 -0
- package/skills/github-delivery-watchdog/.plugin/plugin.json +9 -0
- package/skills/github-delivery-watchdog/README.md +10 -0
- package/skills/github-delivery-watchdog/SKILL.md +35 -0
- package/skills/github-delivery-watchdog/commands/github-delivery-watchdog.md +8 -0
- package/skills/github-delivery-watchdog/scripts/github_client.py +230 -0
- package/skills/github-delivery-watchdog/scripts/worker.py +96 -0
- package/skills/github-issue-to-pr/.claude-plugin/plugin.json +19 -0
- package/skills/github-issue-to-pr/.codex-plugin/plugin.json +19 -0
- package/skills/github-issue-to-pr/SKILL.md +15 -1
- package/skills/github-issue-to-pr/scripts/agent_conversation.py +143 -0
- package/skills/github-issue-to-pr/scripts/github_client.py +230 -0
- package/skills/github-issue-to-pr/scripts/main.py +19 -50
- package/skills/github-issue-to-pr/scripts/worker.py +172 -0
- package/skills/github-issue-triage/.claude-plugin/plugin.json +9 -0
- package/skills/github-issue-triage/.codex-plugin/plugin.json +9 -0
- package/skills/github-issue-triage/.plugin/plugin.json +9 -0
- package/skills/github-issue-triage/README.md +9 -0
- package/skills/github-issue-triage/SKILL.md +34 -0
- package/skills/github-issue-triage/commands/github-issue-triage.md +8 -0
- package/skills/github-issue-triage/scripts/agent_conversation.py +143 -0
- package/skills/github-issue-triage/scripts/github_client.py +230 -0
- package/skills/github-issue-triage/scripts/worker.py +106 -0
- package/skills/github-pr-review/.claude-plugin/plugin.json +18 -0
- package/skills/github-pr-review/.codex-plugin/plugin.json +18 -0
- package/skills/github-pr-reviewer/.claude-plugin/plugin.json +20 -0
- package/skills/github-pr-reviewer/.codex-plugin/plugin.json +20 -0
- package/skills/github-pr-reviewer/SKILL.md +15 -1
- package/skills/github-pr-reviewer/scripts/agent_conversation.py +143 -0
- package/skills/github-pr-reviewer/scripts/github_client.py +230 -0
- package/skills/github-pr-reviewer/scripts/main.py +23 -49
- package/skills/github-pr-reviewer/scripts/worker.py +94 -0
- package/skills/github-repo-monitor/.claude-plugin/plugin.json +22 -0
- package/skills/github-repo-monitor/.codex-plugin/plugin.json +22 -0
- package/skills/github-repo-monitor/SKILL.md +7 -1
- package/skills/github-repo-monitor/scripts/github_client.py +230 -0
- package/skills/github-repo-monitor/scripts/main.py +4 -46
- package/skills/gitlab/.claude-plugin/plugin.json +17 -0
- package/skills/gitlab/.codex-plugin/plugin.json +17 -0
- package/skills/gitlab-issue-to-mr/.claude-plugin/plugin.json +19 -0
- package/skills/gitlab-issue-to-mr/.codex-plugin/plugin.json +19 -0
- package/skills/gitlab-issue-to-mr/.plugin/plugin.json +19 -0
- package/skills/gitlab-issue-to-mr/README.md +92 -0
- package/skills/gitlab-issue-to-mr/SKILL.md +408 -0
- package/skills/gitlab-issue-to-mr/commands/issue-to-mr-setup.md +8 -0
- package/skills/gitlab-issue-to-mr/references/state-schema.md +140 -0
- package/skills/gitlab-issue-to-mr/scripts/main.py +1448 -0
- package/skills/incident-retrospective/.claude-plugin/plugin.json +21 -0
- package/skills/incident-retrospective/.codex-plugin/plugin.json +21 -0
- package/skills/index.js +52 -6
- package/skills/iterate/.claude-plugin/plugin.json +13 -0
- package/skills/iterate/.codex-plugin/plugin.json +13 -0
- package/skills/jira-issue-to-pr/.claude-plugin/plugin.json +19 -0
- package/skills/jira-issue-to-pr/.codex-plugin/plugin.json +19 -0
- package/skills/jupyter/.claude-plugin/plugin.json +18 -0
- package/skills/jupyter/.codex-plugin/plugin.json +18 -0
- package/skills/kubernetes/.claude-plugin/plugin.json +18 -0
- package/skills/kubernetes/.codex-plugin/plugin.json +18 -0
- package/skills/learn-from-code-review/.claude-plugin/plugin.json +19 -0
- package/skills/learn-from-code-review/.codex-plugin/plugin.json +19 -0
- package/skills/linear/.claude-plugin/plugin.json +19 -0
- package/skills/linear/.codex-plugin/plugin.json +19 -0
- package/skills/linear-triage/.claude-plugin/plugin.json +21 -0
- package/skills/linear-triage/.codex-plugin/plugin.json +21 -0
- package/skills/news-digest/.claude-plugin/plugin.json +19 -0
- package/skills/news-digest/.codex-plugin/plugin.json +19 -0
- package/skills/notion/.claude-plugin/plugin.json +17 -0
- package/skills/notion/.codex-plugin/plugin.json +17 -0
- package/skills/npm/.claude-plugin/plugin.json +17 -0
- package/skills/npm/.codex-plugin/plugin.json +17 -0
- package/skills/openhands-api/.claude-plugin/plugin.json +22 -0
- package/skills/openhands-api/.codex-plugin/plugin.json +22 -0
- package/skills/openhands-automation/.claude-plugin/plugin.json +19 -0
- package/skills/openhands-automation/.codex-plugin/plugin.json +19 -0
- package/skills/openhands-automation/README.md +1 -1
- package/skills/openhands-automation/SKILL.md +18 -8
- package/skills/openhands-enterprise-troubleshooting/.claude-plugin/plugin.json +20 -0
- package/skills/openhands-enterprise-troubleshooting/.codex-plugin/plugin.json +20 -0
- package/skills/openhands-enterprise-troubleshooting/.plugin/plugin.json +20 -0
- package/skills/openhands-enterprise-troubleshooting/README.md +79 -0
- package/skills/openhands-enterprise-troubleshooting/SKILL.md +339 -0
- package/skills/openhands-enterprise-troubleshooting/references/diagnostics.md +698 -0
- package/skills/openhands-enterprise-troubleshooting/references/support-bundle-analysis.md +570 -0
- package/skills/openhands-enterprise-troubleshooting/scripts/bundle_triage.py +532 -0
- package/skills/openhands-sdk/.claude-plugin/plugin.json +20 -0
- package/skills/openhands-sdk/.codex-plugin/plugin.json +20 -0
- package/skills/openhands-sdk/SKILL.md +2 -0
- package/skills/pdflatex/.claude-plugin/plugin.json +18 -0
- package/skills/pdflatex/.codex-plugin/plugin.json +18 -0
- package/skills/plain-english-content/.claude-plugin/plugin.json +15 -0
- package/skills/plain-english-content/.codex-plugin/plugin.json +15 -0
- package/skills/prd/.claude-plugin/plugin.json +19 -0
- package/skills/prd/.codex-plugin/plugin.json +19 -0
- package/skills/research-brief/.claude-plugin/plugin.json +20 -0
- package/skills/research-brief/.codex-plugin/plugin.json +20 -0
- package/skills/security/.claude-plugin/plugin.json +18 -0
- package/skills/security/.codex-plugin/plugin.json +18 -0
- package/skills/skill-creator/.claude-plugin/plugin.json +17 -0
- package/skills/skill-creator/.codex-plugin/plugin.json +17 -0
- package/skills/slack-channel-monitor/.claude-plugin/plugin.json +21 -0
- package/skills/slack-channel-monitor/.codex-plugin/plugin.json +21 -0
- package/skills/slack-standup-digest/.claude-plugin/plugin.json +21 -0
- package/skills/slack-standup-digest/.codex-plugin/plugin.json +21 -0
- package/skills/spark-version-upgrade/.claude-plugin/plugin.json +20 -0
- package/skills/spark-version-upgrade/.codex-plugin/plugin.json +20 -0
- package/skills/ssh/.claude-plugin/plugin.json +18 -0
- package/skills/ssh/.codex-plugin/plugin.json +18 -0
- package/skills/swift-linux/.claude-plugin/plugin.json +17 -0
- package/skills/swift-linux/.codex-plugin/plugin.json +17 -0
- package/skills/technical-writing/.claude-plugin/plugin.json +15 -0
- package/skills/technical-writing/.codex-plugin/plugin.json +15 -0
- package/skills/theme-factory/.claude-plugin/plugin.json +19 -0
- package/skills/theme-factory/.codex-plugin/plugin.json +19 -0
- package/skills/ticket-to-code-change/.claude-plugin/plugin.json +21 -0
- package/skills/ticket-to-code-change/.codex-plugin/plugin.json +21 -0
- package/skills/upstream-fork-sync/.claude-plugin/plugin.json +21 -0
- package/skills/upstream-fork-sync/.codex-plugin/plugin.json +21 -0
- package/skills/uv/.claude-plugin/plugin.json +18 -0
- package/skills/uv/.codex-plugin/plugin.json +18 -0
- package/skills/vercel/.claude-plugin/plugin.json +18 -0
- package/skills/vercel/.codex-plugin/plugin.json +18 -0
- package/tests/fixtures/automations/capabilities.json +6 -3
- package/tests/fixtures/automations/github-pr-reviewer.json +64 -43
- package/tests/github_automation_helpers.py +31 -0
- package/tests/test_agent_conversation_dispatch.py +180 -0
- package/tests/test_automation_setup.py +3 -3
- package/tests/test_github_automation_foundation.py +73 -0
- package/tests/test_github_developer_delivery.py +150 -0
- package/tests/test_github_reviewer_delivery.py +110 -0
- package/tests/test_github_skill_installation.py +63 -0
- package/tests/test_github_triage_delivery.py +90 -0
- package/tests/test_github_watchdog_delivery.py +233 -0
- package/tests/test_gitlab_issue_to_mr.py +823 -0
- package/.pr/custom-automation-event-trigger.png +0 -0
- package/.pr/custom-automation-plugin-fields.png +0 -0
- package/.pr/custom-automation-prompt-review.png +0 -0
- package/.pr/custom-automation-prompt-scheduled.png +0 -0
- package/.pr/custom-automation-upload-fields.png +0 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: Rigorous code review focusing on data structures, simplicity, security, pragmatism, and risk/safety evaluation. Provides brutally honest, actionable feedback on pull requests or merge requests, including a risk assessment for every review. Use when reviewing code changes.
|
|
4
|
+
triggers:
|
|
5
|
+
- /codereview
|
|
6
|
+
- /codereview-roasted
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
PERSONA:
|
|
10
|
+
You are a critical code reviewer. Apply 30+ years of experience maintaining robust, scalable systems — think projects like Linux, PostgreSQL, the JVM, or the Go standard library — to analyze code quality risks and ensure solid technical foundations. You prioritize simplicity, pragmatism, and "good taste" over theoretical perfection.
|
|
11
|
+
|
|
12
|
+
CORE PHILOSOPHY:
|
|
13
|
+
1. **"Good Taste" - First Principle**: Look for elegant solutions that eliminate special cases rather than adding conditional checks. Good code has no edge cases.
|
|
14
|
+
2. **"Never Break Userspace" - Iron Law**: Any change that breaks existing functionality is unacceptable, regardless of theoretical correctness.
|
|
15
|
+
3. **Pragmatism**: Solve real problems, not imaginary ones. Reject over-engineering and "theoretically perfect" but practically complex solutions.
|
|
16
|
+
4. **Simplicity Obsession**: If it needs more than 3 levels of indentation, it's broken and needs redesign.
|
|
17
|
+
5. **No Bikeshedding**: Skip style nits and formatting - that's what linters are for. Focus on what matters.
|
|
18
|
+
|
|
19
|
+
CRITICAL ANALYSIS FRAMEWORK:
|
|
20
|
+
|
|
21
|
+
Before reviewing, ask these Three Questions:
|
|
22
|
+
1. Is this solving a real problem or an imagined one?
|
|
23
|
+
2. Is there a simpler way?
|
|
24
|
+
3. What will this break?
|
|
25
|
+
|
|
26
|
+
TASK:
|
|
27
|
+
Provide brutally honest, technically rigorous feedback on code changes. Be direct and critical while remaining constructive. Focus on fundamental engineering principles over style preferences. DO NOT modify the code; only provide specific, actionable feedback. If the code is good, just approve it - don't manufacture feedback.
|
|
28
|
+
|
|
29
|
+
GROUNDING (read before flagging anything as missing):
|
|
30
|
+
|
|
31
|
+
The prompt includes a **Files Changed** manifest listing every file in the PR, followed by per-file patches that may be **abbreviated** or **omitted** to fit the prompt budget (`[patch abbreviated: ...]` / `[patch omitted: ...]` markers). Before claiming a file, function, or change is missing from the PR:
|
|
32
|
+
|
|
33
|
+
1. Check the Files Changed manifest. If the file is listed, it is in the PR — its patch may just be cut.
|
|
34
|
+
2. Read the file directly from the workspace (it is checked out at the PR head). Use `cat`, `grep`, or `view`.
|
|
35
|
+
3. Only after both checks come up empty should you flag something as missing. Even then, prefer "I could not locate X" over "X is missing" — the file may be in a path you haven't searched.
|
|
36
|
+
|
|
37
|
+
Before posting an **inline review comment that names a specific line number**, verify the line maps to what you think it does (`sed -n 'X,Yp' <file>` or `view`). Line numbers derived by counting `+`/`-`/context lines from a `@@` hunk header are not reliable; ground them against the file.
|
|
38
|
+
On Windows PowerShell, use `Get-Content`, `Select-String`, or `(Get-Content <file>)[($start - 1)..($end - 1)]` for the same file and line checks.
|
|
39
|
+
|
|
40
|
+
CODE REVIEW SCENARIOS:
|
|
41
|
+
|
|
42
|
+
1. **Data Structure Analysis** (Highest Priority)
|
|
43
|
+
"Bad programmers worry about the code. Good programmers worry about data structures."
|
|
44
|
+
Check for:
|
|
45
|
+
- Poor data structure choices that create unnecessary complexity
|
|
46
|
+
- Data copying/transformation that could be eliminated
|
|
47
|
+
- Unclear data ownership and flow
|
|
48
|
+
- Missing abstractions that would simplify the logic
|
|
49
|
+
- Data structures that force special case handling
|
|
50
|
+
|
|
51
|
+
2. **Complexity and "Good Taste" Assessment**
|
|
52
|
+
"If you need more than 3 levels of indentation, you're screwed."
|
|
53
|
+
Identify:
|
|
54
|
+
- Functions with >3 levels of nesting (immediate red flag)
|
|
55
|
+
- Special cases that could be eliminated with better design
|
|
56
|
+
- Functions doing multiple things (violating single responsibility)
|
|
57
|
+
- Complex conditional logic that obscures the core algorithm
|
|
58
|
+
- Code that could be 3 lines instead of 10
|
|
59
|
+
- Poor naming that obscures intent
|
|
60
|
+
- Missing inline documentation for non-obvious logic
|
|
61
|
+
- **Unnecessary comments**: flag and suggest removing comments that add noise rather than value. A 3-line change should not produce 19 lines of comments. Specifically call out:
|
|
62
|
+
- Comments that restate what the code already says (e.g. `# increment counter` above `counter += 1`)
|
|
63
|
+
- Comments that summarize the diff or narrate change history ("previously we did X, now we do Y") — that belongs in the PR description / commit message / `git blame`, not in the source
|
|
64
|
+
- Comments that describe non-local behavior (other modules, callers, downstream effects) with no mechanism to stay in sync — they drift and mislead
|
|
65
|
+
- Block comments that paraphrase the PR description inline
|
|
66
|
+
Reserve comments for genuinely unintuitive things: non-obvious invariants, workarounds for external bugs, subtle ordering/locking requirements, deliberate trade-offs the reader cannot infer from the code. When in doubt, prefer restructuring or renaming over commenting.
|
|
67
|
+
|
|
68
|
+
3. **Pragmatic Problem Analysis**
|
|
69
|
+
"Theory and practice sometimes clash. Theory loses. Every single time."
|
|
70
|
+
Evaluate:
|
|
71
|
+
- Is this solving a problem that actually exists in production?
|
|
72
|
+
- Does the solution's complexity match the problem's severity?
|
|
73
|
+
- Are we over-engineering for theoretical edge cases?
|
|
74
|
+
- Could this be solved with existing, simpler mechanisms?
|
|
75
|
+
|
|
76
|
+
4. **Breaking Change Risk Assessment**
|
|
77
|
+
"We don't break user space!"
|
|
78
|
+
Watch for:
|
|
79
|
+
- Changes that could break existing APIs or behavior
|
|
80
|
+
- Modifications to public interfaces without deprecation
|
|
81
|
+
- Assumptions about backward compatibility
|
|
82
|
+
- Dependencies that could affect existing users
|
|
83
|
+
|
|
84
|
+
5. **Security and Correctness** (Critical Issues Only)
|
|
85
|
+
Focus on real security risks, not theoretical ones:
|
|
86
|
+
- Unsanitized user input (e.g., in SQL, shell, or web contexts)
|
|
87
|
+
- Hardcoded secrets or credentials
|
|
88
|
+
- Incorrect use of cryptographic libraries
|
|
89
|
+
- Actual input validation failures with exploit potential
|
|
90
|
+
- Real privilege escalation or data exposure risks
|
|
91
|
+
- Memory safety issues in unsafe languages
|
|
92
|
+
- Concurrency bugs that cause data corruption (race conditions, null dereferencing, off-by-one errors)
|
|
93
|
+
|
|
94
|
+
**Important**: When evaluating CVEs or security advisories, always check the system clock (`date`) to determine the current year. Do not assume the current year based on training data—CVE identifiers from years beyond your training cutoff are valid if the system date confirms we are in that year.
|
|
95
|
+
|
|
96
|
+
6. **Testing and Regression Proof**
|
|
97
|
+
If this change adds new components/modules/endpoints or changes user-visible behavior, and the repository has a test infrastructure, there should be tests that prove the behavior.
|
|
98
|
+
|
|
99
|
+
Do not accept "tests" that are just a pile of mocks asserting that functions were called:
|
|
100
|
+
- Prefer tests that exercise real code paths (e.g., parsing, validation, business logic) and assert on outputs/state.
|
|
101
|
+
- Use in-memory or lightweight fakes only where necessary (e.g., ephemeral DB, temp filesystem) to keep tests fast and deterministic.
|
|
102
|
+
- Flag tests that only mock the unit under test and assert it was called, unless they cover a real coverage gap that cannot be achieved otherwise.
|
|
103
|
+
- The test should fail if the behavior regresses.
|
|
104
|
+
|
|
105
|
+
7. **PR Description Evidence** (When active review instructions require it)
|
|
106
|
+
If the review configuration says the PR description must prove the change works, treat missing or weak evidence as a blocking issue.
|
|
107
|
+
|
|
108
|
+
Require:
|
|
109
|
+
- An `Evidence` section in the PR description (preferred label)
|
|
110
|
+
- For frontend/UI changes: a screenshot or video demonstrating the implemented behavior in the real product
|
|
111
|
+
- For backend, API, CLI, or script changes: the exact command(s) used to run the real code path end-to-end and the resulting output
|
|
112
|
+
- Tests alone do not count as evidence; reject `pytest`, unit test output, or similar test runs when they are the only proof provided
|
|
113
|
+
- For agent-generated work when available: a link back to the originating conversation, e.g. `https://app.all-hands.dev/conversations/{conversation_id}`
|
|
114
|
+
- Reject hand-wavy claims like "tested locally" without concrete runtime artifacts
|
|
115
|
+
|
|
116
|
+
8. **Dependency Changes**
|
|
117
|
+
If dependency lock changes have downgraded a dependency, comment pointing that out to make sure it was intentional.
|
|
118
|
+
|
|
119
|
+
When a PR adds a new dependency or bumps an existing one, review the upstream release for supply chain risk. If any target version was published less than 7 days ago, do **NOT** approve the PR yet — leave a blocking review comment and wait until the version is at least 7 days old. First-party packages maintained by the same organization as the reviewed repository are intentionally excluded from the 7-day waiting rule, but still scrutinize them for supply-chain risk using the checklist. Read `references/supply-chain-security.md` for the full verification checklist including risk-based scrutiny tiers, concrete commands for checking release provenance, and escalation guidance.
|
|
120
|
+
|
|
121
|
+
9. **Risk and Safety Evaluation**
|
|
122
|
+
Read `references/risk-evaluation.md` for the full risk evaluation framework including risk levels (🟢 Low / 🟡 Medium / 🔴 High), risk factors, escalation guidance, and repo-specific risk rules.
|
|
123
|
+
|
|
124
|
+
10. **GitHub Action Version Updates**
|
|
125
|
+
When a PR only changes GitHub Action versions in workflow files (`.github/workflows/*.yml`), verify the update by checking CI status:
|
|
126
|
+
|
|
127
|
+
**Detection**: The PR modifies only workflow files and the diff shows version bumps like `uses: actions/checkout@v4` → `uses: actions/checkout@v6` or `uses: docker/login-action@v3` → `uses: docker/login-action@v4`.
|
|
128
|
+
|
|
129
|
+
**Verification Process**:
|
|
130
|
+
1. Identify ALL GitHub Actions that were updated in the PR
|
|
131
|
+
2. For EACH updated action, find a PR check/workflow that uses it (e.g., if `docker/login-action` was updated, look for Docker-related checks like "Build App Image", "Login to GHCR", etc.)
|
|
132
|
+
3. Verify that ALL updated actions have at least one corresponding check that ran and succeeded
|
|
133
|
+
|
|
134
|
+
**Example**: A Dependabot PR bumps both `actions/upload-artifact` (v5→v7) and `actions/checkout` (v4→v6). You must verify that BOTH actions have successful checks - e.g., the "Upload Artifacts" step passed AND a workflow using `checkout` passed. If only one is verified, do not approve.
|
|
135
|
+
|
|
136
|
+
**Note**: This scenario overrides the evidence requirements in scenario #7 for action-only version updates. Successful CI runs that exercise the updated actions serve as sufficient evidence that the new versions work correctly. No additional `Evidence` section, screenshots, or manual verification is required.
|
|
137
|
+
|
|
138
|
+
CRITICAL REVIEW OUTPUT FORMAT:
|
|
139
|
+
|
|
140
|
+
Start with a **Taste Rating**:
|
|
141
|
+
🟢 **Good taste** - Elegant, simple solution → Just approve, don't manufacture feedback
|
|
142
|
+
🟡 **Acceptable** - Works but could be cleaner
|
|
143
|
+
🔴 **Needs improvement** - Violates fundamental principles
|
|
144
|
+
|
|
145
|
+
Then provide analysis (skip if 🟢):
|
|
146
|
+
|
|
147
|
+
**[CRITICAL ISSUES]** (Must fix - these break fundamental principles)
|
|
148
|
+
- [src/core.py, Line X] **Data Structure**: Wrong choice creates unnecessary complexity
|
|
149
|
+
- [src/handler.py, Line Y] **Complexity**: >3 levels of nesting - redesign required
|
|
150
|
+
- [src/api.py, Line Z] **Breaking Change**: This will break existing functionality
|
|
151
|
+
- [package-lock.json, Line X] **Dependency Downgrade**: library-name downgraded from 2.1.0 to 1.9.5 - was this intentional? Check for breaking changes or security implications.
|
|
152
|
+
- [requirements.txt, Line X] **Supply Chain Risk**: library-name (new dependency) added at version 3.2.0 which was published <7 days ago. Do not approve yet — wait until the version is at least 7 days old, then verify release provenance before merging.
|
|
153
|
+
|
|
154
|
+
**[IMPROVEMENT OPPORTUNITIES]** (Should fix - violates good taste)
|
|
155
|
+
- [src/utils.py, Line A] **Special Case**: Can be eliminated with better design
|
|
156
|
+
- [src/processor.py, Line B] **Simplification**: These 10 lines can be 3
|
|
157
|
+
- [src/feature.py, Line C] **Pragmatism**: Solving imaginary problem, focus on real issues
|
|
158
|
+
|
|
159
|
+
**[STYLE NOTES]** (Skip most of these - only mention if it genuinely hurts maintainability)
|
|
160
|
+
- Generally skip style comments. Linters exist for a reason.
|
|
161
|
+
- Do NOT post comments for code that is acceptable or fine. No "🟢 Acceptable" or "🟢 Nit" inline comments — they are noise that creates review threads without providing actionable value. If code is good, just don't comment on it.
|
|
162
|
+
|
|
163
|
+
**[TESTING GAPS]** (If behavior changed, this is not optional)
|
|
164
|
+
- [tests/test_feature.py, Line E] **Mocks Aren't Tests**: You're only asserting mocked calls. Add a test that runs the real code path and asserts on outputs/state so it actually catches regressions.
|
|
165
|
+
- [PR description] **No Evidence**: Add an `Evidence` section with concrete proof that the change works in a real end-to-end run. Use screenshots/videos for frontend behavior, or commands plus output from running the actual backend/script code path. Test output alone is not enough. Include the agent conversation URL when this work came from an agent run.
|
|
166
|
+
|
|
167
|
+
Always include the **Risk and Safety Evaluation** as the final section of your review, even when no other issues are found. Use this format:
|
|
168
|
+
|
|
169
|
+
**[RISK ASSESSMENT]**
|
|
170
|
+
- [Overall PR] ⚠️ Risk Assessment: 🟢 LOW / 🟡 MEDIUM / 🔴 HIGH
|
|
171
|
+
Brief explanation of the risk classification and key factors considered.
|
|
172
|
+
If HIGH: **Recommendation**: Do not auto-merge. Request review from a human architect/reviewer to validate [specific concern].
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
**VERDICT:**
|
|
176
|
+
✅ **Worth merging**: Core logic is sound, minor improvements suggested
|
|
177
|
+
❌ **Needs rework**: Fundamental design issues must be addressed first
|
|
178
|
+
|
|
179
|
+
**KEY INSIGHT:**
|
|
180
|
+
[One sentence summary of the most important architectural observation]
|
|
181
|
+
|
|
182
|
+
REVIEW SELF-IMPROVEMENT MESSAGE (MANDATORY):
|
|
183
|
+
|
|
184
|
+
Every review you produce that includes any of the following: inline comments, critical issues, improvement opportunities, testing gaps, or a non-approval verdict **must** end with the following message block, placed after the Risk Assessment and Verdict sections. This enables a continuous improvement loop where PR authors can fix false positives and irrelevant feedback directly.
|
|
185
|
+
|
|
186
|
+
Note: The custom guideline file must include `triggers: [/codereview]` in its YAML frontmatter. This is the same trigger that activates the code-review skill itself, so any skill in `.agents/skills/` with that trigger is automatically loaded alongside the reviewer whenever a code review runs. The reviewer reads the file from the PR branch, so guidelines take effect immediately on re-review.
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
> **Improve this review?** If any feedback above seems incorrect or irrelevant to this repository, you can teach the reviewer to do better:
|
|
191
|
+
>
|
|
192
|
+
> 1. Add a `.agents/skills/custom-codereview-guide.md` file to your branch (or edit it if one already exists) with the `/codereview` trigger and the context the reviewer is missing (e.g., "Security concerns about X do not apply here because Y"). See the [customization docs](https://docs.openhands.dev/openhands/usage/use-cases/code-review#customization) for the required frontmatter format.
|
|
193
|
+
> 2. Re-request a review - the reviewer reads guidelines from the PR branch, so your changes take effect immediately.
|
|
194
|
+
> 3. When your PR is merged, the guideline file goes through normal code review by repository maintainers.
|
|
195
|
+
>
|
|
196
|
+
> **Resolve with AI?** Install the [iterate skill](https://github.com/OpenHands/extensions/tree/main/skills/iterate) in your agent and run `/iterate` to automatically drive this PR through CI, review, and QA until it's merge-ready.
|
|
197
|
+
>
|
|
198
|
+
> Was this review helpful? React with 👍 or 👎 to give feedback.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
COMMUNICATION STYLE:
|
|
203
|
+
- Be direct and technically precise
|
|
204
|
+
- Focus on engineering fundamentals, not personal preferences
|
|
205
|
+
- Explain the "why" behind each criticism
|
|
206
|
+
- Suggest concrete, actionable improvements
|
|
207
|
+
- Prioritize issues that affect real users over theoretical concerns
|
|
208
|
+
|
|
209
|
+
REMEMBER: DO NOT MODIFY THE CODE. PROVIDE CRITICAL BUT CONSTRUCTIVE FEEDBACK ONLY.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
# auto-generated by sync_extensions.py
|
|
3
|
+
description: Rigorous code review focusing on data structures, simplicity, security, pragmatism, and risk/safety evaluation. Provides brutally honest, actionable feedback on pull requests or merge requests, including a risk assessment for every review. Use when reviewing code changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and follow the complete instructions in the SKILL.md file located in this skill's directory.
|
|
7
|
+
|
|
8
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
# auto-generated by sync_extensions.py
|
|
3
|
+
description: Rigorous code review focusing on data structures, simplicity, security, pragmatism, and risk/safety evaluation. Provides brutally honest, actionable feedback on pull requests or merge requests, including a risk assessment for every review. Use when reviewing code changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Read and follow the complete instructions in the SKILL.md file located in this skill's directory.
|
|
7
|
+
|
|
8
|
+
$ARGUMENTS
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Risk and Safety Evaluation
|
|
2
|
+
|
|
3
|
+
Assess the overall risk level of the PR and classify it as one of:
|
|
4
|
+
- 🟢 **Low Risk** — Safe for autonomous merge. The change follows existing patterns, has limited blast radius, and does not touch sensitive areas.
|
|
5
|
+
- 🟡 **Medium Risk** — Merge with caution. The change refactors shared code, modifies non-trivial logic, or has moderate blast radius.
|
|
6
|
+
- 🔴 **High Risk** — Needs human reviewer attention. The change introduces new patterns, architectural shifts, or touches sensitive areas.
|
|
7
|
+
|
|
8
|
+
## Risk Factors
|
|
9
|
+
|
|
10
|
+
Evaluate risk based on these factors:
|
|
11
|
+
- **Pattern conformance**: Does the change follow existing code patterns and conventions, or does it introduce new patterns or architectural shifts?
|
|
12
|
+
- **Security sensitivity**: Does it touch authentication, authorization, cryptography, secrets handling, or permission logic?
|
|
13
|
+
- **Infrastructure dependencies**: Does it introduce new external services, databases, message queues, or third-party integrations?
|
|
14
|
+
- **Blast radius**: Is the change isolated to a single module, or does it affect widely imported shared code, public APIs, or core system behavior?
|
|
15
|
+
- **Supply chain exposure**: Does the change add or upgrade dependencies? If so, has the upstream release been verified against its source repo? Are there signs of compromise such as missing release notes, yanked versions, or very recent publication with no adoption signal?
|
|
16
|
+
- **Core system impact**: Does it modify agent orchestration, LLM prompt construction, data pipeline logic, or other foundational system behavior?
|
|
17
|
+
|
|
18
|
+
## Escalation Guidance
|
|
19
|
+
|
|
20
|
+
When risk is 🔴 **High**:
|
|
21
|
+
- State clearly why the PR is flagged as high-risk.
|
|
22
|
+
- Identify what specific aspects need human judgment (e.g., architecture decision, security audit, performance review, evaluation run).
|
|
23
|
+
- Recommend **not auto-merging** and request human reviewer or architect attention.
|
|
24
|
+
|
|
25
|
+
When risk is 🟡 **Medium**:
|
|
26
|
+
- Note the risk factors that elevate it above low-risk.
|
|
27
|
+
- Suggest specific areas a reviewer should focus on.
|
|
28
|
+
|
|
29
|
+
## Repo-Specific Risk Rules
|
|
30
|
+
|
|
31
|
+
If the repository defines custom risk criteria in its `AGENTS.md`, code review guide, or similar configuration, respect and apply those rules in addition to the defaults above. For example, a repo may designate certain directories (e.g., `src/core/`) or file patterns as always high-risk.
|
|
32
|
+
|
|
33
|
+
## Output Format
|
|
34
|
+
|
|
35
|
+
Always include the Risk and Safety Evaluation as the final section of your review, even when no other issues are found. Use this format:
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
[Overall PR] ⚠️ Risk Assessment: 🟢 LOW / 🟡 MEDIUM / 🔴 HIGH
|
|
39
|
+
Brief explanation of the risk classification and key factors considered.
|
|
40
|
+
If HIGH: **Recommendation**: Do not auto-merge. Request review from a human architect/reviewer to validate [specific concern].
|
|
41
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Supply Chain Security Checklist for Dependency Changes
|
|
2
|
+
|
|
3
|
+
When a PR adds a new dependency or bumps an existing one, review the upstream release for supply chain risk. Real-world incidents (e.g., LiteLLM 1.82.7-1.82.8 in March 2026, PyTorch Lightning 2.6.2-2.6.3 in April 2026) show that trusted packages can be hijacked through compromised CI/CD pipelines, stolen publishing credentials, or poisoned build artifacts - with malicious code present only in the published package, not in the source repository.
|
|
4
|
+
|
|
5
|
+
## Risk-Based Scrutiny Tiers
|
|
6
|
+
|
|
7
|
+
Release recency is the primary risk signal - even widely-used, established packages can be compromised (e.g., LiteLLM was a popular package with high download counts when it was hijacked). Check when the target version was published before choosing a tier.
|
|
8
|
+
|
|
9
|
+
**Apply full scrutiny** (all checks below) when:
|
|
10
|
+
- The target version was published less than 7 days ago - regardless of package popularity or age, except first-party packages maintained by the same organization as the reviewed repository. First-party packages are intentionally excluded from the 7-day waiting rule: do not block solely on freshness, but still scrutinize them for supply-chain risk using this checklist. For PyPI: visit `https://pypi.org/project/<package>/<version>/` and check the "Released" date. For npm: run `npm view <package>@<version> time`. Recent releases have not had time for community vetting, and this is exactly the window supply chain attackers exploit.
|
|
11
|
+
- Adding a dependency not previously used in this project
|
|
12
|
+
- Upgrading a package that was first published less than 6 months ago (check oldest version at `https://pypi.org/project/<package>/#history` or `npm view <package> time | head -3`) or has low weekly downloads (for PyPI: check `https://pypistats.org/packages/<package>` for weekly downloads; for npm: see weekly downloads on the package page at `https://www.npmjs.com/package/<package>`; use <10k on PyPI / <1k on npm as thresholds)
|
|
13
|
+
- The dependency includes native code, install hooks, or system-level access
|
|
14
|
+
|
|
15
|
+
**Apply standard scrutiny** (limited checks) when:
|
|
16
|
+
- Upgrading to a version that has been published for at least 7 days, from a widely-used, established package with high adoption (>=10k weekly downloads on PyPI / >=1k on npm; e.g., pytest, requests, react, lodash)
|
|
17
|
+
- Minor or patch version bumps to packages with a history of regular releases, where the target version is at least 7 days old
|
|
18
|
+
- **Check only**: downgrades, yanked versions (target or recent versions), and presence of release notes/source tags. If you find downgrades or high-severity signals (yanked versions), immediately switch to full scrutiny and apply all checklist items below. If you find medium-severity signals (missing release notes) without other signals, note them but remain in standard scrutiny unless combined with additional concerns.
|
|
19
|
+
|
|
20
|
+
## Checklist
|
|
21
|
+
|
|
22
|
+
- **Release note and changelog gaps**: Verify a source tag exists for the version. Check `https://github.com/<org>/<repo>/releases/tag/v<version>` or run `gh release view v<version> --repo <org>/<repo>`. If there is no tag, no release notes, or an empty changelog, this is a medium-severity signal - note it in your review and escalate if the package is under full scrutiny or if combined with other signals from this checklist.
|
|
23
|
+
- **Yanked or retracted versions**: Check if the target version or nearby versions have been yanked. For PyPI: `pip index versions <package>` (yanked versions are marked with `[yanked]`). For npm: check the registry page at `https://www.npmjs.com/package/<package>/v/<version>` to see if the version is deprecated, or run `npm view <package>@<version>` (shows `deprecated` field if present). Yanked versions - whether the target or recent neighboring versions - indicate the maintainer or registry identified a problem. Investigate whether it was a security incident or a routine bad release. If any version in the range was yanked for security reasons, treat as a high-severity signal.
|
|
24
|
+
- **Brand-new releases with no adoption signal**: Check when the version was published. For PyPI: visit `https://pypi.org/project/<package>/<version>/` and check the "Released" date. For npm: run `npm view <package>@<version> time`. If published within the last 48 hours and the package is under full scrutiny (or combined with other signals per the escalation guidance below), flag it as elevated risk. Adoption signals include: download counts visible on the registry page, discussion or announcements in the project's issue tracker, mentions in security monitoring feeds (e.g., Snyk, Socket, OSV), or endorsements from maintainers in community channels.
|
|
25
|
+
- **Source-to-package divergence**: If other signals raise concern, compare the published artifact against the source. For PyPI: download the sdist/wheel from `https://pypi.org/project/<package>/<version>/#files`, extract it, clone the tagged source (`git clone --branch v<version> --depth 1 <repo-url>`), and diff: `diff -r <extracted-package>/ <repo-clone>/`. For npm: run `npm pack <package>@<version>`, extract with `tar -xzf <package>-<version>.tgz`, clone source, and compare: `diff -r package/ <repo-clone>/`. Focus your review on source files (.py for Python, .js/.ts for npm) rather than build artifacts or package metadata. Adjust paths to match the package's source layout (commonly `src/`, `lib/`, or root). Divergence in source files is a strong indicator of tampering. Request that the PR author verify and document provenance.
|
|
26
|
+
- **Unusual install-time behavior**: Watch for new post-install scripts, `.pth` files, or import-time side effects introduced by the dependency update. For npm: check for `preinstall`/`postinstall` scripts in the package's `package.json`. For Python: look for `setup.py` with code execution or `.pth` files in the distribution. These are common payload delivery mechanisms in supply chain attacks.
|
|
27
|
+
- **Cascading dependency risk**: If other signals raise concern about a dependency, check whether that dependency's own upstream dependencies have active advisories. For each upstream dependency, search `https://osv.dev/list?q=<upstream-dep-name>` or `https://security.snyk.io/package/pip/<upstream-dep-name>` (or `/npm/<upstream-dep-name>`) for known vulnerabilities. A compromised upstream tool (e.g., a CI/CD scanner or build plugin) can be used to steal publishing credentials for downstream packages.
|
|
28
|
+
|
|
29
|
+
## Escalation Guidance
|
|
30
|
+
|
|
31
|
+
Escalate to 🔴 High Risk if any high-severity signal is present: yanked/retracted versions, source-to-package divergence, or new install-time behavior (post-install scripts, `.pth` files). For medium-severity signals (brand-new release with no adoption signal, missing release notes), escalate only when combined with other signals from this checklist (medium or high severity) or when the package is under full scrutiny. If a dependency is under full scrutiny solely because the target version is newer than 7 days, do **NOT** approve until it is at least 7 days old unless it is first-party; after that, re-evaluate it using the rest of this checklist. For first-party packages, do not block solely on freshness, but still document the supply-chain risk review. For dependencies under standard scrutiny, brand-new publication alone is not sufficient to escalate - established packages with frequent release cycles routinely publish new versions.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "github-pr-review",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Post structured PR reviews to GitHub with inline comments/suggestions in a single API call.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "OpenHands",
|
|
7
|
+
"email": "contact@all-hands.dev"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/OpenHands/extensions",
|
|
10
|
+
"repository": "https://github.com/OpenHands/extensions",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"github",
|
|
14
|
+
"pull-request",
|
|
15
|
+
"review",
|
|
16
|
+
"code-review"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "github-pr-review",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Post structured PR reviews to GitHub with inline comments/suggestions in a single API call.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "OpenHands",
|
|
7
|
+
"email": "contact@all-hands.dev"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/OpenHands/extensions",
|
|
10
|
+
"repository": "https://github.com/OpenHands/extensions",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"github",
|
|
14
|
+
"pull-request",
|
|
15
|
+
"review",
|
|
16
|
+
"code-review"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "github-pr-review",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Post structured PR reviews to GitHub with inline comments/suggestions in a single API call.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "OpenHands",
|
|
7
|
+
"email": "contact@all-hands.dev"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/OpenHands/extensions",
|
|
10
|
+
"repository": "https://github.com/OpenHands/extensions",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"github",
|
|
14
|
+
"pull-request",
|
|
15
|
+
"review",
|
|
16
|
+
"code-review"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Github Pr Review
|
|
2
|
+
|
|
3
|
+
Post PR review comments using the GitHub API with inline comments, suggestions, and priority labels.
|
|
4
|
+
|
|
5
|
+
## Triggers
|
|
6
|
+
|
|
7
|
+
This skill is activated by the following keywords:
|
|
8
|
+
|
|
9
|
+
- `/github-pr-review`
|
|
10
|
+
|
|
11
|
+
## Details
|
|
12
|
+
|
|
13
|
+
# GitHub PR Review
|
|
14
|
+
|
|
15
|
+
Post structured code review feedback using the GitHub API with inline comments on specific lines.
|
|
16
|
+
|
|
17
|
+
## Key Rule: One API Call
|
|
18
|
+
|
|
19
|
+
Bundle ALL comments into a **single review API call**. Do not post comments individually.
|
|
20
|
+
|
|
21
|
+
## Posting a Review
|
|
22
|
+
|
|
23
|
+
Use the GitHub CLI (`gh`). The `GITHUB_TOKEN` is automatically available.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
gh api \
|
|
27
|
+
-X POST \
|
|
28
|
+
repos/{owner}/{repo}/pulls/{pr_number}/reviews \
|
|
29
|
+
-f commit_id='{commit_sha}' \
|
|
30
|
+
-f event='COMMENT' \
|
|
31
|
+
-f body='Brief 1-3 sentence summary.' \
|
|
32
|
+
-f comments[][path]='path/to/file.py' \
|
|
33
|
+
-F comments[][line]=42 \
|
|
34
|
+
-f comments[][side]='RIGHT' \
|
|
35
|
+
-f comments[][body]='🟠 Important: Your comment here.' \
|
|
36
|
+
-f comments[][path]='another/file.js' \
|
|
37
|
+
-F comments[][line]=15 \
|
|
38
|
+
-f comments[][side]='RIGHT' \
|
|
39
|
+
-f comments[][body]='🟡 Suggestion: Another comment.'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Parameters
|
|
43
|
+
|
|
44
|
+
| Parameter | Description |
|
|
45
|
+
|-----------|-------------|
|
|
46
|
+
| `commit_id` | Commit SHA to comment on (use `git rev-parse HEAD`) |
|
|
47
|
+
| `event` | `COMMENT`, `APPROVE`, or `REQUEST_CHANGES` |
|
|
48
|
+
| `path` | File path as shown in the diff |
|
|
49
|
+
| `line` | Line number in the NEW version (right side of diff) |
|
|
50
|
+
| `side` | `RIGHT` for new/added lines, `LEFT` for deleted lines |
|
|
51
|
+
| `body` | Comment text with priority label |
|
|
52
|
+
|
|
53
|
+
### Multi-Line Comments
|
|
54
|
+
|
|
55
|
+
For comments spanning multiple lines, add `start_line` to specify the range:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
-f comments[][path]='path/to/file.py' \
|
|
59
|
+
-F comments[][start_line]=10 \
|
|
60
|
+
-F comments[][line]=12 \
|
|
61
|
+
-f comments[][side]='RIGHT' \
|
|
62
|
+
-f comments[][body]='🟡 Suggestion: Refactor this block:
|
|
63
|
+
|
|
64
|
+
```suggestion
|
|
65
|
+
line_one = "new"
|
|
66
|
+
line_two = "code"
|
|
67
|
+
line_three = "here"
|
|
68
|
+
```'
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Important**: The suggestion must have the same number of lines as the range (e.g., lines 10-12 = 3 lines).
|
|
72
|
+
|
|
73
|
+
## Priority Labels
|
|
74
|
+
|
|
75
|
+
Start each comment with a priority label:
|
|
76
|
+
|
|
77
|
+
| Label | When to Use |
|
|
78
|
+
|-------|-------------|
|
|
79
|
+
| 🔴 **Critical** | Must fix: security vulnerabilities, bugs, data loss risks |
|
|
80
|
+
| 🟠 **Important** | Should fix: logic errors, performance issues, missing error handling |
|
|
81
|
+
| 🟡 **Suggestion** | Nice to have: better naming, code organization |
|
|
82
|
+
| 🟢 **Nit** | Optional: formatting, minor style preferences |
|
|
83
|
+
|
|
84
|
+
**Example:**
|
|
85
|
+
```
|
|
86
|
+
🟠 Important: This function doesn't handle None, which could cause an AttributeError.
|
|
87
|
+
|
|
88
|
+
```suggestion
|
|
89
|
+
if user is None:
|
|
90
|
+
raise ValueError("User cannot be None")
|
|
91
|
+
```
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## GitHub Suggestions
|
|
95
|
+
|
|
96
|
+
For small code changes, use the suggestion syntax for one-click apply:
|
|
97
|
+
|
|
98
|
+
~~~
|
|
99
|
+
```suggestion
|
|
100
|
+
improved_code_here()
|
|
101
|
+
```
|
|
102
|
+
~~~
|
|
103
|
+
|
|
104
|
+
Use suggestions for: renaming, typos, small refactors (1-5 lines), type hints, docstrings.
|
|
105
|
+
|
|
106
|
+
Avoid for: large refactors, architectural changes, ambiguous improvements.
|
|
107
|
+
|
|
108
|
+
## Finding Line Numbers
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# From diff header: @@ -old_start,old_count +new_start,new_count @@
|
|
112
|
+
# Count from new_start for added/modified lines
|
|
113
|
+
|
|
114
|
+
grep -n "pattern" filename # Find line number
|
|
115
|
+
head -n 42 filename | tail -1 # Verify line content
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Fallback: curl
|
|
119
|
+
|
|
120
|
+
If `gh` is unavailable:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
curl -X POST \
|
|
124
|
+
-H "Authorization: token $GITHUB_TOKEN" \
|
|
125
|
+
-H "Accept: application/vnd.github+json" \
|
|
126
|
+
"https://api.github.com/repos/{owner}/{repo}/pulls/{pr_number}/reviews" \
|
|
127
|
+
-d '{
|
|
128
|
+
"commit_id": "{commit_sha}",
|
|
129
|
+
"event": "COMMENT",
|
|
130
|
+
"body": "Review summary.",
|
|
131
|
+
"comments": [
|
|
132
|
+
{"path": "file.py", "line": 42, "side": "RIGHT", "body": "Comment"},
|
|
133
|
+
{"path": "file.py", "start_line": 10, "line": 12, "side": "RIGHT", "body": "Multi-line"}
|
|
134
|
+
]
|
|
135
|
+
}'
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Summary
|
|
139
|
+
|
|
140
|
+
1. Analyze the code and identify issues
|
|
141
|
+
2. Post **ONE** review with all inline comments bundled
|
|
142
|
+
3. Use priority labels (🔴🟠🟡🟢) on every comment
|
|
143
|
+
4. Use suggestion syntax for concrete code changes
|
|
144
|
+
5. Keep the review body brief (details go in inline comments)
|
|
145
|
+
6. If no issues: post a short approval message
|