KS
Killer-Skills

class-refactoring — Categories.community

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/4/2026

Quality Score

Top 5%
18
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add pekral/php-skeleton/class-refactoring

Agent Capability Analysis

The class-refactoring MCP Server by pekral is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion.

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 MCP Server

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
Project
SKILL.md
1.3 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
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).

Related Skills

Looking for an alternative to class-refactoring or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

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
Communication

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
Communication