smithery/valec3

backend-php-standards

PSR standards, coding conventions, and best practices for modern PHP development.

Installation

$ npx skills add smithery/valec3 --skill backend-php-standards

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/valec3 · top by installs.

npx skills add smithery/valec3

Browse all from smithery/valec3

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,429 B
  • docs SUMMARY.md 110 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Backend PHP Standards

When to use this skill

  • Starting new PHP projects
  • Code reviews
  • Establishing team standards
  • Refactoring legacy code

Workflow

  • Follow PSR-12 coding style
  • Use PSR-4 autoloading
  • Enable strict types
  • Type hint all parameters and returns
  • Use meaningful variable names

Instructions

PSR-12 Coding Style

<?php

declare(strict_types=1);

namespace App\Controllers;

use App\Services\UserService;

class UserController extends BaseController
{
    public function __construct(
        private readonly UserService $userService
    ) {}

    public function index(): string
    {
        $users = $this->userService->getAllUsers();
        return view('users/index', ['users' => $users]);
    }
}

Strict Types

<?php

declare(strict_types=1);

function calculateTotal(int $quantity, float $price): float
{
    return $quantity * $price;
}

Naming Conventions

  • Classes: PascalCase (UserController, OrderService)
  • Methods: camelCase (getUser(), createOrder())
  • Constants: UPPERSNAKECASE (MAXRETRIES, APIVERSION)
  • Properties: camelCase ($userName, $isActive)

Resources

  • PSR-1: Basic coding standard
  • PSR-12: Extended coding style
  • PSR-4: Autoloading standard