Community编程与开发github.com

Taldres/laravel-waitlist

在添加 Laravel 包功能或通过服务提供者进行连接时使用此技能:命令、迁移、路由、配置合并、视图、翻译、资源、中间件、发布标签、工作台文件或仅控制台行为。

laravel-waitlist 是什么?

此技能旨在指导开发者以正确的方式将新功能添加到 Laravel 包中,并通过服务提供者使用显式的 Laravel API 进行连接。它确保包名、命名空间、配置键和发布标签在整个包中保持一致。该技能支持各种功能,包括命令、迁移、路由、配置、视图、翻译、资源、中间件和测试。它提供了清晰的工作流程,指导开发者检查现有结构、创建所需文件,并在服务提供者的 `register()` 或 `boot()` 方法中正确连接功能。此外,它还强调了避免反模式的重要性,例如加载过早的主机应用状态、在配置文件之外调用 `env()` 或无条件注册仅 Web 关注点。该技能与常见的 Laravel 包开发平台兼容,如 Claude Code、Cursor 和 Codex,通过结构化的指导帮助开发者避免常见的陷阱,并遵循 Laravel 的最佳实践。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Taldres/laravel-waitlist/tree/HEAD/.agents/skills/package-scaffold

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

包脚手架

主要目标

使用显式的 Laravel API 在正确的位置添加包功能并通过服务提供者进行连接,保持包名、命名空间、配置键和发布标签的一致性。

工作流程

  1. 在创建文件之前,检查现有的包结构、同级示例、README 设置说明以及当前的服务提供者。
  2. 确定请求涉及的是命令、迁移、路由、配置、视图、翻译、资源、中间件、测试、README/贡献文档、兼容性还是发布流程。
  3. 在 Laravel 原生包路径下创建功能文件,并使用配置好的包名、命名空间、发布标签、URL 和徽章保持一致。
  4. 使用下方 提供者连接 中的模式,通过服务提供者连接该功能。
  5. 使用 package-testing 进行测试覆盖,当用户可见行为发生变化时更新 README 或贡献文档,使用 package-compatibility 处理矩阵敏感的变化,使用 package-release 处理发布任务。
  6. 仅添加请求功能所需的文件,并在进行更广泛的检查之前,使用最窄的相关命令进行验证。

提供者连接

  1. 将提供者连接代码保留在 register() 或 boot() 中,除非提取一个方法能使真正重复的关注点更清晰。
  2. 当主机应用必须能够覆盖配置时,将容器绑定和 mergeConfigFrom 调用放在 register() 中。
  3. 使用 Laravel 原生 API(如 loadRoutesFrom、loadViewsFrom 和 loadTranslationsFrom)在引导时方法中放置资源加载。
  4. 在调用 publishes、publishesMigrations 或 commands 之前,使用 runningInConsole() 保护仅控制台的发布和命令注册。
  5. 使用 waitlist-* 命名约定命名发布标签,以便消费者可以定位单个资源组。
  6. 为可观察的提供者行为添加测试:合并的配置、加载的路由、发布标签或命令注册。

提供者连接反模式:

  • 在提供者注册期间过早加载主机应用状态。
  • 在配置文件之外调用 env();改为在 mergeConfigFrom 之后使用配置值。
  • 当包可以在控制台上下文中运行时,无条件注册仅 Web 关注点。
  • 默认使用 spatie/laravel-package-tools 替换显式的提供者方法。

参考

  • src/*ServiceProvider.php
  • config/*.php
  • routes/*.php
  • resources/views/
  • lang/
  • database/migrations/
  • public/
  • src/Console/Commands/
  • tests/Feature/ 和 tests/Unit/

示例

  • 添加 Artisan 命令:在 src/Console/Commands 下创建命令类,将其注册到 runningInConsole() 保护内的 commands 数组中,为可观察的控制台输出添加一个功能测试,如果命令是面向用户的,则记录文档。
  • 添加可发布的迁移:将迁移文件放置在 database/migrations 中,通过控制台保护的 publishesMigrations 调用连接它,并使用 waitlist-migrations 标签,然后使用 Testbench 测试发布行为。
  • 通过将 publishes 映射添加到现有的控制台保护发布方法中,并使用 waitlist-* 命名标签来连接新的发布标签。

反模式

  • 添加未使用的文件,因为包以后可能需要它们。
  • 混用包名、命名空间、配置键或发布标签。
  • 未经批准更改依赖项。
  • 当只需一个特定功能更改时,使用辅助抽象替换显式的 Laravel 包代码。

Individual skills in this repo

This repo contains 13 individual skills — each has its own dedicated page.

Taldres/laravel-waitlist

Use this skill when reviewing Laravel package compatibility across composer constraints, PHP versions, Laravel versions, Testbench versions, dependency stability lanes, Windows CI, or matrix-sensitive code and workflow changes.

Taldres/laravel-waitlist

Use this skill when creating or updating the bundled Laravel Boost skill under resources/boost/skills from the package implementation and package documentation. Trigger after public APIs, commands, config, routes, views, publish tags, README content, or examples change.

Taldres/laravel-waitlist

Use this skill when preparing Laravel package releases: CHANGELOG.md updates, generated release notes, GitHub release workflows, version checks, tags, release validation, or release automation changes. Never publish autonomously.

Taldres/laravel-waitlist

Use this skill when writing, editing, fixing, or reviewing package tests with Pest 4/5 and Orchestra Testbench, including TDD, feature tests, unit tests, type coverage, arch tests, workbench behavior, commands, routes, config, migrations, and publishable resources.

Taldres/laravel-waitlist

Integrate taldres/laravel-waitlist in a Laravel application: define purposes, lists and fields, build the signup form, send the confirmation mail from events, add a preference page, and keep consent, retention and encryption intact.

Taldres/laravel-waitlist

Build the pages of a taldres/laravel-waitlist integration: the signup form with the registered wording, and the confirm, unsubscribe and preference pages, either in Laravel controllers (Blade, Livewire, Inertia) or in an SPA or static site over the package's JSON API, including CORS and bot protection.

Taldres/laravel-waitlist

Turn a taldres/laravel-waitlist waitlist into a launch: invite people in batches in signup order, let invited addresses register, announce the launch to everyone who agreed, and erase the list once its purpose is fulfilled.

Taldres/laravel-waitlist

Send the mails of a taldres/laravel-waitlist integration: the double opt-in confirmation, the preference page link, a welcome mail, launch mails and newsletters to the people who agreed, with the right unsubscribe links, one-click headers and a sender per project.

Taldres/laravel-waitlist

Operate a taldres/laravel-waitlist installation: answer access and erasure requests, withdraw a purpose on request, apply retention, erase a list once its purpose is fulfilled, rotate APP_KEY with waitlist:rekey, export a list, and check the setup before going live.

Taldres/laravel-waitlist

Run the waitlists of several products in one Laravel app with taldres/laravel-waitlist projects: define projects, scope facade calls with project(), resolve the project of HTTP signups, send mail per project, handle requests across all projects, or keep projects in a database for a central waitlist API.

Taldres/laravel-waitlist

Keep a newsletter tool such as Brevo, Mailchimp or Mailcoach in step with a taldres/laravel-waitlist waitlist: add confirmed contacts per purpose, remove them on withdrawal and erasure, and carry unsubscribes made at the provider back into the waitlist via a webhook.

Taldres/laravel-waitlist

Build waitlist statistics with taldres/laravel-waitlist: signups and confirmations per day for charts, totals and confirmation rates for a period, the confirmed count on any past day, and how many people are on a list right now, for dashboards, admin pages and API endpoints.

Taldres/laravel-waitlist

Write feature tests for an application's taldres/laravel-waitlist integration: get the plain tokens from events, assert the confirmation and other mails, test the signup, confirm and unsubscribe flows in PHP and over the package's HTTP routes, and bypass rate limits and bot checks in tests.

相关技能