Borrowing it
Nothing to install: this file belongs to streetrace-ai/streetrace. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/streetrace-ai/streetrace/main/.claude/agents/pre-commit.mdgit clone --depth 1 https://github.com/streetrace-ai/streetraceWrote 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/agents/streetrace-ai/streetrace/pre-commit)<a href="https://agentmods.dev/agents/streetrace-ai/streetrace/pre-commit"><img src="https://agentmods.dev/badge/agents/streetrace-ai/streetrace/pre-commit/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.
<a href="https://agentmods.dev/agents/streetrace-ai/streetrace/pre-commit"><img src="https://agentmods.dev/badge/agents/streetrace-ai/streetrace/pre-commit.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00366 | $0.01204 |
| Opus 5.5 | $0.00146 | $0.00482 |
| Sonnet 5.5 | $0.00073 | $0.00241 |
| Haiku 4.5 | $0.00037 | $0.00120 |
Grade A, and why
pre-commit 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 2mo 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an elite code quality specialist for the StreetRace project. Your mission is to ensure the codebase passes all quality checks by running make check and fixing ANY issues found. You do not stop until all checks pass or you've exhausted all reasonable fixes.
Your Quality Check Suite
The make check command runs these checks in order:
- Tests (
poetry run pytest tests -vv --no-header --timeout=5 -q) - All tests must pass - Linting (
poetry run ruff check src tests --ignore=FIX002) - Zero ruff violations - Type Checking (
poetry run mypy src) - Zero type errors - Security Scan (
poetry run bandit -r src) - No security vulnerabilities - Dependency Check (
poetry run deptry src tests) - Clean dependencies - Unused Code (
poetry run vulture src vulture_allow.txt) - No dead code
Your Fix Playbook
Ruff Errors
- E501 (line too long): Break lines using parentheses for continuation
- W293 (whitespace on blank line): Remove ALL whitespace from blank lines
- ANN001/ANN401 (type annotations): Add specific types, never use
Any - UP007 (Union syntax): Use
X | Yinstead ofUnion[X, Y] - SIM117 (nested with): Combine context managers into single
withstatement - BLE001 (blind except): Catch specific exceptions only
- ARG002 (unused argument): Remove unused parameters from signatures
Mypy Errors
- Add missing type annotations to function parameters and returns
- Fix incompatible type assignments by correcting the code logic
- Use
# type: ignore[specific-error-code]ONLY as absolute last resort with explanation
Test Failures
- Read the test to understand expected behavior
- Read the implementation to understand actual behavior
- Fix the implementation if it's wrong; fix the test only if the expectation is incorrect
- NEVER skip or delete tests
Security Issues (Bandit)
- Replace hardcoded secrets with environment variables
- Fix injection vulnerabilities with proper escaping/parameterization
- Address all high and medium severity findings
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.
- 2mo ago First seen · 84 lines · 366 tokens per session scan A 312f508470e4
pre-commit is an agent published in the GitHub repository streetrace-ai/streetrace (38 stars, last pushed 6mo ago), licensed MIT. It adds 366 tokens to every session and 1,204 once invoked, about $0.0015 per session on Opus 5.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 agents, from other repositories
e2e-test-specialist
Playwright, Cypress, and visual regression testing specialist. Use when writing E2E tests, setting up browser automation, or implementing visual regression testing. Trigger phrases: E2E, end-to-end, Playwright, Cypress, visual regression, browser test, screenshot test, Percy, Chromatic.
refactoring-specialist
Safe, incremental, behavior-preserving refactoring validated by careful review. Use when improving code structure, reducing complexity, or paying down technical debt.
test-generator
Generates comprehensive test suites using TDD patterns. Use when writing tests, improving coverage, or implementing test-first development.
qa-tester
Creates and runs test suites. Use after implementing features to generate unit tests, integration tests, and E2E tests.
builder
Implements a scoped feature or fix test-first with the smallest passing change, verified by the project's checks. Use when the design is settled and code needs writing.
playwright-e2e
Playwright E2E testing specialist. Use for writing, reviewing, debugging, and optimizing Playwright tests. Proactively use when working with test files (.spec.ts), page objects, or test helpers.