renderSkillReport() function formats skill findings for GitHub PR reviews and check run summaries.
Function Signature
Skill report from
runSkill().Rendering options (see below).
RenderOptions
Control output formatting and filtering:Only include findings at or above this severity:
'high'- Only high severity'medium'- Medium and high'low'- All findings (default)'off'- No findings (empty output)
Only include findings at or above this confidence level:
'high'- Only high confidence'medium'- Medium and high'low'- All findings (default)'off'- No filtering
Severity threshold for determining review event type (
REQUEST_CHANGES vs COMMENT).Whether to use
REQUEST_CHANGES review event when failOn threshold is met.If false, always uses COMMENT event (non-blocking).Limit the number of findings in the output. Remaining findings are linked via
checkRunUrl.Include suggested fixes as GitHub suggestion blocks:
Group findings by file in summary comment.
URL to GitHub Check run containing full report. Used when
maxFindings limits output.Total number of findings before filtering. Used to show “X more findings” link.
Original findings for
failOn evaluation. Use when report.findings has been modified (e.g., deduplicated).Return Value
Formatted output for GitHub:
GitHubReview
PR review with inline comments.
undefined if:- No findings with location
reportOn === 'off'- All findings filtered out
Review event type:
REQUEST_CHANGES- WhenfailOnthreshold met andrequestChanges=trueCOMMENT- Default (non-blocking)APPROVE- Never used (dismissal handled separately)
Review body text. Contains:
- Findings without location (general issues)
- Fallback message for
REQUEST_CHANGESwhen all findings belowreportOn
Inline review comments:
Summary Comment
Markdown comment for Check run or PR summary. Includes:
- Skill name header
- Summary text
- Severity counts table
- Grouped/flat findings list
- Link to full report (if findings hidden)
- Cost and timing stats footer
Example: Basic Usage
Example: Post to GitHub
Example: With maxFindings
Comment Format
Inline Comment Structure
Each inline comment includes:Summary Comment Structure
Review Event Logic
The review event is determined byfailOn and requestChanges:
Examples
Filtering Logic
Findings are filtered in this order:- Severity filtering (
reportOn) - Only include findings at/above threshold - Confidence filtering (
minConfidence) - Only include high-confidence findings - Limit (
maxFindings) - Truncate to max count
The
failOn threshold is always evaluated against the original findings (or allFindings if provided), ensuring that blocking behavior isn’t affected by reportOn or deduplication.Deduplication Markers
Each inline comment includes a hidden HTML marker for deduplication across workflow runs:- Detect duplicate comments from previous runs
- Update existing comments instead of creating new ones
- Clean up stale comments when findings are resolved
Cost Footer
The summary includes a compact stats footer:- Finding count
- Total cost in USD
- Duration in seconds
- Token usage (input + output, with cache hits)
Edge Cases
No Findings
Findings Without Location
General findings (no file/line) appear in review body:Mixed Findings
Locationless findings go in review body, located findings in comments:Related Functions
runSkill()- Generate skill reportsfilterFindings()- Filter findings by severity/confidenceshouldFail()- Check blocking status