Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Strict types, type declarations, and static analysis for type-safe PHP code.
.claude/skills/valec3-backend-php-type-safety/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -6% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 88% | 0% |
| case-14 | ✓→✗ | ▼ Worse | 117% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 4% | 0% |
php<?php declare(strict_types=1); // Now type coercion is disabled function add(int $a, int $b): int { return $a + $b; } add(1, 2); // OK // add('1', '2'); // TypeError in strict mode
php<?php declare(strict_types=1); class User { private int $id; private string $email; private ?string $phone = null; private array $roles = []; public function __construct(int $id, string $email) { $this->id = $id; $this->email = $email; } }
php<?php declare(strict_types=1); class UserService { public function getUser(int $id): ?User { $user = $this->repository->find($id); return $user; // Can be User or null } public function getAllUsers(): array { return $this->repository->findAll(); } public function createUser(array $data): User { // Must return User, not null return $this->repository->create($data); } }
php<?php declare(strict_types=1); class UserRepository { /** * @return array<User> */ public function findAll(): array { // PHPStan knows this returns array of User objects return []; } /** * @param array<int> $ids * @return array<User> */ public function findByIds(array $ids): array { return []; } }
bash# Install composer require --dev phpstan/phpstan # Run vendor/bin/phpstan analyse app
neon# phpstan.neon parameters: level: 8 paths: - app
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 5,137 | 2,059 | -60% | 1 | 1 | 0% | 914 | 946 | +4% | 0 | 0 | — |
case-02 | fail→pass | 6,588 | 3,161 | -52% | 1 | 1 | 0% | 1,206 | 1,137 | -6% | 0 | 0 | — |
case-03 | pass→pass | 7,296 | 5,937 | -19% | 1 | 1 | 0% | 1,371 | 1,730 | +26% | 0 | 0 | — |
case-04 | fail→pass | 6,252 | 3,565 | -43% | 1 | 1 | 0% | 1,203 | 1,191 | -1% | 0 | 0 | — |
case-05 | pass→pass | 3,003 | 2,450 | -18% | 1 | 1 | 0% | 537 | 1,039 | +93% | 0 | 0 | — |
case-06 | pass→pass | 3,193 | 3,434 | +8% | 1 | 1 | 0% | 552 | 1,090 | +97% | 0 | 0 | — |
case-07 | fail→pass | 4,359 | 4,874 | +12% | 1 | 1 | 0% | 827 | 1,556 | +88% | 0 | 0 | — |
case-08 | pass→pass | 3,201 | 3,105 | -3% | 1 | 1 | 0% | 647 | 1,176 | +82% | 0 | 0 | — |
case-09 | pass→pass | 4,579 | 2,508 | -45% | 1 | 1 | 0% | 746 | 1,039 | +39% | 0 | 0 | — |
case-10 | pass→pass | 2,305 | 1,772 | -23% | 1 | 1 | 0% | 403 | 790 | +96% | 0 | 0 | — |
case-11 | pass→pass | 2,634 | 1,501 | -43% | 1 | 1 | 0% | 447 | 825 | +85% | 0 | 0 | — |
case-12 | pass→pass | 2,108 | 1,797 | -15% | 1 | 1 | 0% | 393 | 917 | +133% | 0 | 0 | — |
case-13 | pass→pass | 2,882 | 2,231 | -23% | 1 | 1 | 0% | 568 | 964 | +70% | 0 | 0 | — |
case-14 | pass→fail | 3,807 | 3,406 | -11% | 1 | 1 | 0% | 526 | 1,140 | +117% | 0 | 0 | — |
case-15 | pass→pass | 3,262 | 3,152 | -3% | 1 | 1 | 0% | 649 | 1,206 | +86% | 0 | 0 | — |
case-16 | pass→pass | 4,577 | 4,258 | -7% | 1 | 1 | 0% | 884 | 1,249 | +41% | 0 | 0 | — |
case-17 | pass→pass | 2,124 | 2,179 | +3% | 1 | 1 | 0% | 374 | 952 | +155% | 0 | 0 | — |
case-18 | pass→pass | 13,072 | 9,952 | -24% | 1 | 1 | 0% | 2,406 | 2,393 | -1% | 0 | 0 | — |
case-19 | pass→pass | 4,517 | 3,371 | -25% | 1 | 1 | 0% | 811 | 1,226 | +51% | 0 | 0 | — |
case-20 | pass→pass | 6,830 | 5,325 | -22% | 1 | 1 | 0% | 1,231 | 1,646 | +34% | 0 | 0 | — |
case-21 | pass→pass | 2,821 | 2,730 | -3% | 1 | 1 | 0% | 487 | 1,086 | +123% | 0 | 0 | — |
case-22 | pass→pass | 2,751 | 3,393 | +23% | 1 | 1 | 0% | 452 | 1,208 | +167% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +9 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.