/nette-dev:php-coding-standardsfrom nette-dev
PHP coding standards for Nette repos: TABs, single quotes, strict_types, PER Coding Style modifications, use statement ordering, and naming conventions. Invoke before writing or modifying any PHP code.
Ships in nette-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The Nette repositories are checked by DressCode with the dresscode.neon in their root. Install it globally using /php-fixer:install-php-fixer; after that, PHP files are automatically fixed when edited, by that configuration - see the php-auto-fixer skill for editing workflow rules (especially use statement ordering).
declare(strict_types=1)@, == and != carries a comment saying it is deliberate, see belowexceptions.php file, and multiple enums into enums.php@, == and !=DressCode reports these operators unless their line ends with a comment in exactly this form:
@unlink($tmp); // @ file may not exist
$content = @file_get_contents($file); // @ is escalated to exception
if ($v != null) { // intentionally !=, skips null and empty string
// @ <reason>: the concrete cause and why it is harmless (a file that may not exist, a disabled function), never a vague may trigger error; lower case, no dash, colon or full stop. is escalated to exception only where the code really checks the result and throws// intentionally == or // intentionally !=, the operator being the one on the line; a reason after a comma only where the intent is not obviousIO, DB), PascalCase/camelCase for longer ones (Http, Xml)ArrayIterator)getProvider(), not provider(). A verb is the usual form; the exceptions are settled conventions, namely static factories (fromFile()), conversions (toArray()), interface methods (jsonSerialize()) and fluent interfaces whose names echo the domain rather than an action, as a query builder echoes SQL clausesis*/has*/can*; a boolean property is named by the state itself ($active), never $isActiveAbstract, Interface, or I - the type system already distinguishes themfn($a) => $buse import types// Short params - standard single-line
public function getItems(string $type): array
{
// method body
}
// Multi-line params - return type and brace on separate lines
public function example(
string $param,
array $options,
): string
{
// method body
}
count($arr) not \count($arr)use function and use const imports to DressCode, which adds and removes themif (is_array($response['data'] ?? null)) instead of if (isset($response['data']) && is_array($response['data']))is_a($obj, $class, allow_string: true)), but not when the method name makes it clear (e.g., setReadonly(true))Foo\Network next to Foo\Networks\*, not inside it) - this keeps the interface discoverable at the package levelarray. Arrays lose type information; typed objects let PHPStan catch errors at analysis time and give full IDE support.The full Nette Coding Standard is bundled with the plugin; read it for rules this skill does not cover.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nette/agent-plugins --plugin nette-dev4 skills in this plugin
/commit-messagesInvoke BEFORE committing changes. Provides commit message conventions: lowercase, past tense, subject:description format. Use this skill whenever the user commits, creates commit messages, stages changes, uses /commit, tags releases, or discusses commit style - even for simple one-liner commits./php-docInvoke BEFORE writing phpDoc. Provides Nette conventions for docblocks: when to skip documentation, class/method/property/exception docs, generic array types (array<T>, list<T>), conditional return types. Use this whenever writing or editing any /** */ comment - even when the user just says "document this" without mentioning phpDoc./phpstan-analysisInvoke BEFORE running PHPStan or fixing PHPStan errors. Covers error resolution strategy (refactoring > phpDoc > ignoring), common Nette error patterns, baseline management, and type tests. Use this whenever the user mentions PHPStan, static analysis, type errors, wants to suppress warnings, or manage the baseline - even for a single error.Other plugins' skills for the same job