Agent skill · Backend & API

api-controller

Create a new Laravel API controller following this project's patterns. Use when creating new API endpoints, CRUD controllers, or backoffice controllers.

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill api-controller --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 4 KB
Bundled scripts: none
Path: skills/api/api-controller/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Create API Controller Create a new Laravel API controller for `$ARGUMENTS` following this project's established patterns. ## Project Patterns ### Controller Location - Public API controllers: `app/Http/Controllers/` - Auth controllers: `app/Http/Controllers/Auth/` ### Standard Controller Structure ```php <?php namespace App\Http\Controllers; use App\Models\{ModelName}; use App\Http\Resources\{ModelName}Resource; use App\Http\Resources\{ModelName}Collection; use App\Http\Requests\{ModelName}StoreRequest; use Illuminate\Http\Request; use Illuminate\Support\Facades\Cache; class {ModelName}Controller extends Controller { // GET /api/{resource} - List all public function index() { return new {ModelName}Collection({ModelName}::all()); } // GET /api/{resource}/{id} - Show one public function show($id) { return new {ModelName}Resource({ModelName}::findOrFail($id)); } // POST /api/{resource} - Create public function store({ModelName}StoreRequest $request) { $model = {ModelName}::create($request->validated()); // Invalidate cache if using caching Cache::forget('{resource}-all'); return new {ModelName}Resource($model); } // PUT /api/{resource}/{id} - Update public function update(Request $r

What's inside
Steps it walks through
  1. Project Patterns
  2. Controller Location
  3. Standard Controller Structure
  4. Caching Pattern (used in InventoryController, CategoryController)
  5. Filtering Pattern (used in InvoiceController, SalesController)
  6. Pusher Broadcasting (for real-time updates)
  7. Backoffice Controller Pattern
  8. Steps
  9. Route Registration Pattern
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the api-controller skill do?

Create a new Laravel API controller following this project's patterns. Use when creating new API endpoints, CRUD controllers, or backoffice controllers.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill api-controller --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going