code-simplifier

code-simplifier is a skill for Claude Code, Codex from kyto64/codex-pr-review-toolkit-minimal. It costs 24 tokens per session (692 once invoked), scanned A, original, Apache-2.0.

A code-review guide that looks for unnecessary complexity, repeated logic, and unclear structure in recently changed code. It suggests simpler alternatives without changing how the code works.

In plain words
What is it for?
Use it when reviewing a pull request, which is a proposed set of code changes, or selected files for readability and simpler control flow.
Why use it?
It helps reviewers spot maintenance problems that formatting checks or ordinary tests may miss.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Claude Code; mentions AGENTS.md.

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 skills/kyto64/codex-pr-review-toolkit-minimal/code-simplifier
Any agent
npx skills add kyto64/codex-pr-review-toolkit-minimal --skill code-simplifier
Clone the repo
git clone --depth 1 https://github.com/kyto64/codex-pr-review-toolkit-minimal

Made for: Claude Code, Codex.

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 code-simplifier

README.md
[![agentmods](https://agentmods.dev/badge/skills/kyto64/codex-pr-review-toolkit-minimal/code-simplifier.svg)](https://agentmods.dev/skills/kyto64/codex-pr-review-toolkit-minimal/code-simplifier)
Your own site
<a href="https://agentmods.dev/skills/kyto64/codex-pr-review-toolkit-minimal/code-simplifier"><img src="https://agentmods.dev/badge/skills/kyto64/codex-pr-review-toolkit-minimal/code-simplifier.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 692 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.00024 $0.00692
Opus 5 $0.00012 $0.00346
Sonnet 5 $0.00005 $0.00138
Haiku 4.5 $0.00002 $0.00069

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

Security

Grade A, and why

code-simplifier 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 5d 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.

docs/ja/skills/code-simplifier/SKILL.md · 53 lines

What it actually says

Code Simplifier (Review Mode)

変更されたコードの複雑さと明瞭さをレビューする。動作変更の提案はしない。cosmetic な整形ではなく、理解コスト・変更リスクを下げる簡潔化に集中する。pr-reviewsimplicity 観点として使う。

原典(Claude Code 版)はコードを直接書き換える agent だが、本 Skill は意図的にレビュー専用に変更している。

スコープ

PR 差分またはユーザー指定ファイルの変更部分に限定する。

レビュー観点

  1. 不要な複雑さ: 深いネスト、過剰な抽象化、ネストした三項演算子(if/else や switch を推奨)
  2. 冗長性: 重複ロジック、使われない分岐、過剰な中間変数、自明なコードを説明するだけのコメント
  3. 明瞭さ: 名前、責務の分離、読み手が追える制御フロー。簡潔さより明示性(compact な一行より explicit な数行)
  4. 規約整合: AGENTS.md や周辺コードのパターンと不揃いな書き方
  5. バランス: 過度な簡略化も指摘する — clever すぎる解、責務の混在、有用な抽象化の破壊、デバッグ・拡張が困難になる圧縮

重要度の目安

状況 重要度
理解・修正コストが著しく高い P1
明らかな冗長・ネストで保守性が下がる P2
軽微な整理余地 P3(pr-review では通常除外)

出力

### P2: [タイトル]
- File: `path`
- Lines: N-M
- Category: simplicity
- Problem: [何が複雑か]
- Impact: [保守性への影響]
- Suggested fix: [同等の振る舞いを保った簡潔化案。可能なら修正後コード例]

レビューのみ。コードの自動書き換えは行わない。

ルール

  • DO: 振る舞いを変えない簡潔化案だけを提案する
  • DO: 「行数を減らす」より「読みやすさ」を優先する
  • DO NOT: 動作変更を含むリファクタを提案する
  • DO NOT: プロジェクトの有用な抽象化を安易に削除提案する
  • DO NOT: 好みレベルのスタイル指摘を出す
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. 5d ago First seen · 53 lines · 24 tokens per session scan A ebb8082e1a26

Subscribe to this mod's changes

code-simplifier is a skill published in the GitHub repository kyto64/codex-pr-review-toolkit-minimal (1 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 24 tokens to every session and 692 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-31.