Communityコーディング&開発github.com

Taldres/laravel-waitlist

Laravelパッケージの機能を追加し、サービスプロバイダを通じて配線するためのスキルです。コマンド、マイグレーション、ルート、設定マージ、ビュー、翻訳、アセット、ミドルウェア、公開タグ、workbenchファイル、コンソール専用の動作を扱います。

laravel-waitlist とは?

このスキルは、Laravelパッケージの開発時に、パッケージ機能を適切な場所に配置し、サービスプロバイダを通じて明示的なLaravel APIを使用して配線するための詳細なガイドラインを提供します。パッケージ名、名前空間、設定キー、公開タグの一貫性を維持することに重点を置いており、開発者はコマンド、マイグレーション、ルート、設定、ビュー、翻訳、アセット、ミドルウェア、テスト、README、互換性、リリースフローなどの機能を追加する際に従うべきワークフローが定義されています。特に、サービスプロバイダでの配線パターン(`register()` と `boot()` メソッドの使い分け、コンソール実行時のガード、公開タグの命名規則など)やアンチパターンが明確に示されており、Laravelパッケージ開発のベストプラクティスを学ぶのに役立ちます。Claude CodeやCursorなどのAIエージェントが、パッケージ構造を解析し、一貫性のある方法で新機能を追加するための支援ツールとして機能します。

対応~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に質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

パッケージスキャフォールド

主要な目標

パッケージの機能を適切な場所に追加し、明示的なLaravel APIを使用してサービスプロバイダを通じて配線し、パッケージ名、名前空間、設定キー、公開タグの一貫性を保ちます。

ワークフロー

  1. ファイルを作成する前に、既存のパッケージ構造、類似の例、READMEのセットアップノート、現在のサービスプロバイダを検査します。
  2. リクエストがコマンド、マイグレーション、ルート、設定、ビュー、翻訳、アセット、ミドルウェア、テスト、README/コントリビューティングドキュメント、互換性、またはリリースフローのいずれに触れるかを特定します。
  3. Laravelネイティブのパッケージパス以下に機能ファイルを作成し、設定されたパッケージ名、名前空間、公開タグ、URL、バッジを一貫して使用します。
  4. 以下の プロバイダ配線 のパターンを使用して、サービスプロバイダを通じて機能を配線します。
  5. カバレッジには package-testing を、ユーザー向けの動作が変更された場合はREADMEまたはコントリビューティングドキュメントを更新するために package-contributing を、マトリックスに敏感な変更には package-compatibility を、リリースタスクには package-release を使用します。
  6. 要求された機能に必要なファイルのみを追加し、より広範なチェックの前に最も狭い関連コマンドで検証します。

プロバイダ配線

  1. register() または boot() 内にプロバイダ配線を維持します。ただし、実際に繰り返される懸念事項を明確にするためにメソッドを抽出する場合は除きます。
  2. ホストアプリが設定を上書きできる必要がある場合は、コンテナバインディングと mergeConfigFrom 呼び出しを register() に配置します。
  3. リソースの読み込みは、loadRoutesFrom、loadViewsFrom、loadTranslationsFrom などのLaravelネイティブAPIを使用してブート時メソッドに配置します。
  4. runningInConsole() でコンソール専用の公開とコマンド登録をガードしてから、publishes、publishesMigrations、または commands を呼び出します。
  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 に配置し、waitlist-migrations タグを持つコンソールガード付きの publishesMigrations 呼び出しを通じて配線し、Testbenchで公開動作をテストします。
  • 新しい公開タグを配線する: 既存のコンソールガード付き公開メソッド内に publishes マップを追加し、タグを waitlist-* で命名します。

アンチパターン

  • 後で必要になるかもしれないという理由で未使用のファイルを追加すること。
  • パッケージ名、名前空間、設定キー、または公開タグを混在させること。
  • 承認なしに依存関係を変更すること。
  • 1つの機能固有の変更で済む場合に、明示的な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.

関連スキル