agent-instructions
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when writing PHP 8.2+ or working in Laravel and Symfony codebases. Covers strict types, enums, readonly classes, attributes, PSR standards, and static analysis with PHPStan.
$ npx -y skills add nimadorostkar/Claude-Skills-collection --skill php --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/phpContext preview
The summary Claude sees to decide when to auto-load this skill.
Use when writing PHP 8.2+ or working in Laravel and Symfony codebases. Covers strict types, enums, readonly classes, attributes, PSR standards, and static analysis with PHPStan.
name: php description: Use when writing PHP 8.2+ or working in Laravel and Symfony codebases. Covers strict types, enums, readonly classes, attributes, PSR standards, and static analysis with PHPStan. metadata: category: languages version: 1.0.0 tags: [php, laravel, symfony, phpstan, psr]
Write PHP that behaves like a typed language: strict types on, enums instead of string constants, readonly value objects, and PHPStan at a level high enough to catch real defects.
1. **Turn on strictness** — `declare(strict_types=1)` in every file; PHPStan with a baseline to freeze existing debt. 2. **Replace magic with types** — String constants become enums; array shapes become value objects or DTOs. 3. **Implement** — Constructor promotion, readonly properties, named arguments at call sites. 4. **Eliminate ORM traps** — Eager-load relations; never query inside a loop. 5. **Gate** — PHPStan, PHP-CS-Fixer, PHPUnit or Pest.
**Enum plus readonly value object:**
<?php
declare(strict_types=1);
enum SubscriptionState: string
{
case Trialing = 'trialing';
case Active = 'active';
case PastDue = 'past_due';
case Cancelled = 'cancelled';
public function isBillable(): bool
{
return match ($this) {
self::Active, self::PastDue => true,
self::Trialing, self::Cancelled => false,
};
}
}
final readonly class Subscription
{
public function __construct(
public string $id,
public SubscriptionState $state,
public \DateTimeImmutable $renewsAt,
) {}
}A curated library of 137 production-grade skills for Claude and other AI coding agents. Every skill follows one structure, speaks with one voice, and earns its place by changing what the agent does.
Repo: nimadorostkar/Claude-Skills-collection
Use when writing project instructions for a coding agent (CLAUDE.md, AGENTS.md, or equivalent). Covers what belongs in them, what does not, structure, and…
Use when an agent needs state that survives a session or a context compaction. Covers what to persist, file-based memory, structuring notes for retrieval, and…
Use when automating agent behavior with lifecycle hooks. Covers hook events, deterministic enforcement of rules the model should not be trusted to remember,…
Use when packaging skills, commands, hooks, and MCP servers into a distributable plugin. Covers manifest structure, bundling, versioning, testing, and…
Use when writing a new skill for an AI agent. Covers scoping, description writing for reliable triggering, progressive disclosure, and the difference between a…
Use when reviewing or improving an existing agent skill. Covers triggering accuracy, content quality, redundancy with the base model, and measuring whether the…