class-refactoring — community class-refactoring, php-skeleton, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Ideal for PHP Analysis Agents requiring advanced code optimization and refactoring capabilities for stateless PHP classes Basic skeleton for new php packages

pekral pekral
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The class-refactoring skill by pekral is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Ideal for PHP Analysis Agents requiring advanced code optimization and refactoring capabilities for stateless PHP classes

Core Value

Empowers agents to perform comprehensive class refactoring using PHPDoc for PHPStan, focusing on recently modified code and preserving functionality while ensuring clean, modern, and optimized code, all while adhering to strict rules loaded from .cursor/rules/.*mdc files

Capabilities Granted for class-refactoring

Refactoring PHP classes for improved code coverage
Analyzing and completing TODO list tasks in PHP projects
Optimizing PHP code for better performance and readability

! Prerequisites & Limits

  • Requires access to .cursor/rules/.*mdc files for rule loading
  • PHP environment only
  • No increase in public API surface without strong justification
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

class-refactoring

Install class-refactoring, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

Constraint:

  • First, load all the rules for the cursor editor (.cursor/rules/.*mdc).

Steps:

  • Analyze the class and complete the TODO list tasks.

  • Verify code coverage after refactoring.

  • Preserve functionality — change how, not what.

  • Focus on recently modified code unless instructed otherwise.

  • No increase in public API surface without strong justification

  • Clean, modern, optimized code.

  • Stateless PHP classes.

  • Collections over foreach where appropriate.

  • PHPDoc for PHPStan analysis.

  • English comments only.

  • Spatie DTOs instead of arrays (except Job constructors).

  • Laravel helpers over native PHP when appropriate.

  • DRY principle — eliminate duplicates.

  • Remove obvious comments; keep PHPStan-relevant docs.

  • Single Responsibility Principle.

  • Extract private methods if body exceeds ~30 lines.

  • No single-use variables.

  • Extract intention-revealing private methods

  • Separate orchestration layer from business logic

  • Split by responsibility

  • Centralize business rules

  • Business logic duplication is not allowed.

  • Method signatures must remain expressive and minimal.

  • Match test variable names to actual use cases.

  • New tests must cover relevant code.

  • Remove coverage files after verification.

    Do not:

  • Modify existing tests (unless refactoring requires it for consistency).

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is class-refactoring?

Ideal for PHP Analysis Agents requiring advanced code optimization and refactoring capabilities for stateless PHP classes Basic skeleton for new php packages

How do I install class-refactoring?

Run the command: npx killer-skills add pekral/php-skeleton. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for class-refactoring?

Key use cases include: Refactoring PHP classes for improved code coverage, Analyzing and completing TODO list tasks in PHP projects, Optimizing PHP code for better performance and readability.

Which IDEs are compatible with class-refactoring?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for class-refactoring?

Requires access to .cursor/rules/.*mdc files for rule loading. PHP environment only. No increase in public API surface without strong justification.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add pekral/php-skeleton. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use class-refactoring immediately in the current project.

Related Skills

Looking for an alternative to class-refactoring or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI