pr-hygiene

pr-hygiene is an agent for Claude Code from ErkanBarin/playwright-agent-mcp-starter. It costs 21 tokens per session (591 once invoked), scanned A, original, MIT.

A pull-request checker that reviews test tags, leftover focused or skipped tests, logging, waits, URLs, secrets, selectors, and file names. A pull request is a proposed code change submitted for review.

In plain words
What is it for?
Use it to inspect pull requests for missing test tags, .only or unexplained .skip markers, console statements, hardcoded waits, URLs or secrets, weak selectors, and naming violations.
Why use it?
It catches common review and test-quality problems before a change is merged, using a pass/fail checklist.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to inspect pull requests for missing test tags, .only or unexplained .skip markers, console statements, hardcoded waits, URLs or secrets, weak selectors, and naming violations.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/erkanbarin/playwright-agent-mcp-starter/pr-hygiene
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/ErkanBarin/playwright-agent-mcp-starter

Made for: Claude Code.

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-hygiene

README.md
[![agentmods](https://agentmods.dev/badge/agents/erkanbarin/playwright-agent-mcp-starter/pr-hygiene/github.svg)](https://agentmods.dev/agents/erkanbarin/playwright-agent-mcp-starter/pr-hygiene)
Your own site
<a href="https://agentmods.dev/agents/erkanbarin/playwright-agent-mcp-starter/pr-hygiene"><img src="https://agentmods.dev/badge/agents/erkanbarin/playwright-agent-mcp-starter/pr-hygiene/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-hygiene

Your own site · 80×15
<a href="https://agentmods.dev/agents/erkanbarin/playwright-agent-mcp-starter/pr-hygiene"><img src="https://agentmods.dev/badge/agents/erkanbarin/playwright-agent-mcp-starter/pr-hygiene.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 591 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.00021 $0.00591
Opus 5 $0.00010 $0.00296
Sonnet 5 $0.00004 $0.00118
Haiku 4.5 $0.00002 $0.00059

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

Security

Grade A, and why

pr-hygiene 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 10d 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.

ai/agents/pr-hygiene.md · 80 lines

What it actually says

PR Hygiene Agent

You check pull request quality and adherence to project standards. Run all checks and output a pass/fail checklist.

Checks

1. Test Tags

Every test file must have appropriate tags (@ui, @api, @smoke, @regression).

Grep for: test\( in tests/**/*.spec.ts

Flag tests without any tag in the description.

2. No .only or .skip Left Behind

Grep for: test\.only\|describe\.only\|\.skip\(

These should never be committed (unless .skip has an accompanying comment explaining why).

3. No console.log

Grep for: console\.log\|console\.warn\|console\.error

Flag any console statements that aren't in utility/helper files.

4. No Hardcoded Waits

Grep for: waitForTimeout\|sleep\(

All waits must use proper Playwright assertions or wait helpers.

5. No Hardcoded URLs or Secrets

Grep for: http://\|https:// (excluding example.com, playwright.dev, github.com)
Grep for: password.*=.*['"](?!.*example\|.*placeholder\|.*test)

6. Proper Selectors

Grep for: page\.locator\(['"]\.
Grep for: xpath=

Flag CSS class selectors and XPath — suggest role-based or test-id alternatives.

7. File Naming Convention

  • Test files: *.spec.ts
  • Page objects: *.page.ts
  • Utilities: camelCase .ts
  • Fixtures: *.fixture.ts

8. Import Consistency

Tests should import test and expect from fixtures, not directly from @playwright/test.

Output Format

# PR Hygiene Report

| # | Check | Status | Details |
|---|-------|--------|---------|
| 1 | Test tags present | PASS/FAIL | ... |
| 2 | No .only/.skip | PASS/FAIL | ... |
| 3 | No console.log | PASS/FAIL | ... |
| 4 | No hardcoded waits | PASS/FAIL | ... |
| 5 | No hardcoded URLs | PASS/FAIL | ... |
| 6 | Proper selectors | PASS/FAIL | ... |
| 7 | File naming | PASS/FAIL | ... |
| 8 | Import consistency | PASS/FAIL | ... |

**Overall: X/8 checks passed**
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. 10d ago First seen · 80 lines · 21 tokens per session scan A 929b13dafb73

Subscribe to this mod's changes

pr-hygiene is an agent published in the GitHub repository ErkanBarin/playwright-agent-mcp-starter (43 stars, last pushed 6mo ago), licensed MIT. It adds 21 tokens to every session and 591 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

pr-creator

Use for creating and editing pull requests via gh pr create, gh pr edit, gh pr view, gh pr diff, and gh pr list. Does NOT merge or mark ready (use pr-merger for that). A Bash command denied by the harness permission system is surfaced to the operator, never reshaped to evade the denial.

axiomantic/spellbook · 75 tokens

consistency-and-history

Analyze git history and cross-file consistency — stale references, dead code, broken importers after renames/removals, established-convention enforcement.

ncoevoet/claude-review-all · 34 tokens

author-code-review

Fetches open PRs, reads review comments (including CoderabbitAI), identifies actionable code changes, implements fixes, and pushes commits.

openshift-online/gcp-hcp · 32 tokens

fe-git-operator

Dedicated git operations — splitting commits, safe staging that preserves the user's pre-existing index, writing Conventional Commits bodies (fix = symptom/cause/fix, feat = addition/core/impact), and pushing the branch. fe-pr-author owns PRs; this agent owns commits and the push. Destructive commands forbidden.

sh5623/fe-rail · 69 tokens

engineer

Use this agent for code exploration, architecture design, refactoring analysis, git operations, and code review. Use when: User asks to explore code, design architecture, refactor, commit/PR, or review changes. Do NOT use when: User needs test generation (use qa-engineer), security audit (use security-scanner), or…

Zate/cc-plugins · 174 tokens

supervisor-final-judge

Final Release Judge. Use only when the Supervisor coordinator dispatches this independent role.

ma-nucho-pro/supervisor-claude-plugin · 22 tokens