Global Coding Style

Enforce global coding style across PHP and TypeScript/JavaScript projects.

Updated Nov 15, 2025
One-click install
npx skills add https://github.com/DevanB/lucidlog --skill global-coding-style-devanb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Global Coding Style
Source: https://github.com/DevanB/lucidlog/tree/main/.claude/skills/global-coding-style
Command: npx skills add https://github.com/DevanB/lucidlog --skill global-coding-style-devanb

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of inconsistent code formatting, naming, and quality across a project, which leads to readability issues, increased bugs, and slower development. It enforces automated code quality standards, ensuring a clean, maintainable, and predictable codebase for all developers.

Core Features & Use Cases

  • Automated Formatting & Linting: Guides the use of tools like Laravel Pint and Ultracite for consistent code style.
  • Type Safety & Static Analysis: Ensures PHP and TypeScript code leverage types for robustness and catches errors early.
  • Use Case: When writing a new PHP service class, use this skill to ensure the AI applies proper naming conventions, includes explicit return types, and adheres to Laravel Pint formatting, making the code immediately ready for review.

Quick Start

Refactor the 'UserService.php' file to adhere to global coding style, including type declarations, consistent naming, and Laravel Pint formatting.

Frequently Asked Questions about Global Coding Style

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

FAQPage Schema
How do I enforce consistent code formatting across PHP and TypeScript projects?

Enforcing consistent code formatting uses automated tools like Laravel Pint for PHP and Ultracite for TypeScript/JavaScript to apply unified style rules. Configure these formatters in your project, then run them during development and pre-commit stages to standardize indentation, spacing, and naming conventions across all files automatically.

What's the best way to add type safety and static analysis to PHP codebases?

Type safety in PHP involves adding explicit return types and type hints to functions and class properties, then running static analysis tools like Larastan to catch type mismatches and errors before runtime. This approach reduces bugs and improves code reliability across large projects.

Can I set up automated code quality checks that run before commits?

Yes, configure pre-commit hooks using Lefthook to automatically run formatters, linters, and static analysis tools before each commit. This prevents code that violates your standards from entering the repository and ensures every commit meets quality requirements.

How do I prepare code for review with consistent standards?

Prepare code for review by applying global coding standards—type hints, formatting, linting, and static analysis—then use CodeRabbit CLI to automate the review preparation process. This ensures reviewers receive clean, predictable code that adheres to project conventions.

Do I need to use all these tools together, or can I adopt them incrementally?

You can adopt tools incrementally starting with formatters like Laravel Pint or Ultracite, then add linting and static analysis as your team grows. Begin with the tools most relevant to your tech stack and expand your automation pipeline over time.

What coding standards does this approach enforce?

This approach enforces explicit return types, consistent naming conventions, DRY principles, removal of dead code, and standardized formatting across PHP and TypeScript/JavaScript files. It combines automated formatting, linting, and static analysis to ensure code quality and maintainability.