php-language
БесплатноБез исполняемых скриптовНе проверенApply core PHP language standards and modern 8.x features. Use when working with PHP 8.x features like enums, fibers, readonly properties, or named arguments.
от HoangNguyen0403★ 598 звёзд на GitHubОб этом скилле
PHP Language Standards
Priority: P0 (CRITICAL)
Structure
src/
└── {Namespace}/
└── {Class}.php
Implementation Guidelines
Core Language Standards
- Strict Typing: Declare
declare(strict_types=1);at very top of every file. - Type Hinting: Apply scalar type hints (e.g.,
string,int) and return types to all functions. - Strict Comparison: Avoid loose
==comparison; always use===for strict equality.
Modern PHP 8+ Patterns
- Match Expressions: Prefer
match($status)overswitchfor value returns. It provides strict comparison and exhaustive by default. - Default Case: Use
default => throw new InvalidArgumentException($status)to handle unknown states. - Read-only: Use
public readonly string $name(8.1+) for properties that must not be modified after initialization. Readonly is not "constructor-only": 8.1–8.3 allow a write only from the declaring class scope, 8.4+ widens that toprotected(set), and 8.6 allows declaration defaults. - Property Promotion: Use
public function __construct(public string $name) {}to reduce boilerplate. - Named Arguments: Call functions with
name: 'John', age: 25to skip optional parameters. - Flexible Types: Union types (
int|string, 8.0). Intersection types take class/interface types only (Countable&Traversable, 8.1);string&Countableis invalid. Combine union with intersection only via DNF parentheses ((Countable&Traversable)|null, 8.2). - Version Minima: State the engine minimum before newer syntax: union types/
match/promotion/named arguments 8.0; intersection/readonly/never8.1; DNF types/readonlyclasses 8.2; readonly property defaults 8.6.
Anti-Patterns
- No untyped functions: Declare return and parameter types always.
- No loose
==comparison: Use===for strict equality. - No
switchfor value mapping: Usematchexpressions instead. - No global namespace logic: Organize in classes and namespaces.
References
Установить php-language в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл php-language?
Apply core PHP language standards and modern 8.x features. Use when working with PHP 8.x features like enums, fibers, readonly properties, or named arguments.
Как установить скилл php-language?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл php-language запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic