pr-preflight

A pre-merge checker for a Keryx pull request, meaning a proposed code change that is waiting to be added to the main branch. It runs required version, lint, test, and test-coverage checks in order.

In plain words
What is it for?
Use it before merging Keryx changes. It checks package version bumps, runs Bun linting and type checks, runs the full test suite, looks for stale processes, and reviews whether changed code has related tests.
Why use it?
It identifies blocking problems before a pull request is merged. It also warns when changed source code has no corresponding test changes and reports failures with their locations.

Agent for Claude Code

Install

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.

agentmods
npx agentmods add agents/actionhero/keryx/pr-preflight
Clone the repo
git clone --depth 1 https://github.com/actionhero/keryx

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 468 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00468
Opus 5 $0.00000 $0.00234
Sonnet 5 $0.00000 $0.00094
Haiku 4.5 $0.00000 $0.00047

Measured 2d ago against content hash 1d2d0b51977f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pr-preflight 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 2d 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.

.claude/agents/pr-preflight.md · 71 lines

What it actually says

PR Preflight

Run all pre-merge checks for a Keryx pull request. This agent validates that a branch is ready to merge.

Instructions

Run these checks in order. Stop early and report if a blocking issue is found.

1. Version bump check

Read packages/keryx/package.json and compare the "version" field against the main branch:

git diff main -- packages/keryx/package.json

If the version has NOT been bumped, report this as a blocking issue. Every PR must bump the version (patch for bug fixes, minor for new features).

2. Lint check

Run from the repo root:

bun lint

This runs tsc type checking and biome check across all workspaces. Report any failures.

3. Test check

Run the full test suite:

bun tests

Before running, check for stale bun keryx processes:

ps aux | grep "bun keryx" | grep -v grep

Report any test failures with file paths and error details.

4. Test coverage check

Verify that changed code has corresponding test changes:

git diff main --name-only

If source files in packages/keryx/ or example/backend/ were modified but no test files (__tests__/**) were added or changed, flag this as a warning. Every code change should include tests.

5. Docs sync check

Use the docs-sync agent to check whether documentation needs updating based on the code changes in this branch. Report any findings from that agent.

6. Summary

Provide a final summary table:

Check Status Details
Version bump pass/fail current version
Lint pass/fail error count if any
Tests pass/fail pass/fail/skip counts
Test coverage pass/warn list of uncovered files
Docs sync pass/warn list of stale docs

Mark the overall result as Ready to merge or Blocked with the specific issues that need fixing.

Changes

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.

  1. 2d ago First seen · 71 lines · 0 tokens per session scan A 1d2d0b51977f

Subscribe to this mod's changes

pr-preflight is an agent published in the GitHub repository actionhero/keryx (33 stars, last pushed 10d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 468 tokens. 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.