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.
curl -O https://raw.githubusercontent.com/aaddrick/claude-pipeline/main/.claude/agents/code-simplifier.mdgit clone --depth 1 https://github.com/aaddrick/claude-pipelineWrote 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.
[](https://agentmods.dev/agents/aaddrick/claude-pipeline/code-simplifier)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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:
-
Preserve Functionality: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
-
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()orchunkById()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,@envdirectives; components over partials for reusable UI - Dependency Injection: Constructor injection via service container. Avoid facades in services. Flag
new ClassNamewhere DI or the service container should be used instead - Config Access: Use
config()helper, neverenv()outside of config files - Naming:
snake_casefor DB columns/Blade files,camelCasefor methods/variables,PascalCasefor 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
-
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 conditionalifblocks - Choose clarity over brevity — explicit code is often better than overly compact code
-
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
-
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.
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.
- 2mo ago First seen · 67 lines · 54 tokens per session scan A a421616e1c11
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.
Other agents, from other repositories
php-reviewer
Expert PHP code reviewer specializing in PSR-12 compliance, PHP type system, Eloquent ORM patterns, security, and performance. Use for all PHP code changes. MUST BE USED for PHP projects.
fixture-reviewer
Checks .test fixtures for drift after a compiler change.
laravel-reviewer
Laravel 13 and PHP 8.3+ (8.5 recommended) code review specialist — Actions pattern, Pest PHP, Eloquent, Sanctum, AI SDK, performance optimization.
php-reviewer
PHP 8.5 and Clean Architecture code review specialist — DDD, hexagonal, PER-CS 3.0, PHPStan, security analysis.
symfony-reviewer
Symfony 8.1 / PHP 8.4+ (8.5 recommended) code review specialist — DDD, Doctrine, CQRS, API Platform.
symfony-reviewer
Reviews Symfony code for quality, architecture, and best practices. Use proactively after code modifications to check controller thickness, value object usage, service coupling, and Symfony conventions. Triggers on code review, quality audit, or architecture check requests.