custom-php-running-linter

Runs PHP linting and formatting on modified files using Pint.

1|Updated Apr 3, 2021
One-click install
npx skills add https://github.com/NaoyaMiyagawa/dotfiles --skill custom-php-running-linter-naoyamiyagawa
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: custom-php-running-linter
Source: https://github.com/NaoyaMiyagawa/dotfiles/tree/main/.ai/skills/custom-php-running-linter
Command: npx skills add https://github.com/NaoyaMiyagawa/dotfiles --skill custom-php-running-linter-naoyamiyagawa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? PHP codebases need consistent formatting, but manually running linters on the right files after every change is repetitive and easy to forget. This Skill standardizes how Pint is invoked so modified or specified PHP files are linted and formatted correctly every time. ## Core Features & Use Cases - Lint Modified Files Only: Runs vendor/bin/pint -p --dirty to format only files changed in the working tree. - Target Specific Paths: Runs vendor/bin/pint -p {file/directory paths} to lint chosen files or directories. - Use Case: After editing several PHP controllers in a Laravel project, ask the assistant to lint the changes, and it runs Pint on just the dirty files instead of the entire codebase. ## Quick Start Run Pint to lint and format the PHP files I just modified in this project.

Frequently Asked Questions about custom-php-running-linter

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

FAQPage Schema
How do I lint only modified PHP files with Pint?

Run vendor/bin/pint -p --dirty to lint only files with uncommitted changes in the working tree. The --dirty flag restricts Pint to modified files instead of scanning the whole project.

How to run Pint on specific files or directories?

Pass the target paths directly to Pint, for example vendor/bin/pint -p app/Models. You can specify one or more files or directories, and Pint will format only those paths.

What is Pint used for in PHP projects?

Pint is a PHP code style fixer, commonly used in Laravel projects, that automatically formats code to follow a defined style standard. It is installed via Composer and invoked as vendor/bin/pint.

Why does vendor/bin/pint not run in my project?

The command fails if Pint is not installed as a Composer dependency or if dependencies were never installed. Run composer install first and confirm laravel/pint is present in your project requirements.