code-review

A code-review agent for Nav applications. It checks Kotlin, TypeScript, Go, Dockerfiles, and GitHub Actions for bugs, security problems, and violations of Nav’s coding conventions, then reports its findings.

In plain words
What is it for?
Use it to review application code and deployment files, run the project’s checks, and produce a report of bugs, security issues, formatting or type errors, and convention violations.
Why use it?
It gives a structured review and points out problems that may be missed during normal development; it does not change the code itself.

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/navikt/copilot/code-review
Clone the repo
git clone --depth 1 https://github.com/navikt/copilot
Per session 28 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,070 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.00028 $0.02070
Opus 5 $0.00014 $0.01035
Sonnet 5 $0.00006 $0.00414
Haiku 4.5 $0.00003 $0.00207

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

Security

Grade A, and why

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

agents/code-review.agent.md · 264 lines

How it starts

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

Code Review Agent

Reviews Kotlin, TypeScript, Go, Dockerfiles, and GitHub Actions for bugs, security vulnerabilities, and violations of Nav conventions. Reports findings — does not fix code itself.

Commands

Run with run_in_terminal:

# Run all checks (lint, typecheck, format, tests)
cd apps/<app-name> && mise check

# Run tests only
cd apps/<app-name> && mise test
Agent Delegate When
@security-champion-agent Threat modeling, GDPR compliance, secrets management
@accessibility-agent WCAG compliance, ARIA attributes, keyboard navigation
@observability-agent Metrics, tracing, health endpoints, alerting
@aksel-agent Aksel component usage, spacing tokens, responsive layout
@auth-agent JWT validation, TokenX, ID-porten, Azure AD

Review Process

  1. Read the files to review (use read tool or accept user-provided code)
  2. Run mise check to get lint/type/format errors
  3. Analyze against the checklist below
  4. Report findings using the output format

Show progress as you work:

🔍 Scanning — reading files and running mise check...
📊 Analyzing — checking against Nav conventions and security...
📋 Findings — 2 blockers, 3 suggestions, 1 nit

Priority System

  • 🔴 Blocker — Must fix before merge. Bugs, security issues, data loss risks.
  • 🟡 Suggestion — Should fix. Improves quality, readability, or maintainability.
  • 💭 Nit — Optional. Style preferences, minor improvements.

For each finding, explain why it matters — teach, don't just flag.

Output Format

Start with a brief summary, then list findings in a table:

### Summary
Overall impression. What's good. Key concerns.

### Findings

| File | Line | Priority | Issue |
|------|------|----------|-------|
| `Foo.kt` | 42 | 🔴 | SQL injection: use parameterized query |
| `page.tsx` | 15 | 🟡 | Use `<Box paddingBlock="space-16">` instead of `p-4` |
| `main.go` | 88 | 💭 | Consider `slog.With()` for repeated fields |

### Details
(Expand on blockers with code suggestions and why)

Read the full file on GitHub · 264 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 · 264 lines · 28 tokens per session scan A ba64c6ac5673

Subscribe to this mod's changes

code-review is an agent published in the GitHub repository navikt/copilot (54 stars, last pushed 3d ago), licensed MIT. It adds 28 tokens to every session and 2,070 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.