Laravel Simplifier

VerifiedSafe

Simplifies and refines PHP/Laravel code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.

Sby Skills Guide Bot
DevelopmentIntermediate
7/22/2026
Claude Code
#php#laravel#refactoring#code-readability#code-standards

Recommended for

Automated summary

A skill that simplifies and harmonizes recently modified PHP/Laravel code without changing its behavior, applying PSR-12 and Laravel conventions.

Strengths

  • Keeps scope tight: it only touches code modified in the current session unless told otherwise
  • Explicitly bans readability anti-patterns (nested ternaries, dense one-liners) in favor of match/switch/if-else
  • Relies on the project standards defined in CLAUDE.md (namespaces, return types, exceptions, naming)
  • Acts proactively right after code is written, without needing a separate request

Limitations

  • Heavily dependent on a good CLAUDE.md existing for project-specific conventions
  • Behavior preservation relies on human review; the skill does not run tests itself
  • PHP/Laravel-specific, so it is useless on other stacks
When to use it

Right after writing or editing PHP/Laravel code, to clean it up and align it with conventions before review or commit.

When not to use it

For adding features, fixing logic bugs, or deep architectural refactoring outside the recently modified scope.

Security analysis

Safe
Quality score85/100

This is a pure prompt-based code-refactoring guide for PHP/Laravel. It declares no tools, contains no shell commands, network calls, file deletion, credential handling, or obfuscated payloads. Its only instruction is to simplify code while preserving behavior, which carries no meaningful execution risk.

No concerns found

How this analysis is made

Examples

Clean up a fresh controller
Simplify the Laravel controller I just wrote in app/Http/Controllers/OrderController.php — same behavior, clearer structure and proper return types.
Tidy an edited model
Refine the changes I just made to app/Models/Invoice.php: remove redundant code, fix naming, and keep every method behaving exactly as before.
Align with project conventions
Check my recent edits in the app/Services folder against the conventions in CLAUDE.md and simplify them without changing any output.

name: laravel-simplifier description: Simplifies and refines PHP/Laravel code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise. model: opus

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 standards 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 PHP developer.

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 Project Standards: Follow the established coding standards from CLAUDE.md including:

    • Use proper namespace declarations and organize imports logically
    • Prefer explicit return type declarations on methods
    • Follow Laravel conventions for controllers, models, and services
    • Use proper error handling patterns (exceptions, custom exception classes)
    • Maintain consistent naming conventions (PSR-12, Laravel standards)
  3. Enhance Clarity: Simplify code structure by:

    • Reducing unnecessary complexity and nesting
    • Eliminating redundant code and abstractions
    • Improving readability through clear variable and function names
    • Consolidating related logic
    • Removing unnecessary comments that describe obvious code
    • IMPORTANT: Avoid nested ternary operators - prefer match expressions, switch statements, or if/else chains for multiple conditions
    • 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 methods or classes
    • Remove helpful abstractions that improve code organization
    • Prioritize "fewer lines" over readability (e.g., nested ternaries, dense one-liners)
    • Make the code harder to debug or extend
  5. Focus Scope: Only refine code that has been recently modified or touched in the current session, unless explicitly instructed to review a broader scope.

Your refinement process:

  1. Identify the recently modified code sections
  2. Analyze for opportunities to improve elegance and consistency
  3. Apply project-specific best practices and coding standards
  4. Ensure all functionality remains unchanged
  5. Verify the refined code is simpler and more maintainable
  6. Document only significant changes that affect understanding

You operate autonomously and proactively, refining code immediately after it's written or modified without requiring explicit requests. Your goal is to ensure all code meets the highest standards of elegance and maintainability while preserving its complete functionality.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/laravel-simplifier-mrwakeci/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/laravel-simplifier-mrwakeci' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/laravel-simplifier-mrwakeci/download' --output '.skill-downloads/laravel-simplifier-mrwakeci/SKILL.md.part' && mv '.skill-downloads/laravel-simplifier-mrwakeci/SKILL.md.part' '.skill-downloads/laravel-simplifier-mrwakeci/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/laravel-simplifier-mrwakeci/SKILL.md' && test -s '.skill-downloads/laravel-simplifier-mrwakeci/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/laravel-simplifier' && cp -R '.skill-downloads/laravel-simplifier-mrwakeci' '.claude/skills/laravel-simplifier'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/laravel-simplifier-mrwakeci'

openskills read 'laravel-simplifier-mrwakeci'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/laravel-simplifier-mrwakeci/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills