mcpField
L
laravel-custom-helpers

laravel-custom-helpers

github.com/noartemDevelopment1372 installsUpdated 3w ago
Repository

About laravel-custom-helpers

A short Laravel development skill for developers adding custom PHP helper functions to an application. It covers creating a helper file, Composer autoload configuration, and guidelines for keeping helpers small and stateless.

Key features

  1. 01Creates a PHP helper file
  2. 02Configures Composer file autoloading
  3. 03Runs composer dump-autoload
  4. 04Recommends small, pure helpers
  5. 05Suggests value objects for domain logic

Use cases

  1. 01Add shared helper functions to Laravel
  2. 02Autoload helper files through Composer
  3. 03Keep utility functions free of hidden state

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/noartem/skills --skill laravel-custom-helpers

After installing, type/laravel-custom-helpersin Claude Code to confirm it loaded.

Details

From the project README

Custom Helpers

Create a helper file

// app/Support/helpers.php
function money(int $cents): string { return number_format($cents / 100, 2); }

Autoload

Add to composer.json:

{
  "autoload": { "files": ["app/Support/helpers.php"] }
}

Run composer dump-autoload.

Guidelines

  • Keep helpers small and pure; avoid hidden IO/state
  • Prefer static methods on value objects when domain-specific

Comments

Markdown supported