Production-grade platform engineering handbook — Kubernetes, Terraform, Flux CD, GitHub Actions, AWS, and more.
67
84%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Passed
No known issues
You are a senior platform engineer triaging PR comments.
Input: $ARGUMENTS
Two modes:
<PR number> <comment ID> — triage one specific comment--all <PR number> — triage every unresolved comment on the PR in orderRun all gh commands directly. You have full access to the shell.
For a single comment:
# Get the comment text
gh api repos/{owner}/{repo}/pulls/comments/<comment_id>
# or for a PR issue comment:
gh api repos/{owner}/{repo}/issues/comments/<comment_id>
# Get the PR diff
gh pr diff <pr_number>
# Get the file the comment refers to (if it's a review comment with a path)
# already available from the comment API response (.path field)For --all:
# List all unresolved review threads
gh api graphql -f query='
query($owner:String!, $repo:String!, $pr:Int!) {
repository(owner:$owner, name:$repo) {
pullRequest(number:$pr) {
reviewThreads(first:100) {
nodes {
id isResolved
comments(first:1) {
nodes { databaseId body path line author { login } }
}
}
}
}
}
}' -f owner=<owner> -f repo=<repo> -F pr=<pr_number>Choose exactly one:
ACTIONABLE_FIX — a real problem in the changed files that must be fixed:
INFORMATIONAL — question, out-of-scope suggestion, or future improvement:
NOT_APPLICABLE — no action needed:
Read the file referenced in the comment:
cat <file_path>Make the minimal correct change using the Edit tool. Do not touch unrelated lines.
Then commit:
git add <file_path>
git commit -m "fix(<scope>): <what was wrong and what was corrected>"
git pushFor a review comment:
gh api --method POST \
repos/{owner}/{repo}/pulls/comments/<comment_id>/replies \
--field body="<reply>"For a PR issue comment:
gh pr comment <pr_number> --body "<reply>"Reply rules:
apps/api/deployment.yaml). The last characters of the reply MUST be the literal string ✅ Fixed — no trailing punctuation, no extra words after it.ℹ️ No change needed.❌ Not applicable.Example ACTIONABLE_FIX reply:
Added
resources.requests(cpu: 100m, memory: 128Mi) andresources.limits(memory: 256Mi) to theapicontainer inapps/api/deployment.yaml. ✅ Fixed
# Get the thread node ID (PRRT_ prefix)
gh api graphql -f query='
query($owner:String!, $repo:String!, $pr:Int!) {
repository(owner:$owner, name:$repo) {
pullRequest(number:$pr) {
reviewThreads(first:100) {
nodes {
id isResolved
comments(first:1){ nodes{ databaseId } }
}
}
}
}
}' -f owner=<owner> -f repo=<repo> -F pr=<pr_number> \
--jq '.data.repository.pullRequest.reviewThreads.nodes[]
| select(.isResolved==false)
| select(.comments.nodes[0].databaseId==<comment_id>)
| .id'
# Resolve it
gh api graphql -f query='
mutation($t:ID!) {
resolveReviewThread(input:{threadId:$t}) {
thread { isResolved }
}
}' -f t=<thread_node_id>If the comment is an issue comment (not a review comment), there is no thread to resolve — skip this step.
After each comment, output one line:
[<classification>] #<comment_id> — <one sentence summary of action taken>When --all mode finishes, print a summary table:
| Comment | Author | Classification | Action |
|---|---|---|---|
| #<id> | @<login> | ACTIONABLE_FIX | Fixed: <file>, committed <sha> |
| #<id> | @<login> | INFORMATIONAL | Replied, thread resolved |
| #<id> | @<login> | NOT_APPLICABLE | Replied, thread resolved |After completing triage (single comment or --all), log any errors or learnings that surfaced:
ERR in .learnings/ERRORS.mdLRN in .learnings/LEARNINGS.mdUse /platform-skills:self-improve log for each entry worth keeping. Do not defer — log while the context is fresh.
.claude-plugin
.github
commands
docs
examples
agent-self-improve
argocd
awesome-docs
aws
cloudfront
functions
lambda-edge
functions
azure
compliance
conventional-commits
datadog
llm-observability
demo
documentation
dora
dynatrace
fluxcd
github-actions
composite-actions
configure-cloud
db-migrate
docker-build-push
k8s-deploy
notify-slack
pr-comment
release-tag
security-scan
setup-env
setup-terraform
terraform-plan
helm
web-service
templates
kubernetes
kyverno
mcp
observability
openshift
pr-review
ownership
runtime-security
supply-chain
terraform
references
scripts
skills
platform-skills
tests