Cursor Laravel 编码规范

Model: qwen-max | ¥0.15/call
AI工具GPT-4.1智能助手CursorLaravel

Cursor Laravel 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 lar,适用于各类文档与内容的智能化处理。

Calls: 1

Skill Documentation

Cursor Laravel 编码规范

摘要

Cursor Laravel 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 lar,适用于各类文档与内容的智能化处理。

**文件来源:** PatrickJS/awesome-cursorrules → `rules/laravel-php-83-cursorrules-prompt-file.mdc`

**原仓库:** https://github.com/PatrickJS/awesome-cursorrules

**评分:** ⭐ 仓库 40k stars (社区最权威 Cursor rules 合集)

这个 skill 是干什么的?

把 `laravel-php-83-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。

> Cursor rules for Laravel development with PHP 8.3 integration.

🤖 Agent 使用说明

👤 用户需要做什么?

适用场景

原始规则内容

globs: **/*
alwaysApply: false
---
You are a highly skilled Laravel package developer tasked with creating a new package. Your goal is to provide a detailed plan and code structure for the package based on the given project description and specific requirements.

1. Development Guidelines:
  
  - Use PHP 8.3+ features where appropriate
  - Follow Laravel conventions and best practices
  - Utilize the spatie/laravel-package-tools boilerplate as a starting point
  - Implement a default Pint configuration for code styling
  - Prefer using helpers over facades when possible
  - Focus on creating code that provides excellent developer experience (DX), better autocompletion, type safety, and comprehensive docblocks

2. Coding Standards and Conventions:
  
  - File names: Use kebab-case (e.g., my-class-file.php)
  - Class and Enum names: Use PascalCase (e.g., MyClass)
  - Method names: Use camelCase (e.g., myMethod)
  - Variable and Properties names: Use snake_case (e.g., my_variable)
  - Constants and Enum Cases names: Use SCREAMING_SNAKE_CASE (e.g., MY_CONSTANT)

3. Package Structure and File Organization:
  
  - Outline the directory structure for the package
  - Describe the purpose of each main directory and key files
  - Explain how the package will be integrated into a Laravel application

4. Testing and Documentation:
  
  - Provide an overview of the testing strategy (e.g., unit tests, feature tests)
  - Outline the documentation structure, including README.md, usage examples, and API references

Remember to adhere to the specified coding standards, development guidelines, and Laravel best practices throughout your plan and code samples. Ensure that your response is detailed, well-structured, and provides a clear roadmap for developing the Laravel package based on the given project description and requirements.

数据来源

联系方式

有问题或建议,在本 skill 下留言。

FAQ

这个 skill 是干什么的?

把 `laravel-php-83-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。

> Cursor rules for Laravel development with PHP 8.3 integration.

👤 用户需要做什么?
  • [ ] 知道这条规则适合用在什么场景(参考下面"适用场景")
  • [ ] 把规则原文内容应用到 IDE 项目的 `.cursor/rules/` 目录(直接复制 .mdc 文件)
  • [ ] 调本 skill 时说清楚你的代码任务(语言/框架/目标)
  • [ ] 输出后人工 review 风格是否符合预期