Wheels Controller Generator

Generate CFWheels MVC controllers with CRUD actions and filters.

203|108|Updated Jan 13, 2011
One-click install
npx skills add https://github.com/wheels-dev/wheels --skill wheels-controller-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Wheels Controller Generator
Source: https://github.com/wheels-dev/wheels/tree/main/.claude/skills/wheels-controller-generator
Command: npx skills add https://github.com/wheels-dev/wheels --skill wheels-controller-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solves? This Skill streamlines the creation of CFWheels MVC controllers, ensuring proper structure, standard CRUD actions, essential filters, and robust parameter verification. It significantly reduces boilerplate code and prevents common controller-related errors, letting you build application logic faster.

Core Features & Use Cases

  • CRUD Action Generation: Quickly scaffold index, show, new, create, edit, update, and delete actions.
  • Filter Implementation: Easily add beforeAction/afterAction filters for authentication, authorization, and data loading.
  • Parameter Verification: Securely validate incoming parameters to prevent injection vulnerabilities.
  • Use Case: Generate a UsersController with all standard CRUD actions, complete with parameter verification for id and an authenticate filter to protect sensitive user data, saving hours of manual coding and ensuring security best practices.

Quick Start

Example: Basic controller structure

component extends="Controller" { function config() { verifies(only="show", params="key", paramsTypes="integer"); } function index() { resources = model("Resource").findAll(); } }

Frequently Asked Questions about Wheels Controller Generator

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

FAQPage Schema
How do I generate CRUD controllers in CFWheels without writing boilerplate code?

CRUD controller generation automates creation of index, show, new, create, edit, update, and delete actions with proper structure and parameter verification. This Skill scaffolds complete controllers with standard Wheels patterns, reducing manual coding and enforcing security best practices like CSRF protection and parameter validation.

How do I add authentication filters to my CFWheels controllers?

Controller filters implement beforeAction and afterAction logic for authentication and authorization. This Skill generates filter structures that protect sensitive actions, validate user permissions before execution, and load required data—preventing unauthorized access to controller actions.

What's the best way to validate incoming parameters in CFWheels controllers?

Parameter verification in controllers prevents injection vulnerabilities by type-checking and validating incoming data before processing. This Skill enforces parameter verification at the controller level, securing integer IDs and other inputs against malformed or malicious requests.

Can I use this controller generator with existing CFWheels applications?

Yes, the controller generator integrates with CFWheels MVC applications to enhance or modify existing controllers. It applies when creating new controllers or adding CRUD actions, filters, and parameter checks to existing ones without breaking current code.

Does CFWheels controller generation include CSRF protection?

Yes, generated controllers enforce CSRF protection as part of correct controller structure. This Skill ensures form submissions and state-changing actions include proper token validation, preventing cross-site request forgery attacks.

Why should I use code generation for MVC controllers instead of writing them manually?

Controller code generation eliminates repetitive boilerplate, enforces consistent structure and security patterns, and prevents common errors like missing parameter validation or filter implementation. Generated controllers follow Wheels conventions, saving hours while ensuring application reliability.