orbit-pre-commit

Check staged WordPress plugin files for PHP errors, JSON validity, and debug outputs.

2|1|Updated Apr 20, 2026
One-click install
npx skills add https://github.com/adityaarsharma/orbit --skill orbit-pre-commit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orbit-pre-commit
Source: https://github.com/adityaarsharma/orbit/tree/main/skills/orbit-pre-commit
Command: npx skills add https://github.com/adityaarsharma/orbit --skill orbit-pre-commit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires php, and includes scripts (resource) components.

What problem does it solve?

The Orbit pre-commit hook solves the problem of manual code review and validation for WordPress plugins, ensuring code quality and security before every commit.

Core Features & Use Cases

  • Code Linting: Checks for common PHP errors and issues in staged files.
  • JSON Validation: Ensures JSON files are syntactically correct.
  • Debug Detection: Identifies and blocks debug outputs like var_dump, console.log, and debugger.
  • API Version Warning: Warns if block.json apiVersion is not up to date with WordPress version.
  • Use Case: Use this skill to maintain high code quality and security standards in your WordPress plugin development workflow.

Quick Start

Install the pre-commit hook for your plugin with the command: bash ~/Claude/orbit/scripts/install-pre-commit-hook.sh

Frequently Asked Questions about orbit-pre-commit

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

FAQPage Schema
How do I set up a pre-commit hook for WordPress plugin code validation?

Run a pre-commit hook installation script to validate staged PHP files for syntax errors, JSON validity, and debug outputs before committing WordPress plugin code. This requires the PHP CLI installed locally to execute the validation checks.

What does a WordPress pre-commit hook check for in staged files?

A WordPress pre-commit hook checks staged files for common PHP errors, JSON syntax validity, leftover debug outputs like var_dump, and outdated apiVersion in block.json files to maintain code quality and security before committing.

Do I need PHP CLI to run commit validation on WordPress plugins locally?

Yes, you need the PHP CLI installed in your local development environment to execute the commit validation scripts. The hook relies on PHP to lint staged files, validate JSON syntax, and detect debug outputs before every commit.

Can a pre-commit hook block debug outputs like var_dump in WordPress plugins?

Yes, a pre-commit hook can detect and block debug outputs like var_dump, console.log, and debugger in WordPress plugins. It scans staged files for these statements and prevents the commit to maintain clean code quality standards.

How do I check if block.json apiVersion is up to date with WordPress?

Run a pre-commit validation hook that warns if the apiVersion in your block.json file is not up to date with the current WordPress version. This ensures your block API usage remains compatible with WordPress standards.