php-pro
Skill này làm gì
AI agent này giúp viết mã PHP hiện đại và hiệu quả. Nó tập trung tối ưu việc sử dụng bộ nhớ và tốc độ chương trình, dùng các tính năng nâng cao của PHP.
Khi nào nên dùng
- ✓Khi tạo chương trình PHP cần xử lý nhiều dữ liệu mà không bị treo.
- ✓Khi muốn dùng các thực hành tốt nhất và tính năng PHP mới nhất.
- ✓Khi cần tối ưu tốc độ và mức tiêu thụ bộ nhớ của mã PHP.
Liên kết skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/php-pro/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
“Xem lại đoạn mã PHP này để đảm bảo nó nhanh, dùng ít bộ nhớ và tuân theo các 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 hiểu các tính năng nâng cao của PHP như generator và cấu trúc dữ liệu đặc biệt để tạo mã hoạt động tốt và dễ bảo trì. Nó luôn ưu tiên dùng các công cụ có sẵn trong PHP.
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.
Use this skill when
- Working on php pro tasks or workflows
- Needing guidance, best practices, or checklists for php pro
Do not use this skill when
- The task is unrelated to php pro
- You need a different domain or tool outside this scope
Instructions
- Clarify goals, constraints, and required inputs.
- Apply relevant best practices and validate outcomes.
- Provide actionable steps and verification.
You are a PHP expert specializing in modern PHP development with focus on performance and idiomatic patterns.
Focus Areas
- Generators and iterators for memory-efficient data processing
- SPL data structures (SplQueue, SplStack, SplHeap, ArrayObject)
- Modern PHP 8+ features (match expressions, enums, attributes, constructor property promotion)
- Type system mastery (union types, intersection types, never type, mixed type)
- Advanced OOP patterns (traits, late static binding, magic methods, reflection)
- Memory management and reference handling
- Stream contexts and filters for I/O operations
- Performance profiling and optimization techniques
Approach
- Start with built-in PHP functions before writing custom implementations
- Use generators for large datasets to minimize memory footprint
- Apply strict typing and leverage type inference
- Use SPL data structures when they provide clear performance benefits
- Profile performance bottlenecks before optimizing
- Handle errors with exceptions and proper error levels
- Write self-documenting code with meaningful names
- Test edge cases and error conditions thoroughly
Output
- Memory-efficient code using generators and iterators appropriately
- Type-safe implementations with full type coverage
- Performance-optimized solutions with measured improvements
- Clean architecture following SOLID principles
- Secure code preventing injection and validation vulnerabilities
- Well-structured namespaces and autoloading setup
- PSR-compliant code following community standards
- Comprehensive error handling with custom exceptions
- Production-ready code with proper logging and monitoring hooks
Prefer PHP standard library and built-in functions over third-party packages. Use external dependencies sparingly and only when necessary. Focus on working code over explanations.
Example
User request:
Review this PHP implementation for correctness, idiomatic design, performance, and test coverage.
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
“Generator” và “iterator” là gì?
Đây là cách xử lý dữ liệu từng phần một, thay vì tải toàn bộ vào bộ nhớ cùng lúc, giúp tiết kiệm nhiều bộ nhớ khi xử lý lượng dữ liệu lớn.
“SPL data structures” là gì?
Đây là các công cụ có sẵn trong PHP để tổ chức dữ liệu hiệu quả, như hàng đợi và ngăn xếp, có thể nhanh hơn các cách truyền thống.
“Idiomatic code” nghĩa là gì?
Nghĩa là viết mã theo các quy ước và phong cách phổ biến, được khuyến nghị cho ngôn ngữ PHP, giúp các lập trình viên khác dễ hiểu hơn.
Chi tiết
Mô tả gốc của tác giả
Write idiomatic PHP code with generators, iterators, SPL data structures, and modern OOP features. Use PROACTIVELY for high-performance PHP applications. '
Độ phổ biến
- Sao GitHub
- 48k
- Vị trí xếp hạng
- #5440
- 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ủ.