Chemaclass/satscribe / .claude/skills/fix
fix
VerifiedRun rector, php-cs-fixer, and phpstan; fix what static analysis reports
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 1.4 KB |
SKILL.md
View on GitHub---
description: Run rector, php-cs-fixer, and phpstan; fix what static analysis reports
argument-hint: "[optional path]"
disable-model-invocation: true
allowed-tools: "Read, Edit, Bash(composer *), Bash(vendor/bin/*), Bash(./vendor/bin/*)"
---
# Fix Code Style
PHP files edited during a session are auto-formatted by the PostToolUse hook. Use this for a full sweep or when phpstan is failing.
## Instructions
1. **Auto-fix**:
```bash
composer fix # rector + php-cs-fixer
```
2. **Review what rector changed** — it applies dead-code and code-quality sets and can be aggressive. Read the diff before keeping it:
```bash
git diff
```
3. **Static analysis**:
```bash
composer phpstan
```
4. **Fix each phpstan error at the source.** Never silence a real type problem with `@phpstan-ignore`.
| Error | Fix |
|---|---|
| Missing return type | Add it, `void` included |
| `array` without shape | `@param list<int>` / `@return array<string, mixed>` |
| Possibly null | Early return, or narrow the type |
| Unknown Eloquent magic | Larastan usually knows it — check the model's `@property` docblock |
5. **Verify nothing broke**:
```bash
composer test
```
## Checklist for new files
- `declare(strict_types=1);` present
- `final` unless inheritance is used, `readonly` where immutable
- Constructor property promotion, all params typed
- Interface in `Domain/`, implementation in `Application/` or `Infrastructure/`
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |