add-command

Create or modify artisan commands in a GitHooks Laravel Zero project.

9|Updated Apr 12, 2020
One-click install
npx skills add https://github.com/Wtyd/githooks --skill add-command-wtyd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-command
Source: https://github.com/Wtyd/githooks/tree/main/.claude/skills/add-command
Command: npx skills add https://github.com/Wtyd/githooks --skill add-command-wtyd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a guided approach to create or modify artisan commands within GitHooks, clarifying where commands live (app/Commands) and how they are auto-discovered via config/commands.php.

Core Features & Use Cases

  • Defines command types (Flow/Job, Hook, Config, Status/Info, Build, Legacy) and their primary DI.
  • Demonstrates how to create, sign, and register new commands within a Laravel Zero-based GitHooks project.
  • Shows how to ensure commands are auto-discovered and properly registered for execution.

Quick Start

Create a new command class under app/Commands with a valid signature and description, then ensure it is auto-discovered by the config/commands.php.

Frequently Asked Questions about add-command

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

FAQPage Schema
How do I create artisan commands in a Laravel Zero project?

To create Laravel Zero commands, add a new class under the app/Commands directory with a valid signature and description. The framework automatically discovers and registers these commands for execution via the config/commands.php file.

What types of GitHooks commands can I build using Laravel Zero?

You can build Flow/Job, Hook, Config, Status/Info, Build, and Legacy GitHooks commands. Each command type utilizes specific dependency injection bindings to streamline CLI development and execution within the project.

How are artisan commands auto-discovered in a GitHooks project?

Artisan commands are auto-discovered through the config/commands.php configuration file. Placing your command classes in the app/Commands directory ensures they are automatically registered and available for execution without manual registration.

How do I configure dependency injection and error handling for CLI commands?

You configure DI bindings and error handling by specifying command signatures and validating execution within the command class. This ensures commands are correctly executed, properly validated, and discoverable in the app/Commands directory.

What testing practices should I follow when modifying GitHooks artisan commands?

Testing practices for GitHooks commands should ensure they are properly validated and discoverable by config/commands.php. Validate command signatures and DI bindings to confirm correct execution and error handling before deployment.