Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/channinglua/prax-agent/pr-triagenpx skills add ChanningLua/prax-agent --skill pr-triagegit clone --depth 1 https://github.com/ChanningLua/prax-agentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/channinglua/prax-agent/pr-triage)<a href="https://agentmods.dev/skills/channinglua/prax-agent/pr-triage"><img src="https://agentmods.dev/badge/skills/channinglua/prax-agent/pr-triage.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00034 | $0.02476 |
| Opus 5 | $0.00017 | $0.01238 |
| Sonnet 5 | $0.00007 | $0.00495 |
| Haiku 4.5 | $0.00003 | $0.00248 |
Grade A, and why
pr-triage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 248 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PR Triage Bot
Prax 的杀手锏在这:不只"让 LLM 看 diff 给点评",而是真的 checkout 出来、真的跑测试、真的看新增依赖有没有 CVE。结果比纯 LLM 评论可信一个量级。
何时触发
- 用户粘 PR URL 或说"triage #42"
- cron 每天早上 8 点扫 open PRs
- GitHub webhook 触发(需要额外 hook 配置,本 skill 不负责触发)
输入
- 必需:PR URL 或
#NNN(本仓库的话)或 PR 分支名 - 可选:仓库路径(默认当前 cwd)
预检(不满足就停)
# 1. 在 git 仓库里
git rev-parse --show-toplevel
# 2. 有 gh CLI 吗?
command -v gh && gh auth status 2>/dev/null
没 gh 时走 降级路径(见 Step 2b)。没 git 仓库直接报错。
输出
一份 markdown 审查笔记:
.prax/pr-triage/pr-<NNN>-<YYYYMMDD-HHMMSS>.md
不自动 approve / merge / close / comment 到 GitHub。所有外部动作都必须用户明确再触发一次。
工作流程
Step 1:拿 PR metadata
# 完整路径
gh pr view <url> --json number,title,body,files,author,baseRefName,headRefName,additions,deletions,commits
# 提炼
NUM=$(echo $JSON | jq -r '.number')
TITLE=$(echo $JSON | jq -r '.title')
BASE=$(echo $JSON | jq -r '.baseRefName')
HEAD=$(echo $JSON | jq -r '.headRefName')
STATS="+$(echo $JSON | jq -r '.additions'),-$(echo $JSON | jq -r '.deletions')"
FILES=$(echo $JSON | jq -r '.files | length')
Step 2:拿 diff 本体
gh pr diff <url> > /tmp/pr-<NUM>.diff
wc -l /tmp/pr-<NUM>.diff
Step 2b:gh 不可用的降级
没 gh CLI 时:
# 本仓库的 PR:如果本地 remotes 里有 pull/<num>/head refspec
git fetch origin pull/<NUM>/head:pr-<NUM> 2>/dev/null
git diff origin/<base>...pr-<NUM> > /tmp/pr-<NUM>.diff
如果连 fetch 也不行(外网受限)→ 退化成只读远端分支名模式,不跑测试,只产出分类 + 手动审查清单。
Step 3:分类(硬枚举)
用 PR title + 首个 commit message + files-changed 启发式:
| 分类 | 证据 |
|---|---|
feature |
title 含 feat(...) / 新文件多 / +100 以上 |
bug |
title 含 fix(...) / 行数均衡增删 |
refactor |
title 含 refactor / 纯结构调整 |
chore |
title 含 chore / 仅 config/yaml |
docs |
仅 *.md 变更 |
hotfix |
含 hotfix 或 urgent |
一个 PR 可以多标签,取最强一个作为主分类。
Step 4:风险评分
硬规则,每触发一条加一分:
| 规则 | 分数 |
|---|---|
| patch > 500 行 | +2 |
| patch > 1000 行 | +3(累加) |
| 触达 >10 个文件 | +2 |
改 package.json/requirements.txt/Cargo.toml/go.mod 且有新增依赖 |
+2 |
改 auth/security/permission/middleware 相关文件 |
+2 |
改 CI / .github/workflows/ |
+2 |
| 改数据库迁移文件 | +3 |
| PR body 空 | +1 |
| 没测试伴随(仅 src 没 test) | +2 |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 248 lines · 34 tokens per session scan A 7a4c4263cfea
pr-triage is a skill published in the GitHub repository ChanningLua/prax-agent (272 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 2,476 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
code-review-github
GitHub PR workflow orchestration for code review — list PRs, post comments, apply labels, and guarded auto-merge.
review-backlog-killer
Detect pull requests aging past warn / critical thresholds, score severity, and nudge reviewers via Slack DM, channel, email, or directly as a PR comment — with one-time auto-escalation when a PR hits critical so velocity stops leaking through review queues.
developer-code-organization
Code organization patterns, file structure guidelines, WASM build variants, and string processing conventions for gh-aw Go code.
developer-release
Release management, changeset workflow, firewall log parsing, breaking CLI change rules, and Go module summaries for gh-aw.
error-messages
Write consistent, actionable validation error messages in gh-aw.
gh-agent-session
Use gh agent-session commands to inspect and manage agent sessions.