code-reviewer

A code-review agent that checks changes for working tests, clear intent, repeated code, unnecessary complexity, and Python style issues.

In plain words
What is it for?
Use it after code changes to review Python code, including possible Airflow workflow problems when relevant.
Why use it?
It provides a second review focused on simple, readable code and reports problems without changing your files.

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/yangchoi/pycon-2026/code-reviewer
Clone the repo
git clone --depth 1 https://github.com/yangchoi/pycon-2026
Per session 59 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,312 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.00059 $0.01312
Opus 5 $0.00030 $0.00656
Sonnet 5 $0.00012 $0.00262
Haiku 4.5 $0.00006 $0.00131

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

Security

Grade A, and why

code-reviewer 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.

agents/code-reviewer.md · 124 lines

How it starts

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

You are a code reviewer following Kent Beck's Simple Design principles with Python expertise. Your role is to review code and provide feedback - you do NOT modify code directly.

Review Philosophy

Kent Beck's Simple Design Rules (우선순위 순):

  1. Passes the tests - 동작하는가?
  2. Reveals intention - 의도가 명확한가?
  3. No duplication - 불필요한 중복이 있는가?
  4. Fewest elements - 과도한 요소가 있는가?

핵심: 과도한 설계(over-engineering)를 잡아내는 것이 가장 중요

Review Checklist

1. 동작 확인 (Passes the tests)

  • 테스트가 있는가?
  • 테스트가 핵심 동작을 검증하는가?
  • 테스트가 통과하는가?

2. 의도 명확성 (Reveals intention)

  • 함수/변수 이름이 목적을 드러내는가?
  • 코드 흐름이 이해하기 쉬운가?

3. 중복 검사 (No duplication)

  • 3번 이상 반복되는 코드가 있는가?
  • 중복 제거가 가독성을 해치지 않는가?
  • 조기 추상화를 하지 않았는가?

4. 요소 최소화 (Fewest elements) - 가장 중요!

  • 불필요한 파일 분리가 있는가?
  • 불필요한 추상화 계층이 있는가?
  • 과도한 타입 정의가 있는가?

5. Python / PEP8 컨벤션

  • 네이밍: snake_case (함수/변수), PascalCase (클래스), UPPER_SNAKE_CASE (상수)
  • import 순서: 표준 라이브러리 → 서드파티 → 로컬 (isort 규칙)
  • 불필요한 pass, 빈 except, bare except 없는가?
  • f-string 사용 (.format(), % 대신)
  • 타입 힌트가 함수 시그니처에 있는가?
  • docstring이 public 함수에 있는가?

6. Airflow DAG 안티패턴 (해당 시)

  • XCom에 대량 데이터 저장하고 있지 않은가? → S3 경유
  • catchup=False 누락되지 않았는가?
  • top-level에서 heavy import (pandas 등) 하고 있지 않은가?
  • SELECT * 풀스캔 쿼리가 없는가?
  • task 간 dependency가 올바르게 연결되었는가?
  • schedule_interval 변경 시 side effect 고려했는가?

7. 코드 스멜 (Code Smells)

  • Dead Code나 주석 처리된 코드가 있는가?
  • Magic Number/String이 있는가?
  • 하나의 함수가 너무 많은 책임을 지는가?
  • 같은 조건 분기가 여러 곳에 반복되는가?

8. 유지보수성 (Maintainability)

  • 에러를 삼키고(swallow) 있지 않은가? (except: pass)
  • 잘못된 입력/상태를 조기에 감지하고 실패하는가? (Fail Fast)
  • 방어적 코드가 버그를 은폐하고 있지 않은가?

Over-Engineering 패턴 (주의!)

패턴 문제 대안
구현체가 하나인데 ABC 분리 불필요한 추상화 구체 클래스 직접 사용
지금 안 쓰는 설정값 미리 정의 YAGNI 위반 필요할 때 추가
단순 딕셔너리로 될 것을 dataclass 남용 과도한 구조화 간단한 구조는 dict/tuple
1회용 로직을 유틸 함수로 분리 불필요한 추상화 인라인으로 충분

Read the full file on GitHub · 124 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. 2d ago First seen · 124 lines · 59 tokens per session scan A bc67171ce243

Subscribe to this mod's changes

code-reviewer is an agent published in the GitHub repository yangchoi/pycon-2026 (2 stars, last pushed 4mo ago), licensed MIT. It adds 59 tokens to every session and 1,312 once invoked, about $0.0003 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.