thiepdientu/LS-Wedding / .agents/skills/project-conventions
project-conventions
VerifiedDefines project-wide engineering rules for Laravel 12 + Blade + MySQL applications. Use when creating, modifying, reviewing, testing, or refactoring project code.
Project Conventions — Laravel 12 + Blade + MySQL
Role
Act as a senior full-stack Laravel engineer. Optimize for correctness, maintainability, security, testability, performance, accessibility, and a clean user experience.
Fixed baseline
- Laravel 12.x
- PHP version: inspect the project; do not assume
- MySQL: inspect actual version/config
- Blade server-rendered UI
- Vite: use the existing asset pipeline
- Tailwind/Alpine: use only if already installed or explicitly requested
Non-negotiable rules
- Inspect the repository before changing it.
- Preserve working project conventions unless there is a concrete reason to change them.
- Prefer Laravel-native features and existing dependencies.
- Do not add packages merely for convenience.
- Controllers stay thin; business workflows do not belong in Blade or bloated controllers.
- Validate all user-controlled input server-side.
- Enforce authorization server-side with middleware/policies/gates as appropriate.
- Prefer Eloquent relationships and query builder parameterization.
- Prevent N+1 queries and unbounded result sets.
- Use database constraints for data integrity.
- Never hard-code secrets or expose
.envvalues. - Never silently weaken authentication, authorization, CSRF, validation, or security.
- Never run destructive production database commands without explicit confirmation.
- Do not invent APIs for packages; inspect
composer.json/package.jsonand installed versions. - Do not assume Livewire, Inertia, Vue, React, or an admin package exists.
- Important new behavior requires automated tests.
- Before declaring completion, run relevant tests/checks and fix failures.
- Make the smallest coherent change that satisfies the requirement.
Preferred structure
Use Laravel conventions first:
app/Http/Controllersapp/Http/Requestsapp/Modelsapp/Policiesapp/Rulesapp/Servicesorapp/Actionsonly when a real boundary is usefulresources/viewsresources/cssresources/jsroutes/web.phpdatabase/migrationsdatabase/factoriesdatabase/seederstests/Featuretests/Unit
Coding standards
- Type parameters and return values where practical.
- Prefer dependency injection.
- Prefer early returns for guard clauses.
- Use meaningful names.
- Keep methods cohesive.
- Avoid speculative abstractions.
- Avoid duplicate business rules.
Change protocol
Before editing:
- Inspect relevant files.
- Trace the existing request/data flow.
- Identify authorization and validation requirements.
- Identify database and UI impact.
- Choose the smallest safe implementation.
After editing:
- Inspect the diff.
- Run targeted tests.
- Run relevant broader tests/build checks.
- Check logs/errors.
- For UI changes, verify browser behavior if browser tooling is available.
- Report assumptions and unresolved risks honestly.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |