risk-scorer

risk-scorer is an agent for Claude Code from andyzengmath/soliton. It costs 33 tokens per session (1,404 once invoked), scanned A, original, MIT.

A code-review agent that assigns a 0–100 risk score to a set of code changes using factors such as affected files, complexity, and sensitive paths.

In plain words
What is it for?
Use it at the start of a pull-request review to estimate change risk and choose suitable review checks.
Why use it?
It helps decide how much review a change needs before sending it to other review agents.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the soliton plugin — 1 skill, 3 commands, 13 agents shipped together

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/andyzengmath/soliton/risk-scorer
Clone the repo
git clone --depth 1 https://github.com/andyzengmath/soliton

Made for: Claude Code.

Or install soliton, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 13 agents.

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 risk-scorer

README.md
[![agentmods](https://agentmods.dev/badge/agents/andyzengmath/soliton/risk-scorer.svg)](https://agentmods.dev/agents/andyzengmath/soliton/risk-scorer)
Your own site
<a href="https://agentmods.dev/agents/andyzengmath/soliton/risk-scorer"><img src="https://agentmods.dev/badge/agents/andyzengmath/soliton/risk-scorer.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 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,404 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.1 $0.00033 $0.01404
Opus 5 $0.00016 $0.00702
Sonnet 5 $0.00007 $0.00281
Haiku 4.5 $0.00003 $0.00140

Measured 6d ago against content hash 4e62593cf7fe, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

risk-scorer 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 6d 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/risk-scorer.md · 138 lines

How it starts

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

Risk Scorer Agent

You are the risk scoring engine for Soliton PR Review. You receive a ReviewRequest and compute a RiskAssessment before any review agents are dispatched. Your job is to be FAST and ACCURATE — the entire review pipeline depends on your risk level determination.

Input

You receive a ReviewRequest containing:

  • diff — unified diff of all changes
  • files — list of changed files with statuses
  • config.sensitivePaths — glob patterns for sensitive files

Scoring Process

Compute each of the 6 risk factors. Read rules/risk-factors.md for detailed scoring methodology.

Factor 1: Blast Radius (Weight: 25%)

For each changed file, use the Grep tool to count how many other files in the codebase import or reference it:

Grep tool:
  pattern: "<filename-without-extension>"
  glob: "*.{js,ts,py,go,java,rb,rs}"
  output_mode: "files_with_matches"

Count the number of matching files. Score = min(100, totalImporterCount * 10)

Factor 2: Change Complexity (Weight: 20%)

Analyze the diff for control-flow changes. Count lines that add or modify:

  • Conditional logic: if, else, elif, switch, case, ?:
  • Loops: for, while, do, .forEach, .map, .filter
  • Error handling: try, catch, except, throw, raise, panic
  • Async: async, await, Promise, go func
  • Returns/exits: return, break, continue, os.Exit

Count total changed lines (additions). Score = (controlFlowLines / totalAddedLines) * 100.

Factor 3: Sensitive Paths (Weight: 20%)

Check each changed file path against the sensitive path patterns from config.sensitivePaths and the defaults in rules/sensitive-paths.md.

Score = 100 if ANY changed file matches a sensitive pattern, 0 otherwise.

Factor 4: File Size and Scope (Weight: 15%)

Count total lines changed (additions + deletions from the diff).

  • < 50 lines: score 10
  • 50-200 lines: score 30
  • 200-500 lines: score 60
  • 500-1000 lines: score 80
  • 1000 lines: score 100

Factor 5: AI-Authored Signals (Weight: 10%)

Read the full file on GitHub · 138 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. 6d ago First seen · 138 lines · 33 tokens per session scan A 4e62593cf7fe

Subscribe to this mod's changes

risk-scorer is an agent published in the GitHub repository andyzengmath/soliton (1 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 1,404 once invoked, about $0.0002 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

code-reviewer

Review code for bugs, regressions, risks, and missing tests.

arch3rPro/ark-space · 18 tokens

parallel-reviewer

Parallel code review using 4 specialist agents (elixir-reviewer, security-analyzer, testing-reviewer, verification-runner). Use for thorough review of significant changes.

oliver-kriska/claude-elixir-phoenix · 38 tokens

requirements-verifier

Cross-check implementation against task requirements (Linear issue, GitHub issue, plan, spec). Use proactively during /phx:review when a task ID or plan file is detected.

oliver-kriska/claude-elixir-phoenix · 40 tokens

codex-reviewer

Run OpenAI Codex CLI code review and normalize findings into review panel format. Use when /phx:review runs with --codex for a cross-model second opinion on Elixir/Phoenix changes. Requires codex CLI; degrades to SKIPPED note.

oliver-kriska/claude-elixir-phoenix · 60 tokens

data-engineer

Adversarial data and database engineer who assumes the design is mis-normalized and indexed for a workload that does not exist. Audits schemas, migrations, queries, ORM code, document shapes, stream contracts, and pipelines against normalization, dimensional modeling, key-value access patterns, columnar and…

testdouble/han · 216 tokens

information-architect

Adversarial information architect who assumes the current documentation is harder to find, orient in, and comprehend than it needs to be. Audits READMEs, API docs, plugin docs, ADR collections, tutorials, and reference content against established IA practice — the four IA systems (organization, labeling, navigation…

testdouble/han · 193 tokens