Chuyển đến nội dung
Skillpedia
API và máy chủ (backend)48k · #5440

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.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/php-pro/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

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

  1. Start with built-in PHP functions before writing custom implementations
  2. Use generators for large datasets to minimize memory footprint
  3. Apply strict typing and leverage type inference
  4. Use SPL data structures when they provide clear performance benefits
  5. Profile performance bottlenecks before optimizing
  6. Handle errors with exceptions and proper error levels
  7. Write self-documenting code with meaningful names
  8. 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. '

repo: sickn33/agentic-awesome-skills

Độ 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

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự