aceternity-ui
100+ animated React components (Aceternity UI) for Next.js with Tailwind. Use for hero sections, parallax, 3D effects, or…
Cloudflare Workers observability with logging, Analytics Engine, Tail Workers, metrics, and alerting. Use for monitoring, debugging, tracing, or encountering log parsing, metric aggregation, alert configuration errors.
Claude Code
$ npx -y skills add secondsky/claude-skills --skill cloudflare-workers-observability --agent claude-code
Codex
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-observability -a codex -y
Cursor
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-observability -a cursor -y
Gemini CLI
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-observability -a gemini-cli -y
GitHub Copilot
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-observability -a github-copilot -y
OpenCode
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-observability -a opencode -y
Windsurf
$ npx skills add secondsky/claude-skills --skill cloudflare-workers-observability -a windsurf -y
name: cloudflare-workers-observability description: Cloudflare Workers observability with logging, Analytics Engine, Tail Workers, metrics, and alerting. Use for monitoring, debugging, tracing, or encountering log parsing, metric aggregation, alert configuration errors. license: MIT
Production-grade observability for Cloudflare Workers: logging, metrics, tracing, and alerting.
// Structured logging with context
export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
const requestId = crypto.randomUUID();
const logger = createLogger(requestId, env);
try {
logger.info('Request received', { method: request.method, url: request.url });
const result = await handleRequest(request, env);
logger.info('Request completed', { status: result.status });
return result;
} catch (error) {
logger.error('Request failed', { error: error.message, stack: error.stack });
throw error;
}
}
};
// Simple logger factory
function createLogger(requestId: string, env: Env) {
return {
info: (msg: string, data?: object) => console.log(JSON.stringify({ level: 'info', requestId, msg, ...data, timestamp: Date.now() })),
error: (msg: string, data?: object) => console.error(JSON.stringify({ level: 'error', requestId, msg, ...data, timestamp: Date.now() })),
warn: (msg: string, data?: object) => console.warn(JSON.stringify({ level: 'warn', requestId, msg, ...data, timestamp: Date.now() })),
};
}1. **Always use structured JSON logging** - Plain text logs are hard to parse and aggregate 2. **Include request context** - Request ID, method, path in every log entry 3. **Never log sensitive data** - Redact tokens, passwords, PII from logs 4. **Use appropriate log levels** - ERROR for failures, WARN for recoverable issues, INFO for operations 5. **Sample high-volume logs** - Use 1-10% sampling for request logs in production
| Component | Purpose | When to Use | |-----------|---------|-------------| | `console.log` | Basic logging | Development, debugging | | **Tail Workers** | Real-time log streaming | Production log aggregation | | **Analytics Engine** | Custom metrics/analytics | Business metrics, performance tracking | | **Logpush** | Log export to external services | Long-term storage, compliance | | **Workers Trace Events** | Distributed tracing | Request flow debugging |
| Error | Symptom | Prevention | |-------|---------|------------| | Logs not appearing | No output in dashboard | Enable "Standard" logging in wrangler.jsonc | | Log truncation | Messages cut off at 128KB | Chunk large payloads, use sampling | | Tail Worker not receiving | No events processed | Check binding name matches wrangler.jsonc | | Analytics Engine write fails | Data not recorded | Verify AE binding, check blobs format | | PII in logs | Security/compliance violation | Implement redaction middleware | | Missing request context | Can't correlate logs | Add requestId to all log entries | | Log volume explosion | High costs, noise | Implement sampling for high-frequency events | | Alerting gaps | Incidents not detected | Configure monitors for error rate thresholds |
**wrangler.jsonc**:
{
"name": "my-worker",
"observability": {
"enabled": true,
"head_sampling_rate": 1 // 0-1, 1 = 100% of requests
},
"tail_consumers": [
{
"service": "log-aggregator", // Tail Worker name
"environment": "production"
}
],
"analytics_engine_datasets": [
{
"binding": "ANALYTICS",
"dataset": "my_worker_metrics"
}
]
}interface LogEntry {
level: 'debug' | 'info' | 'warn' | 'error';
message: string;
requestId: string;
timestamp: number;
// Contextual data
method?: string;
path?: string;
status?: number;
duration?: number;
// Error details
error?: {
name: string;
message: string;
stack?: string;
};
// Custom fields
[key: string]: unknown;
}
class Logger {
constructor(private requestId: string, private baseContext: object = {}) {}
private log(level: LogEntry['level'], message: string, data?: object) {
const entry: LogEntry = {
level,
message,
requestId: this.requestId,
timestamp: Date.now(),
...this.baseContext,
...data,
};
// Redact sensitive fields
const sanitized = this.redact(entry);
const output = JSON.stringify(sanitized);
level === 'error' ? console.error(output) : console.log(output);
}
private redact(entry: LogEntry): LogEntry {
const sensitiveKeys = ['password', 'token', 'secret', 'authorization', 'cookie'];
const redacted = { ...entry };
for (const key of Object.keys(redacted)) {
if (sensitiveKeys.some(s => key.toLowerCase().includes(s))) {
redacted[key] = '[REDACTED]';
}
}
return redacted;
}
info(message: string, data?: object) { this.log('info', message, data); }
warn(message: string, data?: object) { this.log('warn', message, data); }
error(message: string, data?: object) { this.log('error', message, data); }
debug(message: string, data?: object) { this.log('debug', message, data); }
}interface Env {
ANALYTICS: AnalyticsEngineDataset;
}
export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext): Promise<Response> {
const start = Date.now();
const url = new URL(request.url);
try {
const response = await handleRequest(request, env);
// Write success metric
env.ANALYTICS.writeDataPoint({
blobs: [request.method, url.pathname, String(response.status)],
doubles: [Date.now() - start], // Response time in ms
indexes: [url.pathname.split('/')[1] || 'root'], // Index145 production-ready skills for Claude Code CLI 🔌 Platform / Harness Support These plugins ship as Claude Code marketplace plugins (.claude-plugin/ manifests) and Codex CLI plugins (.codex-plugin/ manifests).
100+ animated React components (Aceternity UI) for Next.js with Tailwind. Use for hero sections, parallax, 3D effects, or…
Secure API authentication with JWT, OAuth 2.0, API keys. Use for authentication systems, third-party integrations,…
Creates comprehensive API changelogs documenting breaking changes, deprecations, and migration strategies for API consumers. Use…
Verifies API contracts between services using consumer-driven contracts, schema validation, and tools like Pact. Use when testing…
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use…
Implements standardized API error responses with proper status codes, logging, and user-friendly messages. Use when building…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.