Community程式設計與開發github.com

Taldres/laravel-waitlist

在撰寫、編輯、修正或審查套件測試時使用此技能,搭配 Pest 4/5 與 Orchestra Testbench,涵蓋 TDD、功能測試、單元測試、型別覆蓋率、架構測試、Workbench 行為、命令、路由、設定、遷移檔及可發布資源。

laravel-waitlist 是什麼?

此 AI 技能專為 Laravel 套件開發者設計,提供一套結構化的測試流程,結合 Pest 4/5 與 Orchestra Testbench 框架。其核心目標是透過 TDD(測試驅動開發)流程,在實作功能前或實作同時,以最小測試驗證套件行為。技能涵蓋完整的測試類型,包括功能測試、單元測試、型別覆蓋率測試及架構測試,並支援對設定合併、可發布資源、路由、Artisan 命令及遷移檔的驗證。工作流程強調先撰寫最小失敗測試,再實作讓測試通過的程式碼,並在反覆迭代中使用 `composer test:unit -- --filter ...` 等指令。此技能避免反模式,如刪除實際套件測試或僅依賴煙霧測試,確保測試套件的完整性與可靠性。支援平台包含 Pest 4/5、Orchestra Testbench 及 Laravel 套件開發環境。

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

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

套件測試

主要目標

在實作之前或與實作同時,使用 Pest 4/5、Orchestra Testbench 及本機 tests/TestCase.php 設定,證明套件行為符合預期。

工作流程

  1. 從 TDD 開始:針對需求行為撰寫最小的失敗套件測試,然後實作最小的變更以讓測試通過。
  2. 當功能具有有意義的失敗模式時,涵蓋快樂路徑、不快樂路徑及邊界情況行為。
  3. 對於套件整合行為,優先使用聚焦的功能測試;對於廣泛的限制條件,優先使用架構測試。
  4. 在反覆迭代時使用 composer test:unit -- --filter ...,當型別敏感的測試或程式碼變更時使用 composer test:types,並在完成前執行 composer test。
  5. 保留實際的套件測試在測試套件中,僅移除明確為本機脚手架實驗而建立的拋棄式測試。

參考資料

  • tests/TestCase.php
  • tests/Pest.php
  • tests/Feature/
  • tests/Unit/
  • tests/ArchTest.php
  • composer.json 腳本

範例

  • 測試設定合併與設定覆蓋:透過斷言預設套件設定,然後在 Testbench 應用程式中覆蓋主機設定值來進行。
  • 測試可發布的資源、遷移檔、檢視、語言檔案或設定:透過呼叫供應商發布行為,並斷言目標路徑存在。
  • 使用 Testbench HTTP 請求測試路由、使用 Artisan 斷言測試命令、使用 SQLite 測試資料庫測試遷移檔,以及在必要時於 composer build 後測試 Workbench 行為。

反模式

  • 因為麻煩而刪除實際的套件測試。
  • 當行為需要斷言時,僅依賴煙霧測試。
  • 當可觀察的套件行為可用時,測試實作細節。
  • 將拋棄式的脚手架實驗測試保留在套件測試套件中。

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 adding Laravel package capabilities or wiring them through the service provider: commands, migrations, routes, config merges, views, translations, assets, middleware, publish tags, workbench files, or console-only behavior.

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.

相關技能