Wheels Refactoring

Official

Optimize Wheels code for peak performance.

Authorwheels-dev
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill guides developers in refactoring CFWheels code to significantly improve performance, enhance security, and increase maintainability. It provides clear patterns and best practices to address common anti-patterns like N+1 queries and insecure parameter handling.

Core Features & Use Cases

  • Performance Optimization: Provides patterns for solving N+1 query problems and implementing eager loading to reduce database calls.
  • Security Enhancement: Guides on parameter verification and SQL injection prevention to harden your application.
  • Code Quality Improvement: Offers strategies like "Extract Method" to clean up complex functions and improve readability.
  • Use Case: Your posts index page is slow due to N+1 queries. This skill shows you how to refactor your findAll() call to findAll(include="user"), drastically reducing database calls and speeding up your page, allowing users to rest while your AI works.

Quick Start

Before (N+1 query):

<cfloop query="posts">

<p>#posts.user().name#</p>

</cfloop>

After (Eager loading):

posts = model("Post").findAll(include="user");

<cfloop query="posts">

<p>#posts.userName#</p>

</cfloop>

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Wheels Refactoring
Download link: https://github.com/wheels-dev/wheels/archive/main.zip#wheels-refactoring

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository