src/skills/x-review-observability/SKILL.md
Observability review: tracing, metrics naming, structured logging, health, correlation.
npx skillsauth add edercnj/claude-environment x-review-observabilityInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Review code changes for observability best practices: distributed tracing with proper span attributes, metrics naming conventions, structured logging with mandatory fields, health check implementation, correlation ID propagation, and alerting configuration.
Include this skill when observability.tool != "none" in the project configuration.
/x-review-observability 42 -- review PR #42 for observability/x-review-observability src/main/java/com/example/config/ -- review specific paths/x-review-observability -- review all current observability changes| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| target | String | No | (current changes) | PR number or file paths to review |
Resolve agent name: use --agent runtime flag if provided; otherwise default to observability-engineer (this skill's statically bound agent).
Skill(skill: "x-internal-load-agent-context", args: "--agent {resolved_agent_name}")
Adopt agent_context.persona. Follow agent_context.rules. Read all agent_context.core_knowledge paths before proceeding.
If agent_context.status == "error": halt and report agent_context.message.
Use the canonical selector as the single source of truth for review assets:
Skill(skill: "x-internal-select-context-packs",
args: "--phase review --capabilities observability,devops,performance,security")
Consumption rules:
required.recommended only when relevant to the changed scope.optional only with explicit justification in findings.Each item scores 0 (missing), 1 (partial), or 2 (fully compliant).
| # | Item | Score | |---|------|-------| | OBS-01 | Spans created for key operations (inbound requests, outbound calls, DB queries) | /2 | | OBS-02 | Span attributes include mandatory fields (service, operation, status) | /2 | | OBS-03 | Trace context propagated across service boundaries (W3C Trace Context headers) | /2 |
| # | Item | Score | |---|------|-------| | OBS-04 | Logs are structured JSON with mandatory fields (timestamp, level, message, trace_id, span_id, service) | /2 | | OBS-05 | No sensitive data in logs (PII, credentials, tokens masked or excluded) | /2 | | OBS-06 | Log levels appropriate (DEBUG for development, INFO for operations, WARN/ERROR for issues) | /2 |
| # | Item | Score | |---|------|-------| | OBS-07 | Health check endpoints implemented (liveness, readiness, startup) | /2 | | OBS-08 | Custom metrics follow naming convention ({service}{subsystem}{metric}_{unit}) | /2 | | OBS-09 | Correlation ID generated or propagated on every inbound request | /2 |
Collect the review target: PR number or file paths from args. Run:
git diff --name-only HEAD~1..HEAD 2>/dev/null || git diff --name-only --cached
Agent(
subagent_type: "observability-engineer",
description: "Observability specialist review for {target}",
prompt: "Review the code changes for observability best practices. Target: {target}. Run `git diff HEAD~1..HEAD` to get the diff. Resolve packs via `x-internal-select-context-packs --phase review --capabilities observability,devops,performance,security` and consume selector output: read all `required`, then only observability-relevant `recommended` assets. Avoid hardcoded duplicate pack lists. Apply your full observability checklist (tracing, structured logging, health probes, metrics, correlation IDs). Produce output in this exact format:\n\nENGINEER: Observability\nSTORY: {target}\nSCORE: XX/18\nSTATUS: Approved | Rejected | Partial\n---\nPASSED:\n- [OBS-XX] Description (2/2) | Evidence: {brief concrete observation}\nFAILED:\n- [OBS-XX] Description (0/2) -- file:line -- Fix: suggestion [SEVERITY]\nPARTIAL:\n- [OBS-XX] Description (1/2) -- file:line -- Improvement: suggestion [SEVERITY]"
)
ENGINEER: Observability
STORY: [story-id or change description]
SCORE: XX/18
STATUS: PASS | FAIL | PARTIAL
### PASSED
- [OBS-XX] [Item description] | Evidence: {brief concrete observation}
### FAILED
- [OBS-XX] [Item description]
- Finding: [file:line] [issue description]
- Fix: [remediation guidance]
### PARTIAL
- [OBS-XX] [Item description]
- Finding: [partial compliance details]
Convenções de erro/degradação transversais a review/audit (empty input, RULE-012 template fallback, falha de specialist, build/test override, idempotência) vivem em
_shared/error-handling-review.md. As linhas abaixo são específicas desta skill.
| Scenario | Action | |----------|--------| | No observability code found | Report INFO: no observability code discovered | | OpenTelemetry not configured | Warn and check for alternative tracing libraries | | Health check endpoints missing | Report as FAILED for OBS-07 |
development
Documentation freshness gate: validates 6 dimensions (readme, api, adr, etc.) per PR.
testing
Conditional dep-policy gate: CVEs, licenses, versions, freshness; SARIF + report.
documentation
Incrementally updates the service or system architecture document; never regenerative.
development
Scans code and git history for leaked credentials, API keys, and tokens; SARIF output.