Posts or updates automated progress comments on GitHub PRs. Use after completing any PR agent phase (pre-flight, tests, gate, fix, report). Triggers on 'post comment to PR', 'update PR progress', 'comment on PR with results', 'post pre-flight comment'. Creates single aggregated review comment with collapsible sections per commit.
Quick Install
bunx add-skill dotnet/maui -s ai-summary-comment
Requires GitHub CLI (gh) authenticated with access to dotnet/maui repository.androiddesktopdotnethacktoberfestiosmaccatalyst
Instructions
Loadingβ¦
PR Comment Skill
This skill posts automated progress comments to GitHub Pull Requests during the PR review workflow. Comments are self-contained with collapsible Review Session details, providing rich context to maintainers and contributors.
β οΈ Self-Contained Rule: All content in PR comments must be self-contained. Never reference local files like CustomAgentLogsTmp/ - GitHub users cannot access your local filesystem.
β¨ Key Features:
Single Unified Comment: ONE comment per PR/Issue containing ALL sections (PR Review, Try-Fix, Write-Tests, Verify-Tests)
Section-Based Updates: Each script updates only its section, preserving others
Duplicate Prevention: Finds existing <!-- AI Summary --> comment and updates it
File-Based DryRun Preview: Use -DryRun to preview changes in a local file before posting
Auto-Loading State Files: Automatically finds and loads state files from CustomAgentLogsTmp/PRState/
Simple Interface: Just provide PR number - script handles everything else
Comment Architecture
Unified AI Summary Comment
Most scripts post to the same single comment identified by <!-- AI Summary -->. Each script updates its own section:
Path to state file (PRNumber auto-extracted from pr-XXXXX.md naming)
CustomAgentLogsTmp/PRState/pr-27246.md
Content
No*
Full state file content (legacy, can be piped via stdin)
Content from state file
DryRun
No
Preview changes in local file instead of posting to GitHub
-DryRun
PreviewFile
No
Path to local preview file for DryRun mode (default: CustomAgentLogsTmp/PRState/{PRNumber}/ai-summary-comment-preview.md)
-PreviewFile ./preview.md
SkipValidation
No
Skip validation checks (not recommended)
-SkipValidation
*At least one of PRNumber, StateFile, or Content is required. The script will:
If -PRNumber provided: Auto-load CustomAgentLogsTmp/PRState/pr-{PRNumber}.md
If -StateFile provided: Load the file and extract PRNumber from pr-XXXXX.md filename
If -Content provided: Use content directly (legacy, requires -PRNumber)
DryRun Preview Workflow
Use -DryRun to preview the combined comment before posting to GitHub. Each script updates the same preview file, mirroring how the actual GitHub comment is updated.
# Step 1: Run verify-tests script (creates preview file)
pwsh .github/skills/ai-summary-comment/scripts/post-verify-tests-comment.ps1 -PRNumber 32891 -DryRun
# Step 2: Run try-fix script (updates same preview file)
pwsh .github/skills/ai-summary-comment/scripts/post-try-fix-comment.ps1 -IssueNumber 32891 -DryRun
# Step 3: Review the combined preview
open CustomAgentLogsTmp/PRState/32891/ai-summary-comment-preview.md
# Step 4: Post for real (remove -DryRun)
pwsh .github/skills/ai-summary-comment/scripts/post-verify-tests-comment.ps1 -PRNumber 32891
pwsh .github/skills/ai-summary-comment/scripts/post-try-fix-comment.ps1 -IssueNumber 32891
Key behavior: The preview file exactly matches what will be posted to GitHub. Multiple scripts accumulate their sections in the same file.
Section Ordering
Sections appear in the unified comment in this order (based on which scripts run first):
VERIFY-TESTS - Test verification results
TRY-FIX - Alternative fix exploration attempts
WRITE-TESTS - Test writing attempts
PR-REVIEW - PR review phases
Each section is wrapped with markers like <!-- SECTION:TRY-FIX --> and <!-- /SECTION:TRY-FIX -->.
Status indicator (β Completed, β οΈ Issues Found)
Expandable review sessions (each session is a collapsible section)
What's Next (what phase happens next)
Review Session Tracking
When the same PR is reviewed multiple times (e.g., after new commits), the script updates the single aggregated review comment and adds a new expandable section for each commit-based review session.
Example Output
## π Pre-Flight: Context Gathering Complete
β **Status**: Phase completed successfully
### Summary
- **Issue**: #33356 - CollectionView crash on iOS
- **Platforms Affected**: iOS, MacCatalyst
- **Files Changed**: 2 implementation files, 1 test file
- **Discussion**: 3 key reviewer comments identified
### Key Findings
- Crash occurs when scrolling rapidly with large datasets
- Existing PR adds null check in ItemsViewController
- Test coverage includes iOS device test
### Next Steps
β **Phase 2: Tests** - Analyzing test files and coverage
---
*Posted by PR Agent @ 2026-01-17 14:23:45 UTC*
The post-try-fix-comment.ps1 script updates the <!-- SECTION:TRY-FIX --> section of the unified AI Summary comment. It aggregates all try-fix attempts into collapsible sections. Works for both issues and PRs (GitHub treats PR comments as issue comments).
β¨ Auto-Loading from CustomAgentLogsTmp: The script automatically discovers and aggregates ALL attempt directories from CustomAgentLogsTmp/PRState/{IssueNumber}/try-fix/.
Usage
Simplest: Provide attempt directory
# All parameters auto-loaded from directory structure
pwsh .github/skills/ai-summary-comment/scripts/post-try-fix-comment.ps1 `
-TryFixDir CustomAgentLogsTmp/PRState/27246/try-fix/attempt-1
Or just provide issue number
# Auto-discovers and posts latest attempt from CustomAgentLogsTmp/PRState/27246/try-fix/
pwsh .github/skills/ai-summary-comment/scripts/post-try-fix-comment.ps1 -IssueNumber 27246
Each attempt is a nested collapsible section inside the wrapper
Verify-Tests Comment Script
The post-verify-tests-comment.ps1 script updates the <!-- SECTION:VERIFY-TESTS --> section of the unified AI Summary comment. It documents test verification results (whether tests fail without fix and pass with fix).
β¨ Auto-Loading from CustomAgentLogsTmp: The script automatically loads verification results from CustomAgentLogsTmp/PRState/{PRNumber}/verify-tests-fail/verification-report.md.
Usage
Simplest: Provide PR number
# Auto-loads from CustomAgentLogsTmp/PRState/{PRNumber}/verify-tests-fail/
pwsh .github/skills/ai-summary-comment/scripts/post-verify-tests-comment.ps1 -PRNumber 32891
Path to verification report (auto-discovered if not provided)
Status
No
"Passed" or "Failed" - auto-detected from report
Platform
No
Platform tested (ios, android, etc.) - auto-detected from report
Mode
No
"FailureOnly" or "FullVerification" - auto-detected from report
DryRun
No
Preview changes in local file instead of posting
PreviewFile
No
Path to local preview file for DryRun mode
Expected Directory Structure
CustomAgentLogsTmp/PRState/{PRNumber}/verify-tests-fail/
βββ verification-report.md # Full verification report (required)
βββ verification-log.txt # Detailed log (optional)
βββ test-without-fix.log # Test output without fix (optional)
βββ test-with-fix.log # Test output with fix (optional)
Write-Tests Comment Script
The post-write-tests-comment.ps1 script updates the <!-- SECTION:WRITE-TESTS --> section of the unified AI Summary comment. It documents test writing attempts for an issue.
β¨ Auto-Loading from CustomAgentLogsTmp: The script can automatically load test details from the write-tests output directory structure.
Usage
Simplest: Provide test directory
# All parameters auto-loaded from directory structure
pwsh .github/skills/ai-summary-comment/scripts/post-write-tests-comment.ps1 `
-TestDir CustomAgentLogsTmp/PRState/27246/write-tests/attempt-1
Or just provide issue number
# Auto-discovers and posts latest attempt from CustomAgentLogsTmp/PRState/27246/write-tests/
pwsh .github/skills/ai-summary-comment/scripts/post-write-tests-comment.ps1 -IssueNumber 27246