spatie-guidelines
Spatie Guidelines
Apply these guidelines when writing code for Spatie projects or contributing to Spatie packages.
Core principle: Write things the way Laravel intended. If there's a documented way, follow it. Deviate only with justification.
PHP Style
Type System
- Type properties, parameters, and return types. Skip docblocks for fully typed methods.
- Use
?Type(short nullable), notType|null. - Use
voidreturn type when a method returns nothing. - Use constructor property promotion when all properties can be promoted; one per line, trailing comma:
class MyClass {
public function __construct(
More from freekmurze/dotfiles
php-guidelines-from-spatie
Describes PHP and Laravel guidelines provided by Spatie. These rules result in more maintainable, and readable code.
145context7-auto-research
Automatically fetches up-to-date documentation from Context7 when users ask about libraries, frameworks, APIs, or need code examples. Triggers proactively without explicit user request.
28react-native-best-practices
Provides React Native performance optimization guidelines for FPS, TTI, bundle size, memory leaks, re-renders, and animations. Applies to tasks involving Hermes optimization, JS thread blocking, bridge overhead, FlashList, native modules, or debugging jank and frame drops.
24agent-browser
Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.
24copy-editing
When the user wants to edit, review, or improve existing marketing copy. Also use when the user mentions 'edit this copy,' 'review my copy,' 'copy feedback,' 'proofread,' 'polish this,' 'make this better,' or 'copy sweep.' This skill provides a systematic approach to editing marketing copy through multiple focused passes.
24fix-github-issue
Fix GitHub issues using gh CLI. Use when asked to fix, resolve, or address a GitHub issue. Creates fixes on separate branches, runs tests locally, and creates PRs when tests pass. Requires gh CLI authenticated and repo cloned locally.
22