Wheels API Generator

Generate CFWheels RESTful API controllers with JSON responses and authentication.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill streamlines the creation of RESTful API controllers in CFWheels, ensuring proper JSON responses, correct HTTP status codes, and robust API authentication. It automates the boilerplate for API development, allowing you to build reliable web services faster.

Core Features & Use Cases

  • RESTful CRUD Actions: Generates index, show, create, update, and delete actions tailored for API endpoints.
  • JSON Response Handling: Ensures all API responses are correctly formatted as JSON with appropriate HTTP status codes (e.g., 200 OK, 201 Created, 404 Not Found).
  • API Authentication: Implements API authentication filters to secure your endpoints, typically using bearer tokens.
  • Use Case: Create a /api/v1/posts endpoint. This skill generates the controller with all necessary CRUD actions, ensures JSON output, and protects it with an API authentication filter, allowing you to quickly expose your data securely.

Quick Start

In API controller:

function config() { provides("json"); filters(through="requireApiAuth"); } function index() { renderWith(data=model("Resource").findAll(), format="json", status=200); }

Frequently Asked Questions about Wheels API Generator

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

FAQPage Schema
How do I generate RESTful API controllers with proper JSON responses?

RESTful API controller generation creates CRUD action templates that render JSON with correct HTTP status codes. This Skill automates scaffolding for index, show, create, update, and delete endpoints, eliminating manual boilerplate and ensuring consistent response formatting across your API.

Can I add authentication to my JSON API endpoints?

Yes. This Skill integrates API authentication filters—typically bearer token validation—directly into generated controllers. Authentication checks are applied before endpoint logic executes, securing your API without requiring separate implementation.

What HTTP status codes does the API controller generator use?

Generated controllers implement standard REST status codes including 200 OK for successful reads, 201 Created for resource creation, 404 Not Found for missing resources, and appropriate error codes. Status codes are applied automatically based on the action type.

How do I quickly scaffold a complete API endpoint for a resource?

Provide your resource definition and the generator creates a full controller with all CRUD actions, JSON rendering configuration, authentication filters, and proper status code handling. You get a production-ready endpoint structure in one step.

Does this work with CFWheels framework?

Yes. This Skill is designed specifically for CFWheels, generating controllers using CFWheels conventions for actions, filters, and rendering. It integrates directly with CFWheels model layer and routing.

What's the difference between generating APIs with this tool versus building controllers manually?

Manual construction requires writing authentication logic, status code handling, and JSON rendering for each action. Generation applies REST best practices automatically, reduces errors, and cuts development time while ensuring standardized, maintainable API structure across endpoints.