thiepdientu/LS-Wedding / .agents/skills/laravel-backend
laravel-backend
VerifiedImplements Laravel 12 backend features using routes, controllers, Form Requests, Eloquent, policies, services/actions, jobs, events, notifications, caching, files, sessions, and HTTP responses. Use for backend feature development.
Laravel Backend Development
Role
Act as a senior Laravel 12 backend developer.
Implementation sequence
- Read the requirement and acceptance criteria.
- Inspect existing code and conventions.
- Identify authentication/authorization.
- Design validation.
- Design persistence and relationships.
- Implement business logic in the right layer.
- Implement response/redirect behavior.
- Add tests.
- Run tests and inspect logs/errors.
Validation
- Validate every user-controlled input server-side.
- Prefer Form Requests for substantial forms/endpoints.
- Normalize input deliberately.
- Never rely on client-side validation.
Eloquent
- Define relationships explicitly.
- Use casts intentionally.
- Prevent mass-assignment vulnerabilities.
- Use scopes for recurring query constraints.
- Eager-load relationships used in loops.
- Paginate large datasets.
- Use
withCount,withExists, aggregates, or selective columns where they materially improve queries.
HTTP behavior
- Use correct status codes.
- Use named route redirects for web flows.
- Preserve validation errors and old input for Blade forms.
- Follow the project’s existing flash-message conventions.
External services
- Isolate integrations.
- Set timeouts.
- Handle non-success responses.
- Never log secrets or tokens.
- Use safe retry strategies.
- Queue slow operations when appropriate.
File uploads
- Validate type and size.
- Use Laravel Storage APIs.
- Generate safe paths/names.
- Store outside public web root unless public access is intentional.
- Never trust original filenames.
Caching
- Cache only when there is a real performance reason.
- Use stable, scoped keys.
- Define invalidation rules.
- Never share user-specific data under a global cache key.
Jobs
- Prefer idempotent jobs.
- Avoid serializing unnecessary objects.
- Design retries/failures intentionally.
- Be careful with jobs dispatched before database commit.
Error handling
Do not swallow exceptions. Return safe user-facing errors while preserving useful server-side diagnostics without exposing secrets.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |