ab-test-analysis
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes…
Implement structured logging with JSON formats, log levels (DEBUG, INFO, WARN, ERROR), contextual logging, PII handling, and centralized logging. Use for logging, observability, log levels, structured logs, or debugging.
$ npx -y skills add aj-geddes/useful-ai-prompts --skill logging-best-practices --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/logging-best-practicesContext preview
The summary Claude sees to decide when to auto-load this skill.
Implement structured logging with JSON formats, log levels (DEBUG, INFO, WARN, ERROR), contextual logging, PII handling, and centralized logging. Use for logging, observability, log levels, structured logs, or debugging.
name: logging-best-practices description: > Implement structured logging with JSON formats, log levels (DEBUG, INFO, WARN, ERROR), contextual logging, PII handling, and centralized logging. Use for logging, observability, log levels, structured logs, or debugging.
Comprehensive guide to implementing structured, secure, and performant logging across applications. Covers log levels, structured logging formats, contextual information, PII protection, and centralized logging systems.
Minimal working example:
// logger.ts
enum LogLevel {
DEBUG = 0, // Detailed information for debugging
INFO = 1, // General informational messages
WARN = 2, // Warning messages, potentially harmful
ERROR = 3, // Error messages, application can continue
FATAL = 4, // Critical errors, application must stop
}
class Logger {
constructor(private minLevel: LogLevel = LogLevel.INFO) {}
debug(message: string, context?: object) {
if (this.minLevel <= LogLevel.DEBUG) {
this.log(LogLevel.DEBUG, message, context);
}
}
info(message: string, context?: object) {
if (this.minLevel <= LogLevel.INFO) {
this.log(LogLevel.INFO, message, context);
}
}
warn(message: string, context?: object) {
// ... (see reference guides for full implementation)Detailed implementations in the `references/` directory:
| Guide | Contents | |---|---| | [Log Levels](references/log-levels.md) | Log Levels | | [Structured Logging (JSON)](references/structured-logging-json.md) | Structured Logging (JSON) | | [Contextual Logging](references/contextual-logging.md) | Contextual Logging | | [PII and Sensitive Data Handling](references/pii-and-sensitive-data-handling.md) | PII and Sensitive Data Handling | | [Performance Logging](references/performance-logging.md) | Performance Logging | | [Centralized Logging](references/centralized-logging.md) | Centralized Logging | | [Distributed Tracing](references/distributed-tracing.md) | Distributed Tracing | | [Log Sampling (High-Volume Services)](references/log-sampling-high-volume-services.md) | Log Sampling (High-Volume Services) |
488 production-ready AI prompts, all following a standardized template with validated quality gates. Transform ChatGPT, Claude, and other AI assistants into expert consultants.
Repo: aj-geddes/useful-ai-prompts
Design and analyze A/B tests, calculate statistical significance, and determine sample sizes…
Implement Role-Based Access Control (RBAC), permissions management, and authorization…
Implement WCAG 2.1/2.2 accessibility standards, screen reader compatibility, keyboard…
Test web applications for WCAG compliance and ensure usability for users with disabilities.…
Plan and execute effective sprints using Agile methodologies. Define sprint goals, estimate…
Implement comprehensive alert management with PagerDuty, escalation policies, and incident…