Help us improve
Share bugs, ideas, or general feedback.
From nette-dev
Provides Nette conventions for PHP docblocks: skipping redundant docs, generic arrays (array<T>, list<T>), conditional returns, property annotations. Use before writing or editing /** */ comments.
npx claudepluginhub nette/claude-code --plugin nette-devHow this skill is triggered — by the user, by Claude, or both
Slash command
/nette-dev:php-docThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Never duplicate signature information without adding value.** If the class name, method name, parameter names, and PHP types already tell the full story, skip the docblock entirely.
Provides Nette-specific PHP coding standards including TAB indentation, single quotes, strict_types=1, PSR-12 modifications, and use statement ordering. Invoke before writing, modifying, or refactoring any PHP code.
Analyzes PHP code for comment quality issues: detects missing PHPDoc, outdated comments, commented-out code, obvious comments, self-documenting opportunities, and missing exception docs.
Share bugs, ideas, or general feedback.
Never duplicate signature information without adding value. If the class name, method name, parameter names, and PHP types already tell the full story, skip the docblock entirely.
Skip documentation when:
$width, $height, $name)Write documentation when:
@return string[])Use single-line format for simple @var annotations:
/** @var string[] */
private array $name;
Short comments for non-obvious properties:
/** for back compatibility */
protected Explorer $context;
?Type over Type|null for nullable types/**
* @return string primary column sequence name
* @param mixed $var description here
*/
Include parameter docs only when explaining:
array<T> = array<int|string, T> - any keys (omitting key type means int|string)array<int, T> - int keys only (not necessarily sequential)array<string, T> - string keys onlylist<T> - sequential int keys starting from 0 (0, 1, 2...)list<T> is accurate if the function always returns sequential keyslist<T> can be too restrictive - may reject valid inputs with non-sequential keyslist<T> for inputAnalyze the implementation:
foreach ($arr as $v) - doesn't use keys → array<T> is sufficient$arr[0], $arr[1] - accesses by index → requires list<T>For return types dependent on parameters:
/**
* @return ($flag is true ? list<array{string, int}> : list<string>)
*/
Examples:
Clear purpose, adding array contents info:
/**
* Returns list of supported languages.
* @return string[] Array of language codes
*/
public function getSupportedLanguages(): array
Describing unusual behavior:
/**
* Creates new transaction. Returns null if user has exceeded daily limit.
*/
public function createTransaction(float $amount): ?Transaction
// Signature says it all - no docblock needed
protected readonly string $name;
public function getWidth(): int
public function setName(string $name): void
Self-explanatory parameters - document only the method purpose:
/**
* Calculates dimensions of image cutout.
*/
public function calculateCutout(int $left, int $top, int $width, int $height): array