submit-github-review
Submit a code review to GitHub via the GitHub API. Use this as the final step in a code review pipeline to post review findings to a PR.
What this skill does
# Submit GitHub Review Skill
An **output skill** that submits code review findings to GitHub via the API. This is the final step in the review pipeline, posting the review to the PR.
## Role
- **Format**: Transform review findings into GitHub review format
- **Submit**: Post the review via GitHub API
- **Annotate**: Add inline comments to specific lines
## Inputs
| Input | Required | Description |
|-------|----------|-------------|
| `owner` | Yes | Repository owner (username or organization) |
| `repo` | Yes | Repository name |
| `pull_number` | Yes | Pull Request number |
| `commit_id` | Yes | SHA of the commit to review (from retrieve-diff-from-github-pr) |
| `findings` | Yes | Array of review findings from specialist skills |
| `review_event` | Optional | APPROVE, REQUEST_CHANGES, or COMMENT (default: COMMENT) |
## Outputs
| Output | Description |
|--------|-------------|
| `review_id` | ID of the created review |
| `review_url` | URL to view the review |
| `comments_posted` | Number of inline comments posted |
## Required MCP Tools
This skill uses the GitHub MCP server with:
| Tool | Purpose |
|------|---------|
| `create_pull_request_review` | Submit the review with body and inline comments |
## Step 1: Aggregate Findings
Collect all findings from specialist skills:
```json
{
"findings": [
{
"severity": "blocker",
"category": "security",
"evidence": {
"file": "src/auth/login.ts",
"line": 42,
"snippet": "password = req.body.password"
},
"impact": "Password logged in plaintext",
"fix": "Remove logging or hash before logging",
"test": "Check logs for sensitive data"
}
]
}
```
## Step 2: Determine Review Event
Based on findings severity, determine the review action:
| Findings | Event | Rationale |
|----------|-------|-----------|
| Any **blocker** | `REQUEST_CHANGES` | PR should not be merged |
| Any **major** | `REQUEST_CHANGES` | Significant issues need fixing |
| Only **minor/nit** | `COMMENT` | Suggestions, not blocking |
| No issues | `APPROVE` | PR looks good |
## Step 3: Format Review Body
Create the review summary:
```markdown
## Code Review Summary
### ๐ด Blockers (X)
| File | Line | Issue |
|------|------|-------|
| src/auth/login.ts | 42 | SQL injection vulnerability |
### ๐ก Major (X)
| File | Line | Issue |
|------|------|-------|
| src/api/users.ts | 15 | Missing error handling |
### ๐ต Minor (X)
- Consider adding JSDoc to public functions
- Unused import on line 3
### ๐ Nits (X)
- Formatting: extra blank line at EOF
---
*Reviewed by codereview-skills*
```
## Step 4: Format Inline Comments
Convert findings to GitHub inline comments:
```json
{
"comments": [
{
"path": "src/auth/login.ts",
"line": 42,
"body": "๐ด **Security**: SQL injection vulnerability\n\n```suggestion\nconst user = await db.query('SELECT * FROM users WHERE id = ?', [userId]);\n```\n\n**Impact**: Attacker can execute arbitrary SQL\n**Fix**: Use parameterized queries"
}
]
}
```
### Comment Format
```markdown
<severity_emoji> **<category>**: <title>
<description>
```suggestion
<suggested fix if applicable>
```
**Impact**: <what breaks or the risk>
**Fix**: <how to fix it>
```
Severity emojis:
- ๐ด Blocker
- ๐ก Major
- ๐ต Minor
- โช Nit
## Step 5: Submit Review
Use the GitHub MCP tool:
```json
{
"tool": "create_pull_request_review",
"server": "user-github",
"arguments": {
"owner": "<owner>",
"repo": "<repo>",
"pull_number": <number>,
"commit_id": "<sha>",
"body": "<review summary>",
"event": "REQUEST_CHANGES",
"comments": [
{
"path": "src/auth/login.ts",
"line": 42,
"body": "๐ด **Security**: SQL injection..."
}
]
}
}
```
## Output Format
```json
{
"status": "success",
"review": {
"id": 12345,
"url": "https://github.com/owner/repo/pull/123#pullrequestreview-12345",
"event": "REQUEST_CHANGES",
"body": "## Code Review Summary...",
"comments_count": 5
},
"summary": {
"blockers": 1,
"major": 2,
"minor": 3,
"nits": 2,
"total": 8
}
}
```
## Full Pipeline Integration
This skill is the final step in the review pipeline:
```
1. retrieve-diff-from-github-pr
โ (PR info + diff + commit_id)
2. codereview-orchestrator
โ (triage + routing plan)
3. Specialist skills (parallel or sequential)
โ (findings array)
4. submit-github-review (this skill)
โ (posted review)
5. Return URL to user
```
## Quick Reference
```
โก Aggregate Findings
โก Collect from all specialist skills
โก Deduplicate if needed
โก Determine Event
โก Any blockers/major โ REQUEST_CHANGES
โก Only minor/nit โ COMMENT
โก No issues โ APPROVE
โก Format Body
โก Summary with severity breakdown
โก Table of issues by severity
โก Format Comments
โก Convert findings to inline comments
โก Use line numbers from evidence
โก Submit Review
โก Call create_pull_request_review
โก Return review URL
```
## Error Handling
| Error | Cause | Resolution |
|-------|-------|------------|
| 422 Invalid | Line doesn't exist in diff | Use position instead of line |
| 404 Not Found | PR or commit doesn't exist | Verify PR number and commit SHA |
| 403 Forbidden | No permission to review | Check GitHub token permissions |
## Tips
1. **Commit ID**: Always use the head commit SHA from `retrieve-diff-from-github-pr`
2. **Line vs Position**: `line` refers to the line in the new file, `position` refers to the position in the diff hunk
3. **Batch Comments**: Submit all comments in one review to avoid notification spam
4. **Suggestion Blocks**: Use GitHub's suggestion syntax for easy one-click fixes
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only โ no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.