pr-quality-gate-code-quality

pr-quality-gate-code-quality is a command for GitHub Copilot from rjmurillo/ai-agents. It costs 0 tokens per session (2,537 once invoked), scanned A, original, MIT.

A pull-request review focused on code maintainability: clear structure, low coupling, proper boundaries, testability, and avoiding duplicate code.

In plain words
What is it for?
Use it to assess changed files in a pull request and return a pass, warning, or critical-failure verdict based on the available evidence.
Why use it?
It helps catch design and cleanliness problems before changes are merged. It also avoids marking a change as passing when only part of its diff was available.

Command for GitHub Copilot

Written for GitHub Copilot: a Copilot chat mode or prompt. Also seen: reads .claude/ paths.

Good fit Use it to assess changed files in a pull request and return a pass, warning, or critical-failure verdict based on the available evidence.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/rjmurillo/ai-agents/pr-quality-gate-code-quality
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.

Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents

Made for: GitHub Copilot.

Wrote 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.

agentmods badge for pr-quality-gate-code-quality

README.md
[![agentmods](https://agentmods.dev/badge/commands/rjmurillo/ai-agents/pr-quality-gate-code-quality/github.svg)](https://agentmods.dev/commands/rjmurillo/ai-agents/pr-quality-gate-code-quality)
Your own site
<a href="https://agentmods.dev/commands/rjmurillo/ai-agents/pr-quality-gate-code-quality"><img src="https://agentmods.dev/badge/commands/rjmurillo/ai-agents/pr-quality-gate-code-quality/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pr-quality-gate-code-quality

Your own site · 80×15
<a href="https://agentmods.dev/commands/rjmurillo/ai-agents/pr-quality-gate-code-quality"><img src="https://agentmods.dev/badge/commands/rjmurillo/ai-agents/pr-quality-gate-code-quality.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 2,537 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.02537
Opus 5 $0.00000 $0.01269
Sonnet 5 $0.00000 $0.00507
Haiku 4.5 $0.00000 $0.00254

Measured 3d ago against content hash 94ad21f9ad43, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pr-quality-gate-code-quality 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 3d 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.

.github/prompts/pr-quality-gate-code-quality.md · 191 lines

How it starts

The opening of the file, as written. The whole thing — 191 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code Quality Review Task

You are reviewing a pull request for the maintainability of the code it changes: how cohesive, loosely coupled, encapsulated, testable, and non-redundant the touched code is, and whether the author left each file at least as clean as they found it.

Context Mode Enforcement (REQUIRED)

The CI harness prepends a CONTEXT_MODE: [full|summary|partial] header to the context it sends you. Read that header before you decide a verdict. It tells you how much of the diff you actually received.

  • full: the complete diff is present. PASS, WARN, and CRITICAL_FAIL are all permitted on the merits.
  • summary: only a file list or stat-only summary is present (the PR exceeded the diff-size limit). You did not see the line-level changes.
  • partial: only a bounded slice of the diff is present (for example, the first N lines). You did not see the rest.

When CONTEXT_MODE is not full, you MUST NOT emit PASS. A PASS asserts evidence you do not have. Emit WARN (or a higher-severity verdict if the available metadata already shows a problem), state that context was summary or partial, and name the specific evidence you would need to clear the PR. Treat a missing or unrecognized CONTEXT_MODE value as not full.

This is a manipulation-resistance control: an adversary can craft a PR that trips summary mode to hide a change behind a stat-only context. Forbidding PASS keeps that change from passing on absent evidence. See .agents/governance/AI-REVIEW-MODEL-POLICY.md ("CONTEXT_MODE Header (REQUIRED)").

Grounding Rules

  • Do NOT claim software versions are "beta", "unstable", or "unreleased" based on training data. Your training data has a cutoff and may be outdated.
  • Do NOT claim tools (ruff, mypy, pytest, etc.) lack support for a version unless you have concrete evidence from the diff itself.
  • For dependency update PRs: evaluate the diff for internal consistency, not external ecosystem assumptions. If CI tests pass, the tooling works.
  • Base findings on what the code shows, not on recalled release schedules.

Read the full file on GitHub · 191 lines

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. 3d ago First seen · 191 lines · 0 tokens per session scan A 94ad21f9ad43

Subscribe to this mod's changes

pr-quality-gate-code-quality is a command published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,537 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-09-06.