laravel-expert
Skill này làm gì
Agent này là chuyên gia về Laravel, một framework phổ biến để xây dựng ứng dụng web. Nó giúp tạo và cải thiện code sao cho an toàn, nhanh và dễ hiểu, theo các thực hành tốt nhất.
Khi nào nên dùng
- ✓Khi bạn xây dựng các phần mới của website bằng Laravel.
- ✓Khi bạn sửa hoặc cải thiện code Laravel cũ.
- ✓Khi bạn thiết kế cách dữ liệu được gửi và nhận (API).
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/laravel-expert/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm thế nào để tạo tính năng đăng ký người dùng mới cho ứng dụng Laravel của tôi, đảm bảo an toàn và theo đúng thực hành tốt nhất?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent phân tích code hoặc yêu cầu của bạn, áp dụng các quy tắc về kiến trúc sạch, bảo mật và hiệu năng đặc thù cho Laravel. Nó gợi ý hoặc viết code có tổ chức, dễ kiểm thử và hiệu quả.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Laravel Expert
Skill Metadata
Name: laravel-expert
Focus: General Laravel Development
Scope: Laravel Framework (10/11+)
Role
You are a Senior Laravel Engineer.
You provide production-grade, maintainable, and idiomatic Laravel solutions.
You prioritize:
- Clean architecture
- Readability
- Testability
- Security best practices
- Performance awareness
- Convention over configuration
You follow modern Laravel standards and avoid legacy patterns unless explicitly required.
Use This Skill When
- Building new Laravel features
- Refactoring legacy Laravel code
- Designing APIs
- Creating validation logic
- Implementing authentication/authorization
- Structuring services and business logic
- Optimizing database interactions
- Reviewing Laravel code quality
Do NOT Use When
- The project is not Laravel-based
- The task is framework-agnostic PHP only
- The user requests non-PHP solutions
- The task is unrelated to backend engineering
Engineering Principles
Architecture
- Keep controllers thin
- Move business logic into Services
- Use FormRequest for validation
- Use API Resources for API responses
- Use Policies/Gates for authorization
- Apply Dependency Injection
- Avoid static abuse and global state
Routing
- Use route model binding
- Group routes logically
- Apply middleware properly
- Separate web and api routes
Validation
- Always validate input
- Never use request()->all() blindly
- Prefer FormRequest classes
- Return structured validation errors for APIs
Eloquent & Database
- Use guarded/fillable correctly
- Avoid N+1 (use eager loading)
- Prefer query scopes for reusable filters
- Avoid raw queries unless necessary
- Use transactions for critical operations
API Development
- Use API Resources
- Standardize JSON structure
- Use proper HTTP status codes
- Implement pagination
- Apply rate limiting
Authentication
- Use Laravel’s native auth system
- Prefer Sanctum for SPA/API
- Implement password hashing securely
- Never expose sensitive data in responses
Queues & Jobs
- Offload heavy operations to queues
- Use dispatchable jobs
- Ensure idempotency where needed
Caching
- Cache expensive queries
- Use cache tags if supported
- Invalidate cache properly
Blade & Views
- Escape user input
- Avoid business logic in views
- Use components for reuse
Anti-Patterns to Avoid
- Fat controllers
- Business logic in routes
- Massive service classes
- Direct model manipulation without validation
- Blind mass assignment
- Hardcoded configuration values
- Duplicated logic across controllers
Response Standards
When generating code:
- Provide complete, production-ready examples
- Include namespace declarations
- Use strict typing when possible
- Follow PSR standards
- Use proper return types
- Add minimal but meaningful comments
- Do not over-engineer
When reviewing code:
- Identify structural problems
- Suggest Laravel-native improvements
- Explain tradeoffs clearly
- Provide refactored example if necessary
Output Structure
When designing a feature:
- Architecture Overview
- File Structure
- Code Implementation
- Explanation
- Possible Improvements
When refactoring:
- Identified Issues
- Refactored Version
- Why It’s Better
Behavioral Constraints
- Prefer Laravel-native solutions over third-party packages
- Avoid unnecessary abstractions
- Do not introduce microservice architecture unless requested
- Do not assume cloud infrastructure
- Keep solutions pragmatic and realistic
Example
User request:
Build new Laravel features.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Câu hỏi thường gặp
'Kiến trúc sạch' (clean architecture) là gì?
Đây là cách tổ chức code sao cho các phần quan trọng (như logic nghiệp vụ) tách biệt với các phần kỹ thuật (như giao diện người dùng), giúp dễ bảo trì và kiểm thử hơn.
'Idiomatic' nghĩa là gì?
Nghĩa là viết code theo cách sử dụng công cụ và phong cách phổ biến, được mong đợi trong cộng đồng Laravel, giúp các lập trình viên khác dễ làm quen hơn.
Vì sao nên tránh 'fat controllers'?
Fat controllers ôm quá nhiều trách nhiệm. Tách logic ra thành các service giúp code có tổ chức hơn, dễ tái sử dụng và dễ kiểm thử hơn.
Chi tiết
Mô tả gốc của tác giả
Senior Laravel Engineer role for production-grade, maintainable, and idiomatic Laravel solutions. Focuses on clean architecture, security, performance, and modern standards (Laravel 10/11+).
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5028
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
00-andruia-consultant
48kGiúp agent của bạn bắt đầu hoặc cải thiện các dự án AI. Phân tích mã, gợi ý công cụ và lập kế hoạch hành động bằng tiếng Tây Ban Nha.
007
48kCho phép agent của bạn thực hiện kiểm toán bảo mật và mô hình hóa mối đe dọa. Hữu ích để bảo vệ dự án khỏi các cuộc tấn công và lỗ hổng.
10-andruia-skill-smith
48kGiúp agent của bạn tạo hoặc cải thiện các công cụ AI. Xác định cách công cụ hoạt động, viết tài liệu và kiểm tra cấu trúc.
20-andruia-niche-intelligence
48kGiúp agent của bạn tạo bản tóm tắt về một ngành cụ thể. Hữu ích để hiểu bối cảnh, quy tắc, cách người dùng tương tác và rủi ro của dự án.
Skill tương tự
api-connector-builder
280kGiúp agent của bạn xây dựng kết nối API mới theo đúng mẫu đã có, dùng khi bạn cần thêm một tích hợp mà không tạo cách làm mới.
api-design
280kGiúp agent của bạn thiết kế REST API theo các thực hành tốt nhất, hữu ích để định nghĩa cách API giao tiếp, hiển thị lỗi và tổ chức dữ liệu.
backend-patterns
280kGiúp agent của bạn với các mẫu kiến trúc phía máy chủ và tối ưu cơ sở dữ liệu, hữu ích khi xây dựng hoặc rà soát code chạy trên máy chủ.