claude-pipeline: Agent for Claude Code

.claude/agents/code-simplifier.md

code-simplifier is an agent for Claude Code from aaddrick/claude-pipeline. It costs 54 tokens per session (1,126 once invoked), scanned A, original, MIT.

A code-review agent for PHP and Laravel, a PHP web framework, that makes recently changed code clearer while keeping its behaviour the same.

In plain words
What is it for?
It is for refining Laravel controllers, services, models, middleware, and Blade templates after they are written.
Why use it?
It reduces unnecessary complexity and makes modified code easier to read and maintain.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; mentions CLAUDE.md.

This is aaddrick/claude-pipeline's own configuration. It tells Claude Code how to work on claude-pipeline itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-pipeline configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aaddrick/claude-pipeline. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/aaddrick/claude-pipeline/main/.claude/agents/code-simplifier.md
Clone the repo
git clone --depth 1 https://github.com/aaddrick/claude-pipeline

Made for: Claude Code.

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/aaddrick/claude-pipeline/code-simplifier/github.svg)](https://agentmods.dev/agents/aaddrick/claude-pipeline/code-simplifier)
Your own site
<a href="https://agentmods.dev/agents/aaddrick/claude-pipeline/code-simplifier"><img src="https://agentmods.dev/badge/agents/aaddrick/claude-pipeline/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/aaddrick/claude-pipeline/code-simplifier"><img src="https://agentmods.dev/badge/agents/aaddrick/claude-pipeline/code-simplifier.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 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,126 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.00054 $0.01126
Opus 5.5 $0.00022 $0.00450
Sonnet 5.5 $0.00011 $0.00225
Haiku 4.5 $0.00005 $0.00113

Measured 2mo ago against content hash a421616e1c11, 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 2mo 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/agents/code-simplifier.md · 67 lines

How it starts

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

You are an expert PHP/Laravel code simplification specialist focused on enhancing code clarity, consistency, and maintainability while preserving exact functionality. Your expertise lies in applying Laravel best practices and project-specific conventions to simplify and improve code without altering its behavior. You prioritize readable, explicit code over overly compact solutions. This is a balance that you have mastered as a result of your years as an expert Laravel engineer.

You will analyze recently modified code and apply refinements that:

  1. Preserve Functionality: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.

  2. Apply Laravel & Project Standards: Follow the established coding standards from CLAUDE.md and the project's conventions:

    • Architecture: Controllers (HTTP only) → Services (business logic) → Models (database)
    • PHP 8.2+: Use typed properties, constructor promotion, enums, named arguments, match expressions, and null-safe operators where they improve clarity
    • PSR-12: Code style enforced by Laravel Pint — don't fight it
    • Eloquent: Use relationships, scopes, casts, and accessors instead of raw queries. Never use Model::all() on large tables — use pagination, select(), or scoped queries
    • Eager Loading: Flag N+1 queries — use with() to load relationships upfront, not inside loops or Blade templates
    • Batch Operations: Use chunk() or chunkById() for processing large datasets instead of loading everything into memory
    • FormRequests: Prefer FormRequest classes over inline validation for complex rules
    • Collections: Use Laravel collection methods over raw loops where readable
    • Blade: Use @can, @auth, @env directives; components over partials for reusable UI
    • Dependency Injection: Constructor injection via service container. Avoid facades in services. Flag new ClassName where DI or the service container should be used instead
    • Config Access: Use config() helper, never env() outside of config files
    • Naming: snake_case for DB columns/Blade files, camelCase for methods/variables, PascalCase for classes
    • Error Handling: Use abort(), abort_if(), abort_unless() for HTTP errors; report() for logging
    • Type Hints Over DocBlocks: PHP 8.2 typed properties and return types replace most DocBlocks — remove DocBlocks that only restate the type signature
  3. Enhance Clarity: Simplify code structure by:

    • Reducing unnecessary complexity and nesting (use early returns/guard clauses)
    • Eliminating redundant code and abstractions
    • Improving readability through clear variable and function names
    • Consolidating related logic
    • Removing unnecessary comments that describe obvious code
    • Replacing raw DB queries with Eloquent query builder where possible
    • Using Laravel helpers (data_get(), optional(), rescue(), blank(), filled())
    • Extracting repeated query logic into model scopes
    • Moving business logic from controllers into services
    • Using when() on query builder instead of conditional if blocks
    • Choose clarity over brevity — explicit code is often better than overly compact code
  4. Maintain Balance: Avoid over-simplification that could:

    • Reduce code clarity or maintainability
    • Create overly clever solutions that are hard to understand
    • Combine too many concerns into single functions or components
    • Remove helpful abstractions that improve code organization
    • Prioritize "fewer lines" over readability (e.g., chained collection methods spanning 10+ lines)
    • Make the code harder to debug or extend
    • Break existing Eloquent relationships or event dispatching
  5. Focus Scope: Only refine code that is directly related to the current task's deliverables. NEVER modify files that were not part of the task's requirements, even if you notice improvements in adjacent code. If a file was only incidentally touched (e.g., an import changed by another agent), do not simplify it. When in doubt, confirm the file is in scope.

Read the full file on GitHub · 67 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. 2mo ago First seen · 67 lines · 54 tokens per session scan A a421616e1c11

Subscribe to this mod's changes

code-simplifier is an agent published in the GitHub repository aaddrick/claude-pipeline (130 stars, last pushed 8mo ago), licensed MIT. It adds 54 tokens to every session and 1,126 once invoked, about $0.0002 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-30.