humanmade/claude-code-standards/run-linters

Claude Code and agent skill by humanmade/claude-code-standards

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Discover and run a project's linters — PHPCS, PHPStan, ESLint, Stylelint. Use when asked to lint, run the linters, check code quality, run static analysis, fix coding standard violations, or verify changes before opening a pull request. Prefers the project's own composer or npm script over calling the binary.

Install

npx vskill@latest install humanmade/claude-code-standards/run-linters

SKILL.md

Run Project Linters

When asked to run linters, check code quality, or verify changes:

1. Discover Available Linters

Check for configuration files to determine which linters are available:

PHP Linting
  • phpcs.xml or phpcs.xml.dist → PHPCS available
  • phpstan.neon or phpstan.neon.dist → PHPStan available
JavaScript Linting
  • .eslintrc.* or eslint.config.* → ESLint available
CSS/SCSS Linting
  • .stylelintrc* → Stylelint available

2. Check for Lint Scripts

Look in composer.json and package.json for predefined lint commands:

composer.json scripts:

json
{
"scripts": {
"lint": "phpcs && phpstan analyse",
"phpcs": "phpcs",
"phpstan": "phpstan analyse",
"fix": "phpcbf"
}
}

package.json scripts:

json
{
"scripts": {
"lint": "eslint . && stylelint '**/*.scss'",
"lint:js": "eslint .",
"lint:css": "stylelint '**/*.scss'",
"lint:fix": "eslint . --fix"
}
}

3. Run Linters Based on Changed Files

Determine what type of files were changed and run appropriate linters:

For PHP Changes
bash
# If composer script exists:
composer run phpcs
# Or directly:
vendor/bin/phpcs path/to/changed/files
# For static analysis:
composer run phpstan
# Or:
vendor/bin/phpstan analyse path/to/changed/files
For JavaScript/TypeScript Changes
bash
# If npm script exists:
npm run lint:js
# Or directly:
npx eslint path/to/changed/files
For CSS/SCSS Changes
bash
# If npm script exists:
npm run lint:css
# Or directly:
npx stylelint "path/to/changed/**/*.scss"
For All Changes
bash
# Run all available linters
composer run lint # PHP linters
npm run lint # JS/CSS linters

4. For Altis Projects

Run linters through the local server:

bash
# PHP linting in Altis context
composer server cli -- eval-file .claude/lint-runner.php
# Or if PHPCS is available locally:
composer run phpcs

5. Report and Fix

After running linters:

  1. Report findings - Summarize errors and warnings by category
  2. Offer auto-fix - If available, offer to run:
  • composer run fix or vendor/bin/phpcbf for PHP
  • npm run lint:fix or npx eslint --fix for JS
  • npx stylelint --fix for CSS/SCSS
  1. Manual fixes - For issues that can't be auto-fixed, explain what needs to change

Common Issues and Fixes

PHPCS
  • Missing docblocks → Add appropriate PHPDoc comments
  • Incorrect spacing → Usually auto-fixable with phpcbf
  • Naming conventions → Rename to match standards
ESLint
  • Unused variables → Remove or prefix with underscore
  • Missing dependencies in hooks → Add to dependency array
  • Prefer const → Change let to const where possible
Stylelint
  • Color format → Convert to preferred format
  • Selector specificity → Refactor to reduce nesting
  • Unknown properties → Check for typos or vendor prefixes

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/humanmade/claude-code-standards/run-linters/badge)](https://verified-skill.com/skills/humanmade/claude-code-standards/run-linters)

Something wrong with this skill or its page? Tell us.