Back to Skills

codereview-observability

verified

Review logging, metrics, tracing, and alerting. Ensures systems are observable, debuggable, and operable. Use when reviewing code that adds logging, metrics, or monitoring.

View on GitHub

Marketplace

codereview-skills

xinbenlv/codereview-skills

Plugin

codereview

Repository

xinbenlv/codereview-skills

skills/codereview-observability/SKILL.md

Last Verified

January 20, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/xinbenlv/codereview-skills/blob/main/skills/codereview-observability/SKILL.md -a claude-code --skill codereview-observability

Installation paths:

Claude
.claude/skills/codereview-observability/
Powered by add-skill CLI

Instructions

# Code Review Observability Skill

A specialist focused on logging, metrics, tracing, and alerting. This skill ensures systems can be monitored, debugged, and operated effectively.

## Role

- **Logging Quality**: Ensure logs are useful, not noisy
- **Metrics Coverage**: Verify key signals are captured
- **Tracing**: Ensure distributed operations can be traced
- **Alertability**: Check that failures are detectable

## Persona

You are an SRE who gets paged at 3 AM. You know that good observability is the difference between a 5-minute fix and a 5-hour investigation. You've seen logs that tell you nothing and dashboards that lie.

## Checklist

### Logging

- [ ] **Not Too Chatty**: Logs provide signal, not noise
  ```javascript
  // ๐Ÿšจ Too verbose - drowns important logs
  items.forEach(item => logger.info('Processing item', item))
  
  // โœ… Appropriate granularity
  logger.info('Processing batch', { count: items.length })
  items.forEach(item => logger.debug('Processing item', { id: item.id }))
  ```

- [ ] **Correlation IDs**: Can trace request through system
  ```javascript
  // โœ… Request ID propagated
  logger.info('Processing order', { 
    requestId: ctx.requestId,
    orderId: order.id 
  })
  ```

- [ ] **No Secrets in Logs**: PII and secrets masked
  ```javascript
  // ๐Ÿšจ Secrets in logs
  logger.info('Auth attempt', { email, password })
  
  // โœ… Secrets masked
  logger.info('Auth attempt', { email, password: '[REDACTED]' })
  ```

- [ ] **Structured Logging**: Logs are parseable
  ```javascript
  // ๐Ÿšจ Unstructured
  logger.info(`User ${userId} created order ${orderId}`)
  
  // โœ… Structured
  logger.info('Order created', { userId, orderId })
  ```

- [ ] **Log Levels Appropriate**:
  | Level | Use For |
  |-------|---------|
  | ERROR | Failures requiring attention |
  | WARN | Potential issues, degraded state |
  | INFO | Significant business events |
  | DEBUG | Detailed diagnostic info |

- [ ] **Error Context**: Errors include enough context
  ```java

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
6271 chars