code-simplifier

code-simplifier is an agent for Claude Code from pablo-albaladejo/kaiord. It costs 18 tokens per session (1,400 once invoked), scanned A, original, MIT.

A review agent that makes code easier to read and maintain while preserving its behavior.

In plain words
What is it for?
Use it to find complexity hotspots and receive suggested simplified versions of the code.
Why use it?
It identifies unnecessary complexity, repeated logic, and unclear patterns without changing what the code does.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Part of the pr-review-toolkit plugin — 1 command, 5 agents shipped together

Good fit Use it to find complexity hotspots and receive suggested simplified versions of the code.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/pablo-albaladejo/kaiord/code-simplifier
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.

Clone the repo
git clone --depth 1 https://github.com/pablo-albaladejo/kaiord

Made for: Claude Code.

Or install pr-review-toolkit, the plugin that ships this one along with the rest of its 1 command, 5 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 code-simplifier

README.md
[![agentmods](https://agentmods.dev/badge/agents/pablo-albaladejo/kaiord/code-simplifier/github.svg)](https://agentmods.dev/agents/pablo-albaladejo/kaiord/code-simplifier)
Your own site
<a href="https://agentmods.dev/agents/pablo-albaladejo/kaiord/code-simplifier"><img src="https://agentmods.dev/badge/agents/pablo-albaladejo/kaiord/code-simplifier/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.

agentmods 80×15 button for code-simplifier

Your own site · 80×15
<a href="https://agentmods.dev/agents/pablo-albaladejo/kaiord/code-simplifier"><img src="https://agentmods.dev/badge/agents/pablo-albaladejo/kaiord/code-simplifier.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 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,400 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00018 $0.01400
Opus 5.5 $0.00007 $0.00560
Sonnet 5.5 $0.00004 $0.00280
Haiku 4.5 $0.00002 $0.00140

Measured 1mo ago against content hash f31eb614a5b3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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.

.claude/plugins/pr-review-toolkit/agents/code-simplifier.md · 287 lines

How it starts

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

You are a code simplification expert. Your goal: make code clearer, simpler, and more maintainable WITHOUT changing behavior.

Your Mission

Simplify code by:

  1. Reducing complexity - Eliminate unnecessary nesting and branches
  2. Improving clarity - Make intent obvious at a glance
  3. Removing redundancy - DRY violations, repeated logic
  4. Enhancing consistency - Align with codebase patterns

Core Principles

Simplicity ≠ Shorter

  • Fewer lines isn't always better
  • Clarity beats cleverness
  • Explicit beats implicit

Preserve Behavior

  • NEVER change functionality
  • Keep all edge cases
  • Maintain error handling

Real Improvements

  • Significant clarity gains
  • Meaningful complexity reduction
  • Not just style preferences

Analysis Process

For each file:

  1. Identify complexity hotspots
  2. Find redundancy and duplication
  3. Spot overly clever code
  4. Check consistency with codebase
  5. Provide refactored version

Output Format

File: path/to/file.ts:lineNumber
Complexity: [High/Medium/Low]
Issue: [What makes this complex]

Current Code:
[Original code]

Simplified Code:
[Refactored version]

Benefits:
- [Specific improvement 1]
- [Specific improvement 2]

Preserved:
- [Behavior/edge case preserved]

What to Simplify

Unnecessary Nesting

// Complex - Hard to follow
function processUser(user: User | null) {
  if (user) {
    if (user.active) {
      if (user.email) {
        return sendEmail(user.email);
      } else {
        throw new Error("No email");
      }
    } else {
      throw new Error("Inactive");
    }
  } else {
    throw new Error("No user");
  }
}

// Simple - Early returns
function processUser(user: User | null) {
  if (!user) throw new Error("No user");
  if (!user.active) throw new Error("Inactive");
  if (!user.email) throw new Error("No email");
  return sendEmail(user.email);
}

Redundant Conditionals

// Complex - Unnecessary boolean
function isValid(value: string) {
  if (value.length > 0) {
    return true;
  } else {
    return false;
  }
}

// Simple - Direct return
function isValid(value: string) {
  return value.length > 0;
}

Read the full file on GitHub · 287 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. 1mo ago First seen · 287 lines · 18 tokens per session scan A f31eb614a5b3

Subscribe to this mod's changes

code-simplifier is an agent published in the GitHub repository pablo-albaladejo/kaiord (9 stars, last pushed today), licensed MIT. It adds 18 tokens to every session and 1,400 once invoked, about $0.0001 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-31.

Related

Other agents, from other repositories

pre-commit-reviewer

Use this agent to review code changes before committing and pushing to a PR. This agent analyzes diffs for bugs, style issues, dead code, missing tests, and alignment with target repository conventions. Use as a fallback when the PR review toolkit is unavailable, or dispatch directly for standalone pre-commit review.…

costajohnt/oss-autopilot · 243 tokens

workflow-quality

Use this agent when you need expert guidance on Output SDK implementation patterns, code quality, and best practices. Invoke when writing or reviewing workflow code, troubleshooting implementation issues, or ensuring code follows SDK conventions.

growthxai/output · 43 tokens

ts-enforcer

TypeScript strict mode enforcement — no any types, schema-first at trust boundaries, type vs interface discipline, strict tsconfig audit.

bdfinst/agentic-dev-team · 29 tokens

typescript-software-architect-review

Expert TypeScript software architect that provides Clean Architecture, Domain-Driven Design (DDD), Node.js patterns, and modern TypeScript frameworks guidance. Reviews TypeScript codebases for architectural integrity, proper separation of concerns, and best practices across Express, Fastify, NestJS, and other…

giuseppe-trisciuoglio/developer-kit · 89 tokens

sdd-tester

Runs the project's verification suite (type-check, lint, tests) and reports pass/fail with concrete failures. Use AFTER the implementer finishes a task and BEFORE the verifier. Read-only on source. Stack-agnostic — reads the commands from .memory/30-tech.md.

chohra-med/expo_boilerplate · 61 tokens

typescript-reviewer

TypeScript-specific code reviewer focusing on type safety, async patterns, and frontend best practices. Use after implementing TypeScript code to catch TypeScript-specific issues.

DmitriyYukhanov/claude-plugins · 35 tokens