invokable/google-sheets-project/laravel-best-practices

Claude Code and agent skill by invokable/google-sheets-project

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization and security patterns, validation, error handling, queue and job configuration, route definitions, and architectural decisions. Also use for Laravel code reviews and refactoring existing Laravel code to follow best practices. Covers any task involving Laravel backend PHP code patterns.

Install

npx vskill@latest install invokable/google-sheets-project/laravel-best-practices

SKILL.md

The same SKILL.md was published earlier as laravel/boost/laravel-best-practices.

Laravel Best Practices

Best practices for Laravel, organized as an index of rule files. Each rule file teaches what to do and why. For exact API syntax, verify with search-docs.

Consistency First

Before applying any rule, check what the application already does. Laravel offers multiple valid approaches, and the best choice is the one the codebase already uses, even if another pattern would be theoretically better. Inconsistency is worse than a suboptimal pattern.

Check sibling files, related controllers, models, or tests for established patterns. If one exists, follow it. Don't introduce a second way. These rules are defaults for when no pattern exists yet, not overrides.

How to Apply

  1. Check the changed files, nearby code, project configuration, and relevant tests for established patterns. Deviate only for a correctness or security defect, and call the deviation out.
  2. Map every affected concern to the rule index below. Read each mapped rule file before editing. Skip unrelated rule files.
  3. Make the smallest coherent change. Keep the application's architecture and naming instead of introducing a second pattern for the same job.
  4. Verify version-sensitive Laravel APIs for the installed version with search-docs, or inspect the installed framework when it is unavailable.
  5. Run the narrowest relevant tests first, then the project's formatting and static-analysis checks when the change warrants them.
  6. Re-read the diff against every mapped rule before finishing.

Rule Index

Cross-cutting changes often need more than one rule file.

ConcernRead
Query count, eager loading, indexes, large datasets`rules/db-performance.md`
Subqueries, aggregates, complex ordering and query plans`rules/advanced-queries.md`
Models, relationships, scopes, casts`rules/eloquent.md`
Authentication, authorization, input safety, secrets, uploads`rules/security.md`
Form Requests and validation rules`rules/validation.md`
Controllers, route binding, resources, middleware`rules/routing.md`
Schema changes, columns, foreign keys, indexes`rules/migrations.md`
Jobs, retries, uniqueness, batches, Horizon`rules/queue-jobs.md`
Cache lifetime, invalidation, locks, memoization`rules/caching.md`
Outbound requests, retries, timeouts, fakes`rules/http-client.md`
Exceptions, reporting, rendering, log context`rules/error-handling.md`
Events and notifications`rules/events-notifications.md`
Mailables and mail assertions`rules/mail.md`
Scheduled tasks and overlap protection`rules/scheduling.md`
Collections, lazy iteration, bulk operations`rules/collections.md`
Blade components, attributes, composers`rules/blade-views.md`
Environment values and application configuration`rules/config.md`
Tests: coverage, factories, fakes, and assertionsthe testing-best-practices skill
Naming, helpers, file boundaries, PHP style`rules/style.md`
Actions, services, dependencies, application structure`rules/architecture.md`

Decision Rules

  • Prefer framework features and existing application abstractions over new helpers or dependencies.
  • Avoid speculative abstractions. Extract code when it creates a clear domain boundary, removes meaningful duplication, or makes behavior independently testable.
  • Keep database access out of Blade views and prevent hidden N+1 queries across controllers, resources, jobs, and serialization.

Security

  • Security scanPassed, 93 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
62
Repository forks
8
7-day trend score
21

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/invokable/google-sheets-project/laravel-best-practices/badge)](https://verified-skill.com/skills/invokable/google-sheets-project/laravel-best-practices)

Something wrong with this skill or its page? Tell us.