Steve McDougall has released api-skill, a Claude Code skill that captures his production API conventions for Laravel 13+. Steve is well-known in the Laravel community for his work around API design, so this one is worth paying attention to.
The idea behind skills is that once installed, Claude Code picks them up automatically. Rather than explaining your preferred patterns at the start of every session, the skill keeps the agent on the same page across all your projects.
This particular skill is pretty opinionated. Here's a taste of what it enforces:
- Auto-increment IDs are out —
HasUlidson every model. paginate()is prohibited in favour ofsimplePaginate().- All error responses follow RFC 9457 Problem Details.
- Controllers are
finalsingle-action invokables — no resource controllers, no multi-method classes. - Deprecated API versions advertise their removal date via RFC 8594
Sunsetmiddleware instead of just disappearing quietly. - Routes are split into one file per resource under
routes/api/, with no globalapiprefix andthrottle:apion every group. - Authentication uses Sanctum with stateless tokens. Authorization goes through Laravel Policies, checked in the Form Request's
authorize()method — never inside an Action. - Background jobs return
202 Acceptedimmediately. Synchronous processing is reserved for auth flows only. Model::shouldBeStrict()is set globally, preventing lazy loading, silently discarded attributes, and missing attribute access.declare(strict_types=1)on every file,finalon every class, andmatchover ternary chains throughout.
Installation is just a git clone:
# Globalgit clone https://github.com/juststeveking/api-skill.git ~/.claude/skills/api-skill # Project-levelgit clone https://github.com/juststeveking/api-skill.git .claude/skills/api-skill
Alongside the main SKILL.md ruleset, there's a references/CONVENTIONS.md with directory layouts, naming tables, and worked examples if you want to dig into the reasoning or use it as a base for your own skill.
You can see the full list of rules, along with worked examples, on GitHub.