code-cleanup-agent

Externalize inline CSS and organize PHP functions into a centralized library.

Updated Jan 5, 2026
One-click install
npx skills add https://github.com/rwHiveAqua/advisor --skill code-cleanup-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-cleanup-agent
Source: https://github.com/rwHiveAqua/advisor/tree/main/.claude/skills/code-cleanup-agent
Command: npx skills add https://github.com/rwHiveAqua/advisor --skill code-cleanup-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers tidy legacy PHP projects by moving inline CSS into dedicated CSS files, extracting reusable PHP functions to a central library, and providing a framework for safely removing unused code.

Core Features & Use Cases

  • CSS Extraction: Detects and externalizes inline styles from PHP pages into page-specific or global CSS files.
  • Function Organization: Migrates PHP functions to a structured _fun/ directory with accompanying documentation and imports.
  • Safe Cleanup: Provides guidelines and checklists to identify dead code and minimize runtime impact.

Quick Start

Instructs the agent to scan the Advisor project, create _css/login.css and _css/dashboard.css, move references in login.php and index.php, and update PHP files to load the new external styles.

Frequently Asked Questions about code-cleanup-agent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract inline CSS from PHP files into external stylesheets?

To extract inline CSS from PHP files, the Skill scans your project, creates dedicated page-specific CSS files like _css/login.css, moves the styles, and updates PHP files to load the new external stylesheets.

What is the best way to organize scattered PHP functions into a centralized library?

Organizing PHP functions involves migrating them to a structured _fun/ directory with accompanying documentation and imports, creating a centralized library to tidy legacy PHP projects and improve maintainability.

How do I safely identify and clean up dead code in a legacy PHP web project?

Safe dead code cleanup uses provided guidelines and checklists to identify unused code and minimize runtime impact, ensuring a testable change workflow that verifies external CSS loading and proper file inclusion.

Can I use this code cleanup approach for any PHP project or only specific ones like Advisor?

While the Skill targets PHP-based web projects like Advisor, the underlying approach of CSS extraction, function organization, and safe dead-code cleanup is applicable to general legacy PHP project maintenance.

Does externalizing CSS from PHP files require manual stylesheet linking?

Externalizing CSS automates the update process; the Skill modifies PHP files to load the new external styles automatically, ensuring proper file inclusion without manual stylesheet linking.

Why move inline styles out of PHP pages during web maintenance?

Moving inline styles out of PHP pages during web maintenance separates concerns, externalizes CSS into dedicated files, and centralizes PHP functions to tidy legacy projects and improve code readability.