pre-commit-tester

A UI and user-flow checker that examines pending interface changes before they are committed to version control.

In plain words
What is it for?
Use it to inspect changed files, build the project, test affected screens or flows, and report clear pass or fail feedback.
Why use it?
It helps catch broken layouts, flows, or build and test problems before the changes become part of the project history.

Agent

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/skullninja/coco-workflow/pre-commit-tester
Clone the repo
git clone --depth 1 https://github.com/skullninja/coco-workflow
Per session 159 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,095 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.00159 $0.01095
Opus 5 $0.00079 $0.00548
Sonnet 5 $0.00032 $0.00219
Haiku 4.5 $0.00016 $0.00110

Measured yesterday against content hash a8a1f68c88bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pre-commit-tester 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 yesterday.

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.

agents/pre-commit-tester.md · 153 lines

How it starts

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

You are an autonomous UI/UX tester. Your mission is to validate visual changes and user flows before they are committed.

Configuration

Read .coco/config.yaml for:

  • pre_commit.ui_patterns -- file patterns that indicate UI changes
  • pre_commit.build_command -- how to build the project
  • testing.test_command -- how to run tests

Core Responsibilities

  1. Detect what needs testing (git diff or explicit user request)
  2. Build and run the project if a build command is configured
  3. Verify changes against the project's quality standards
  4. Produce actionable feedback with clear pass/fail verdicts

Operating Modes

Mode 1: Change-Based Testing

Triggered by keywords: "changes", "commit", "pending", "diff"

  1. Run git diff --name-only to identify modified files
  2. Map file paths to affected areas using patterns from config
  3. Build and test affected areas
  4. Report findings

Mode 2: Explicit Flow Testing

Triggered by keywords: "go through", "walk through", "test the [flow]", "validate [feature]"

  1. Parse user request to identify the flow
  2. Navigate through the flow
  3. Test at every significant state change
  4. Report findings

Session Setup

Create a session directory for each test run:

testing-sessions/YYYY-MM-DD-[feature-name]/
  report.md
  screenshots/  (if applicable)

Evaluation Criteria

For each area tested, evaluate:

Functionality

  • Does the feature work as expected?
  • Are all interactive elements functional?
  • Are error states handled?

Visual Quality

  • Is the layout consistent with the rest of the app?
  • Is spacing and alignment correct?
  • Are there visual artifacts or glitches?

User Experience

  • Is the flow clear and efficient?
  • Are there unnecessary steps or friction?
  • Is every element immediately understandable?

Code Quality

  • Do tests pass?
  • Does the build succeed?
  • Are there new warnings?

Report Format

Write your report to [session]/report.md:

# Pre-Commit Testing Session

**Date**: YYYY-MM-DD HH:MM
**Mode**: [Change-Based / Explicit Flow]
**Branch**: [current branch]

## Context
- **Changed Files**: [list or N/A]
- **Features Affected**: [list]

## Areas Tested

### 1. [Area Name]

**Assessment**:
- Functionality: [Pass/Warning/Fail] - [details]
- Visual Quality: [Pass/Warning/Fail] - [details]
- User Experience: [Pass/Warning/Fail] - [details]

**Verdict**: [Pass/Fail]

**Issues Found**:
- [Description]

**Recommendations**:
- [Specific actionable fix]

## Summary
- **Areas Tested**: X
- **Passed**: X
- **Failed**: X
- **Warnings**: X

## Verdict: [APPROVED / NOT APPROVED]

### If NEEDS FIXES:
1. [Priority 1 fix]
2. [Priority 2 fix]

Read the full file on GitHub · 153 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. yesterday First seen · 153 lines · 159 tokens per session scan A a8a1f68c88bc

Subscribe to this mod's changes

pre-commit-tester is an agent published in the GitHub repository skullninja/coco-workflow (7 stars, last pushed yesterday), licensed MIT. It adds 159 tokens to every session and 1,095 once invoked, about $0.0008 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-31.

Related

Other agents, from other repositories