[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CZSV9FWPPCEMX693SGRBQ2":3,"skill-same:01M7CZSV9FWPPCEMX693SGRBQ2":52},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7CZSV9FWPPCEMX693SGRBQ2","configure-nightwatch",null,"Configures Laravel Nightwatch data collection, sampling rates, filtering rules, and redaction policies. Use when setting up Nightwatch, managing data volume, protecting sensitive data (PII), or optimizing event collection for production workloads.","itsmejay18\u002FAI-Skills-for-My-Development-Stack","itsmejay18","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F167779943?v=4","01M7CZRFC6DDZA5V2CX8WDSZED","Jay Jemino Ababon ","01M7CZRFCVRNW1SFHSQXEJ3CQN",0,"MIT","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F01-Laravel-Web-Development\u002Fconfigure-nightwatch\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: configure-nightwatch\ndescription: Configures Laravel Nightwatch data collection, sampling rates, filtering rules, and redaction policies. Use when setting up Nightwatch, managing data volume, protecting sensitive data (PII), or optimizing event collection for production workloads.\nlicense: MIT\nmetadata:\n  author: laravel\n---\n\n# Nightwatch Configuration Guide\n\nThis skill helps configure Laravel Nightwatch data collection to balance observability, performance, and privacy. Covers sampling strategies, filtering rules, and redaction methods across all event types.\n\n## Documentation Reference\n\nThe [Nightwatch Documentation](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs) is the definitive and up-to-date source of information for all Nightwatch configuration options. This skill provides practical guidance and common patterns, but always consult the official documentation as the primary source of truth for specific details, environment variables, and API behavior. The documentation includes comprehensive coverage of:\n\n- [Filtering and Configuration](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Ffiltering) - Core concepts for sampling, filtering, and redaction\n- Individual event type pages with specific configuration options:\n  - [Requests](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Frequests) - Request sampling, header handling, payload capture\n  - [Commands](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fcommands) - Command sampling and redaction\n  - [Queries](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fqueries) - Query filtering and redaction\n  - [Cache](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fcache) - Cache event filtering by key or pattern\n  - [Jobs](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fjobs) - Job filtering and sampling decoupling\n  - [Mail](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fmail) - Mail event filtering\n  - [Notifications](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fnotifications) - Notification filtering by channel\n  - [Exceptions](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fexceptions) - Exception sampling and throttling\n  - [Outgoing Requests](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Foutgoing-requests) - HTTP request filtering\n- [reference.md](reference.md) - Quick lookup table by event type, production presets, and verification checklist\n\n## Data Collection Flow\n\nNightwatch processes events through three stages:\n\n1. **Sampling** - Controls which entry points are captured (requests, commands, scheduled tasks)\n2. **Filtering** - Excludes specific events after sampling (queries, cache, mail, etc.)\n3. **Redaction** - Modifies captured data to remove\u002Fobfuscate sensitive information\n\n```\nRequest\u002FCommand\u002FScheduled Task\n       |\n       v\n   [Sampling?] ----NO----> Drop entire trace\n       | YES\n       v\n   Events generated\n       |\n       v\n   [Filtering?] ----YES---> Drop specific event\n       | NO\n       v\n   [Redaction] ----------> Store modified data\n```\n\n---\n\n## Sampling Configuration\n\nSampling determines which entry points (requests, commands, scheduled tasks) trigger full trace collection. When an entry point is sampled, all related events are captured.\n\n### Global Sample Rates\n\nConfigure via environment variables:\n\n```bash\n# Default: 100% sampling (all requests\u002Fcommands captured)\nNIGHTWATCH_REQUEST_SAMPLE_RATE=0.1      # Recommended: 10% of requests\nNIGHTWATCH_COMMAND_SAMPLE_RATE=1.0      # Capture all commands\nNIGHTWATCH_EXCEPTION_SAMPLE_RATE=1.0    # Always capture exceptions\n```\n\n**Recommendation**: Start with `0.1` (10%) for requests in production, adjust based on volume and needs.\n\n### Route-Based Sampling\n\nApply different rates to specific routes using the `Sample` middleware:\n\n```php routes\u002Fweb.php\nuse Illuminate\\Support\\Facades\\Route;\nuse Laravel\\Nightwatch\\Http\\Middleware\\Sample;\n\n\u002F\u002F Sample admin routes at 100%\nRoute::middleware(Sample::rate(1.0))->prefix('admin')->group(function () {\n    \u002F\u002F All admin routes sampled fully\n});\n\n\u002F\u002F Sample API routes at 5%\nRoute::middleware(Sample::rate(0.05))->prefix('api')->group(function () {\n    \u002F\u002F API routes sampled sparingly\n});\n\n\u002F\u002F Always sample critical endpoints\nRoute::post('\u002Fcheckout', [CheckoutController::class, 'process'])\n    ->middleware(Sample::always());\n\n\u002F\u002F Never sample health checks\nRoute::get('\u002Fhealth', [HealthController::class, 'check'])\n    ->middleware(Sample::never());\n```\n\n### Unmatched Route Sampling\n\nHandle 404\u002Fbot traffic with reduced sampling:\n\n```php routes\u002Fweb.php\nRoute::fallback(fn () => abort(404))\n    ->middleware(Sample::rate(0.01));  \u002F\u002F 1% sampling for unmatched routes\n```\n\n### Dynamic Sampling\n\nSample based on runtime conditions (user role, request attributes):\n\n```php app\u002FHttp\u002FMiddleware\u002FSampleAdminRequests.php\nuse Closure;\nuse Illuminate\\Http\\Request;\nuse Laravel\\Nightwatch\\Facades\\Nightwatch;\n\nclass SampleAdminRequests\n{\n    public function handle(Request $request, Closure $next)\n    {\n        if ($request->user()?->isAdmin()) {\n            Nightwatch::sample();  \u002F\u002F Always sample admin requests\n        }\n        return $next($request);\n    }\n}\n```\n\n### Command Sampling\n\nExclude specific commands from sampling:\n\n```php AppServiceProvider.php\nuse Illuminate\\Console\\Events\\CommandStarting;\nuse Illuminate\\Support\\Facades\\Event;\nuse Laravel\\Nightwatch\\Facades\\Nightwatch;\n\npublic function boot(): void\n{\n    Event::listen(function (CommandStarting $event) {\n        if (in_array($event->command, ['schedule:finish', 'horizon:snapshot'])) {\n            Nightwatch::dontSample();\n        }\n    });\n}\n```\n\n### Vendor Commands\n\nNightwatch automatically ignores framework\u002Finternal commands. Opt-in to capture them:\n\n```php\nNightwatch::captureDefaultVendorCommands();\n```\n\n---\n\n## Filtering Configuration\n\nFiltering excludes specific events from collection after sampling. Use filtering to reduce noise and quota usage.\n\n### Database Queries\n\n**Filter all queries** (disable query collection):\n\n```bash\nNIGHTWATCH_IGNORE_QUERIES=true\n```\n\n**Filter specific queries** by SQL pattern:\n\n```php AppServiceProvider.php\nuse Laravel\\Nightwatch\\Facades\\Nightwatch;\nuse Laravel\\Nightwatch\\Records\\Query;\n\npublic function boot(): void\n{\n    \u002F\u002F Filter job table queries (PostgreSQL)\n    Nightwatch::rejectQueries(function (Query $query) {\n        return str_contains($query->sql, 'into \"jobs\"');\n    });\n\n    \u002F\u002F Filter cache table queries (MySQL)\n    Nightwatch::rejectQueries(function (Query $query) {\n        return str_contains($query->sql, 'from `cache`')\n            || str_contains($query->sql, 'into `cache`');\n    });\n}\n```\n\n### Cache Events\n\n**Filter all cache events**:\n\n```bash\nNIGHTWATCH_IGNORE_CACHE_EVENTS=true\n```\n\n**Filter by cache key patterns**:\n\n```php\nNightwatch::rejectCacheKeys([\n    'my-app:users',                    \u002F\u002F Exact match\n    '\u002F^my-app:posts:\u002F',                \u002F\u002F Regex: starts with my-app:posts:\n    '\u002F^[a-zA-Z0-9]{40}$\u002F',             \u002F\u002F Regex: session IDs\n]);\n```\n\n**Filter with callback**:\n\n```php\nuse Laravel\\Nightwatch\\Records\\CacheEvent;\n\nNightwatch::rejectCacheEvents(function (CacheEvent $cacheEvent) {\n    return str_starts_with($cacheEvent->key, 'temp:');\n});\n```\n\n### Mail Events\n\n**Filter all mail**:\n\n```bash\nNIGHTWATCH_IGNORE_MAIL=true\n```\n\n**Filter specific mail**:\n\n```php\nuse Laravel\\Nightwatch\\Records\\Mail;\n\nNightwatch::rejectMail(function (Mail $mail) {\n    return str_contains($mail->subject, 'Newsletter');\n});\n```\n\n### Notification Events\n\n**Filter all notifications**:\n\n```bash\nNIGHTWATCH_IGNORE_NOTIFICATIONS=true\n```\n\n**Filter by channel**:\n\n```php\nuse Laravel\\Nightwatch\\Records\\Notification;\n\nNightwatch::rejectNotifications(function (Notification $notification) {\n    return $notification->channel === 'database';\n});\n```\n\n### Outgoing HTTP Requests\n\n**Filter all outgoing requests**:\n\n```bash\nNIGHTWATCH_IGNORE_OUTGOING_REQUESTS=true\n```\n\n**Filter by URL**:\n\n```php\nuse Laravel\\Nightwatch\\Records\\OutgoingRequest;\n\nNightwatch::rejectOutgoingRequests(function (OutgoingRequest $request) {\n    return str_contains($request->url, 'analytics.example.com');\n});\n```\n\n### Queued Jobs\n\n**Filter specific jobs**:\n\n```php\nuse Laravel\\Nightwatch\\Records\\QueuedJob;\n\nNightwatch::rejectQueuedJobs(function (QueuedJob $job) {\n    return $job->name === 'App\\Jobs\\LowPriorityJob';\n});\n```\n\n### Decoupling Job Sampling\n\nSample jobs independently from parent contexts:\n\n```php\nuse Illuminate\\Support\\Facades\\Queue;\n\npublic function boot(): void\n{\n    Queue::before(fn () => Nightwatch::sample(rate: 0.5));\n}\n```\n\n---\n\n## Redaction Configuration\n\nRedaction modifies captured data to remove or obfuscate sensitive information. Unlike filtering, redaction keeps the event but sanitizes its content.\n\n### Request Redaction\n\n**Redact sensitive headers** (automatically redacts: Authorization, Cookie, X-XSRF-TOKEN):\n\n```bash\n# Customize redacted headers\nNIGHTWATCH_REDACT_HEADERS=Authorization,Cookie,Proxy-Authorization,X-API-Key\n```\n\n**Redact request payloads** (disabled by default):\n\n```bash\n# Enable payload capture\nNIGHTWATCH_CAPTURE_REQUEST_PAYLOAD=true\n\n# Customize redacted fields\nNIGHTWATCH_REDACT_PAYLOAD_FIELDS=password,password_confirmation,ssn,credit_card\n```\n\n**Programmatic redaction**:\n\n```php\nuse Laravel\\Nightwatch\\Facades\\Nightwatch;\nuse Laravel\\Nightwatch\\Records\\Request;\n\nNightwatch::redactRequests(function (Request $request) {\n    $request->url = str_replace('secret', '***', $request->url);\n    $request->ip = preg_replace('\u002F\\d+$\u002F', '***', $request->ip);\n});\n```\n\n### Query Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\Query;\n\nNightwatch::redactQueries(function (Query $query) {\n    $query->sql = str_replace('secret_token', '***', $query->sql);\n});\n```\n\n### Cache Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\CacheEvent;\n\nNightwatch::redactCacheEvents(function (CacheEvent $cacheEvent) {\n    $cacheEvent->key = str_replace('user:', 'user:***:', $cacheEvent->key);\n});\n```\n\n### Command Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\Command;\n\nNightwatch::redactCommands(function (Command $command) {\n    $command->command = preg_replace('\u002F--password=\\S+\u002F', '--password=***', $command->command);\n});\n```\n\n### Exception Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\Exception;\n\nNightwatch::redactExceptions(function (Exception $exception) {\n    $exception->message = str_replace('secret', '***', $exception->message);\n});\n```\n\n### Mail Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\Mail;\n\nNightwatch::redactMail(function (Mail $mail) {\n    $mail->subject = str_replace('Invoice #', 'Invoice ***', $mail->subject);\n});\n```\n\n### Outgoing Request Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\OutgoingRequest;\n\nNightwatch::redactOutgoingRequests(function (OutgoingRequest $outgoingRequest) {\n    $outgoingRequest->url = preg_replace('\u002Fapi_key=\\w+\u002F', 'api_key=***', $outgoingRequest->url);\n});\n```\n","# Nightwatch Configuration Guide\n\nThis skill helps configure Laravel Nightwatch data collection to balance observability, performance, and privacy. Covers sampling strategies, filtering rules, and redaction methods across all event types.\n\n## Documentation Reference\n\nThe [Nightwatch Documentation](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs) is the definitive and up-to-date source of information for all Nightwatch configuration options. This skill provides practical guidance and common patterns, but always consult the official documentation as the primary source of truth for specific details, environment variables, and API behavior. The documentation includes comprehensive coverage of:\n\n- [Filtering and Configuration](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Ffiltering) - Core concepts for sampling, filtering, and redaction\n- Individual event type pages with specific configuration options:\n  - [Requests](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Frequests) - Request sampling, header handling, payload capture\n  - [Commands](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fcommands) - Command sampling and redaction\n  - [Queries](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fqueries) - Query filtering and redaction\n  - [Cache](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fcache) - Cache event filtering by key or pattern\n  - [Jobs](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fjobs) - Job filtering and sampling decoupling\n  - [Mail](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fmail) - Mail event filtering\n  - [Notifications](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fnotifications) - Notification filtering by channel\n  - [Exceptions](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Fexceptions) - Exception sampling and throttling\n  - [Outgoing Requests](https:\u002F\u002Fnightwatch.laravel.com\u002Fdocs\u002Foutgoing-requests) - HTTP request filtering\n- [reference.md](reference.md) - Quick lookup table by event type, production presets, and verification checklist\n\n## Data Collection Flow\n\nNightwatch processes events through three stages:\n\n1. **Sampling** - Controls which entry points are captured (requests, commands, scheduled tasks)\n2. **Filtering** - Excludes specific events after sampling (queries, cache, mail, etc.)\n3. **Redaction** - Modifies captured data to remove\u002Fobfuscate sensitive information\n\n```\nRequest\u002FCommand\u002FScheduled Task\n       |\n       v\n   [Sampling?] ----NO----> Drop entire trace\n       | YES\n       v\n   Events generated\n       |\n       v\n   [Filtering?] ----YES---> Drop specific event\n       | NO\n       v\n   [Redaction] ----------> Store modified data\n```\n\n---\n\n## Sampling Configuration\n\nSampling determines which entry points (requests, commands, scheduled tasks) trigger full trace collection. When an entry point is sampled, all related events are captured.\n\n### Global Sample Rates\n\nConfigure via environment variables:\n\n```bash\n# Default: 100% sampling (all requests\u002Fcommands captured)\nNIGHTWATCH_REQUEST_SAMPLE_RATE=0.1      # Recommended: 10% of requests\nNIGHTWATCH_COMMAND_SAMPLE_RATE=1.0      # Capture all commands\nNIGHTWATCH_EXCEPTION_SAMPLE_RATE=1.0    # Always capture exceptions\n```\n\n**Recommendation**: Start with `0.1` (10%) for requests in production, adjust based on volume and needs.\n\n### Route-Based Sampling\n\nApply different rates to specific routes using the `Sample` middleware:\n\n```php routes\u002Fweb.php\nuse Illuminate\\Support\\Facades\\Route;\nuse Laravel\\Nightwatch\\Http\\Middleware\\Sample;\n\n\u002F\u002F Sample admin routes at 100%\nRoute::middleware(Sample::rate(1.0))->prefix('admin')->group(function () {\n    \u002F\u002F All admin routes sampled fully\n});\n\n\u002F\u002F Sample API routes at 5%\nRoute::middleware(Sample::rate(0.05))->prefix('api')->group(function () {\n    \u002F\u002F API routes sampled sparingly\n});\n\n\u002F\u002F Always sample critical endpoints\nRoute::post('\u002Fcheckout', [CheckoutController::class, 'process'])\n    ->middleware(Sample::always());\n\n\u002F\u002F Never sample health checks\nRoute::get('\u002Fhealth', [HealthController::class, 'check'])\n    ->middleware(Sample::never());\n```\n\n### Unmatched Route Sampling\n\nHandle 404\u002Fbot traffic with reduced sampling:\n\n```php routes\u002Fweb.php\nRoute::fallback(fn () => abort(404))\n    ->middleware(Sample::rate(0.01));  \u002F\u002F 1% sampling for unmatched routes\n```\n\n### Dynamic Sampling\n\nSample based on runtime conditions (user role, request attributes):\n\n```php app\u002FHttp\u002FMiddleware\u002FSampleAdminRequests.php\nuse Closure;\nuse Illuminate\\Http\\Request;\nuse Laravel\\Nightwatch\\Facades\\Nightwatch;\n\nclass SampleAdminRequests\n{\n    public function handle(Request $request, Closure $next)\n    {\n        if ($request->user()?->isAdmin()) {\n            Nightwatch::sample();  \u002F\u002F Always sample admin requests\n        }\n        return $next($request);\n    }\n}\n```\n\n### Command Sampling\n\nExclude specific commands from sampling:\n\n```php AppServiceProvider.php\nuse Illuminate\\Console\\Events\\CommandStarting;\nuse Illuminate\\Support\\Facades\\Event;\nuse Laravel\\Nightwatch\\Facades\\Nightwatch;\n\npublic function boot(): void\n{\n    Event::listen(function (CommandStarting $event) {\n        if (in_array($event->command, ['schedule:finish', 'horizon:snapshot'])) {\n            Nightwatch::dontSample();\n        }\n    });\n}\n```\n\n### Vendor Commands\n\nNightwatch automatically ignores framework\u002Finternal commands. Opt-in to capture them:\n\n```php\nNightwatch::captureDefaultVendorCommands();\n```\n\n---\n\n## Filtering Configuration\n\nFiltering excludes specific events from collection after sampling. Use filtering to reduce noise and quota usage.\n\n### Database Queries\n\n**Filter all queries** (disable query collection):\n\n```bash\nNIGHTWATCH_IGNORE_QUERIES=true\n```\n\n**Filter specific queries** by SQL pattern:\n\n```php AppServiceProvider.php\nuse Laravel\\Nightwatch\\Facades\\Nightwatch;\nuse Laravel\\Nightwatch\\Records\\Query;\n\npublic function boot(): void\n{\n    \u002F\u002F Filter job table queries (PostgreSQL)\n    Nightwatch::rejectQueries(function (Query $query) {\n        return str_contains($query->sql, 'into \"jobs\"');\n    });\n\n    \u002F\u002F Filter cache table queries (MySQL)\n    Nightwatch::rejectQueries(function (Query $query) {\n        return str_contains($query->sql, 'from `cache`')\n            || str_contains($query->sql, 'into `cache`');\n    });\n}\n```\n\n### Cache Events\n\n**Filter all cache events**:\n\n```bash\nNIGHTWATCH_IGNORE_CACHE_EVENTS=true\n```\n\n**Filter by cache key patterns**:\n\n```php\nNightwatch::rejectCacheKeys([\n    'my-app:users',                    \u002F\u002F Exact match\n    '\u002F^my-app:posts:\u002F',                \u002F\u002F Regex: starts with my-app:posts:\n    '\u002F^[a-zA-Z0-9]{40}$\u002F',             \u002F\u002F Regex: session IDs\n]);\n```\n\n**Filter with callback**:\n\n```php\nuse Laravel\\Nightwatch\\Records\\CacheEvent;\n\nNightwatch::rejectCacheEvents(function (CacheEvent $cacheEvent) {\n    return str_starts_with($cacheEvent->key, 'temp:');\n});\n```\n\n### Mail Events\n\n**Filter all mail**:\n\n```bash\nNIGHTWATCH_IGNORE_MAIL=true\n```\n\n**Filter specific mail**:\n\n```php\nuse Laravel\\Nightwatch\\Records\\Mail;\n\nNightwatch::rejectMail(function (Mail $mail) {\n    return str_contains($mail->subject, 'Newsletter');\n});\n```\n\n### Notification Events\n\n**Filter all notifications**:\n\n```bash\nNIGHTWATCH_IGNORE_NOTIFICATIONS=true\n```\n\n**Filter by channel**:\n\n```php\nuse Laravel\\Nightwatch\\Records\\Notification;\n\nNightwatch::rejectNotifications(function (Notification $notification) {\n    return $notification->channel === 'database';\n});\n```\n\n### Outgoing HTTP Requests\n\n**Filter all outgoing requests**:\n\n```bash\nNIGHTWATCH_IGNORE_OUTGOING_REQUESTS=true\n```\n\n**Filter by URL**:\n\n```php\nuse Laravel\\Nightwatch\\Records\\OutgoingRequest;\n\nNightwatch::rejectOutgoingRequests(function (OutgoingRequest $request) {\n    return str_contains($request->url, 'analytics.example.com');\n});\n```\n\n### Queued Jobs\n\n**Filter specific jobs**:\n\n```php\nuse Laravel\\Nightwatch\\Records\\QueuedJob;\n\nNightwatch::rejectQueuedJobs(function (QueuedJob $job) {\n    return $job->name === 'App\\Jobs\\LowPriorityJob';\n});\n```\n\n### Decoupling Job Sampling\n\nSample jobs independently from parent contexts:\n\n```php\nuse Illuminate\\Support\\Facades\\Queue;\n\npublic function boot(): void\n{\n    Queue::before(fn () => Nightwatch::sample(rate: 0.5));\n}\n```\n\n---\n\n## Redaction Configuration\n\nRedaction modifies captured data to remove or obfuscate sensitive information. Unlike filtering, redaction keeps the event but sanitizes its content.\n\n### Request Redaction\n\n**Redact sensitive headers** (automatically redacts: Authorization, Cookie, X-XSRF-TOKEN):\n\n```bash\n# Customize redacted headers\nNIGHTWATCH_REDACT_HEADERS=Authorization,Cookie,Proxy-Authorization,X-API-Key\n```\n\n**Redact request payloads** (disabled by default):\n\n```bash\n# Enable payload capture\nNIGHTWATCH_CAPTURE_REQUEST_PAYLOAD=true\n\n# Customize redacted fields\nNIGHTWATCH_REDACT_PAYLOAD_FIELDS=password,password_confirmation,ssn,credit_card\n```\n\n**Programmatic redaction**:\n\n```php\nuse Laravel\\Nightwatch\\Facades\\Nightwatch;\nuse Laravel\\Nightwatch\\Records\\Request;\n\nNightwatch::redactRequests(function (Request $request) {\n    $request->url = str_replace('secret', '***', $request->url);\n    $request->ip = preg_replace('\u002F\\d+$\u002F', '***', $request->ip);\n});\n```\n\n### Query Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\Query;\n\nNightwatch::redactQueries(function (Query $query) {\n    $query->sql = str_replace('secret_token', '***', $query->sql);\n});\n```\n\n### Cache Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\CacheEvent;\n\nNightwatch::redactCacheEvents(function (CacheEvent $cacheEvent) {\n    $cacheEvent->key = str_replace('user:', 'user:***:', $cacheEvent->key);\n});\n```\n\n### Command Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\Command;\n\nNightwatch::redactCommands(function (Command $command) {\n    $command->command = preg_replace('\u002F--password=\\S+\u002F', '--password=***', $command->command);\n});\n```\n\n### Exception Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\Exception;\n\nNightwatch::redactExceptions(function (Exception $exception) {\n    $exception->message = str_replace('secret', '***', $exception->message);\n});\n```\n\n### Mail Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\Mail;\n\nNightwatch::redactMail(function (Mail $mail) {\n    $mail->subject = str_replace('Invoice #', 'Invoice ***', $mail->subject);\n});\n```\n\n### Outgoing Request Redaction\n\n```php\nuse Laravel\\Nightwatch\\Records\\OutgoingRequest;\n\nNightwatch::redactOutgoingRequests(function (OutgoingRequest $outgoingRequest) {\n    $outgoingRequest->url = preg_replace('\u002Fapi_key=\\w+\u002F', 'api_key=***', $outgoingRequest->url);\n});\n```\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25},"laravel","main","30954af1dcd1a74b63f05deb2e2c41e5ecae4a82","01-Laravel-Web-Development\u002Fconfigure-nightwatch","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack","https:\u002F\u002Fgithub.com\u002Fitsmejay18","2026-09-18 16:06:36",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill configure-nightwatch",{"tool":38,"command":39},"bunx","bunx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill configure-nightwatch",{"tool":41,"command":42},"pnpm","pnpm dlx skills add itsmejay18\u002FAI-Skills-for-My-Development-Stack --skill configure-nightwatch","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F01-Laravel-Web-Development\u002Fconfigure-nightwatch\u002FSKILL.md",true,[46],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"reference.md","REFERENCE","参考文档",3944,"https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F01-Laravel-Web-Development\u002Fconfigure-nightwatch\u002Freference.md",[53,60,67,74,81,88],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7D2RKBHPZ3E1RNN5DWHT550","vectorization","Design, implement, optimize, and review SIMD code in .NET. USE FOR: vectorizing scalar loops with TensorPrimitives, Vector64\u002F128\u002F256\u002F512, or platform hardware intrinsics; reviewing existing SIMD code, including Vector\u003CT>, for contract equivalence, tail handling, memory safety, portability, fallbacks, and measured performance. DO NOT USE FOR: performance work unrelated to SIMD or vectorization.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fvectorization\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7D2RDJ7RN3QK8GJR0QTER1D","resolve-project-references","Guide for interpreting ResolveProjectReferences time in MSBuild performance summaries. Activate when ResolveProjectReferences appears as the most expensive target and developers are trying to optimize it directly. Explains that the reported time includes wait time for dependent project builds and is misleading. Guides users to focus on task self-time instead. Do not activate for general build performance -- use build-perf-diagnostics instead.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fresolve-project-references\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M7D2R1H2GTNZYHG9YRX3JDQW","optimizing-ef-core-queries","Optimize and improve the performance of slow Entity Framework Core (EF Core) queries: make them generate less SQL, make fewer database round-trips, and return results faster. Use whenever an EF Core or DbContext query or data-access path is slow or should be made faster — whether or not EF Core owns the database schema. For EF Core, not Dapper or raw ADO.NET.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Foptimizing-ef-core-queries\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M7D2QREG04W1YT0NEBHEW5C9","microbenchmarking","Activate this skill when BenchmarkDotNet (BDN) is involved in the task — creating, running, configuring, or reviewing BDN benchmarks. Also activate when microbenchmarking .NET code would be useful and BenchmarkDotNet is the likely tool. Consider activating when answering a .NET performance question requires measurement and BenchmarkDotNet may be needed. Covers microbenchmark design, BDN configuration and project setup, how to run BDN microbenchmarks efficiently and effectively, and using BDN for side-by-side performance comparisons. Do NOT use for profiling\u002Ftracing .NET code (dotnet-trace, PerfView), production telemetry, or load\u002Fstress testing (Crank, k6).","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fmicrobenchmarking\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M7D2QGE175XWPZVACVH2868Z","incremental-build","Guide for optimizing MSBuild incremental builds. USE FOR: builds slower than expected on subsequent runs, 'nothing changed but it rebuilds anyway', diagnosing why targets re-execute unnecessarily, fixing broken no-op builds. Covers 8 common causes: missing Inputs\u002FOutputs on custom targets, volatile properties in output paths (timestamps\u002FGUIDs), file writes outside tracked Outputs, missing FileWrites registration, glob changes, Visual Studio Fast Up-to-Date Check (FUTDC) issues. Key diagnostic: look for 'Building target completely' vs 'Skipping target' in binlog. DO NOT USE FOR: first-time build slowness (use build-perf-baseline), parallelism issues (use build-parallelism), evaluation-phase slowness (use eval-performance), non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Fincremental-build\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M7D2Q1DQTC6K49R73WQTTPSB","eval-performance","Guide for diagnosing and improving MSBuild project evaluation performance. USE FOR: builds slow before any compilation starts, high evaluation time in binlog analysis, expensive glob patterns walking large directories (node_modules, .git, bin\u002Fobj), deep import chains (>20 levels), preprocessed output >10K lines indicating heavy evaluation, property functions with file I\u002FO ($([System.IO.File]::ReadAllText(...))), multiple evaluations per project. Covers the 5 MSBuild evaluation phases, glob optimization via DefaultItemExcludes, import chain analysis with \u002Fpp preprocessing. DO NOT USE FOR: compilation-time slowness (use build-perf-diagnostics), incremental build issues (use incremental-build), non-MSBuild build systems.","https:\u002F\u002Fgithub.com\u002Fitsmejay18\u002FAI-Skills-for-My-Development-Stack\u002Fblob\u002Fmain\u002F20-Performance-Optimization\u002Feval-performance\u002FSKILL.md",[],[]]