跳到正文
Skillpedia
API 与服务器(后端)48k · #5027

laravel-development-workflow

它能做什么

这个工具可以帮你在 Laravel 应用中做出正确且易于维护的修改。它能确保修复和新功能与现有项目相契合,并经过充分测试。

适用场景

  • ✓当你要为 Laravel 项目添加新功能时。
  • ✓当你要修复 Laravel 应用中的 bug 时。
  • ✓当一项修改需要测试,以确保不会破坏系统其他部分时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/laravel-development-workflow/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/laravel-development-workflow/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“修复用户无法登录的 bug,并添加一个测试,确保此问题以后不会再出现。”

每周 5 个新技能,1 分钟读完。

工作原理

该工具会先了解应用的运作方式,找出问题的确切原因,或确定新功能应放置的位置。然后,它会遵循项目的规范进行修改,并添加测试,确认一切都按预期正常运行。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Laravel Development Workflow

Make the requested Laravel behavior correct, maintainable within the existing application, and supported by evidence that matches the change's risk.

When to Use

  • Use when implementing a feature in an existing Laravel application.
  • Use when diagnosing and fixing a Laravel bug at its actionable root cause.
  • Use when a Laravel change needs regression coverage and proportionate verification.
  • Use when the project already has architectural or testing conventions that must be preserved.

Establish the Contract

Before editing:

  • Read the repository instructions and inspect the relevant routes, models, controllers, actions or services, requests, policies, jobs, events, tests, and schema.
  • Trace the current behavior far enough to identify the actual change boundary and existing conventions.
  • Turn the request into a compact set of scenarios, important edge cases, and verifiable acceptance criteria. Keep this analysis in the working notes unless the user requests a separate artifact.
  • Identify authorization, validation, transaction, queue, cache, and concurrency concerns only where they can affect this behavior.

Scale the analysis to the task. A focused validation fix does not need the same ceremony as a new multi-role workflow.

Fix Bugs at the Cause

For a bug:

  1. Reproduce the failure through the narrowest reliable path.
  2. Trace the data and control flow to the actionable root cause.
  3. Add or update a regression test that fails for that cause when practical.
  4. Implement the smallest fix that restores the intended invariant.
  5. Demonstrate that the regression test passes and that nearby behavior still works.

Do not substitute retries, broad exception handling, disabled validation, extra timeouts, or error suppression for a root-cause fix. If the failure cannot be reproduced locally, state what evidence is missing and use the strongest available static or targeted verification.

Build Features in the Existing Shape

  • Reuse the application's established patterns and naming.
  • Keep business rules in the layer where this codebase already places comparable rules.
  • Use Eloquent relationships, form requests, policies, actions, services, events, or jobs when they improve this change or match local conventions—not as mandatory ceremony.
  • Treat authorization and validation as explicit behavior at the system boundary.
  • Preserve backwards compatibility unless the request requires a breaking change.
  • Keep migrations reversible and safe for the application's supported database engines.

Create factories, seeders, fixtures, or a disposable command only when realistic data is needed for development or durable test coverage. Do not leave one-off scaffolding in the product solely to exercise a small change.

Verify Proportionately

Discover the project's supported commands from its configuration and documentation. Prefer this order:

  1. Run the narrowest affected test or reproduce the original failure.
  2. Run the relevant feature, unit, or integration test group.
  3. Run static analysis, formatting, and linting configured by the repository.
  4. Run the broader suite when the change's reach or project policy warrants it.

Cover the critical observable behavior, including the happy path and whichever edge cases, validation rules, permissions, database effects, events, notifications, jobs, or API contracts are actually affected. Avoid tests that only mirror implementation details.

Common commands may include:

php artisan test --filter=RelevantTest
vendor/bin/pest --filter=RelevantTest
vendor/bin/phpstan analyse
vendor/bin/pint --dirty

Use the commands the project provides; do not install or configure tools merely because they appear in this example.

Preserve the User's Environment

  • Keep the change inside the requested application behavior and preserve unrelated working-tree changes.
  • Do not run destructive database operations, production commands, deployments, credential changes, or external account actions unless the user or repository instructions explicitly place them in scope.
  • Avoid exposing secrets in commands, logs, test output, or completion evidence.
  • Prefer local, reversible verification and narrowly targeted data changes.

Completion Evidence

Before handing off, verify each acceptance criterion against current behavior. Report:

  • what changed and why it fixes or implements the requested behavior;

…

常见问题

什么是 Laravel?

Laravel 是一个流行的“框架”(即一套开发结构),用于使用 PHP 编程语言构建 Web 应用。

“根本原因诊断”是什么意思?

指找出问题发生的真正原因,而不只是处理表面症状。

什么是“回归测试”?

这类测试用于确保你在代码某一部分所做的修改,没有破坏其他原本正常工作的部分。

详情

作者的原始描述

Build and fix existing Laravel applications through root-cause diagnosis, repository-native implementation, regression coverage, and risk-based verification.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#5027
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能