/awesome-agent-skills:awesome-logging-standardsfrom awesome-agent-skills
Applies structured logging standards: levels, PII redaction, request logging, and wide events. Use when adding or reviewing logs, choosing levels, or after logs failed or leaked data in an incident.
Ships in awesome-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Apply consistent logging so operations are debuggable and compliant without leaking secrets or PII.
| Category | Level | Content | Do not log |
|---|---|---|---|
| Request start/end | INFO | method, path (query string stripped), status, duration_ms, request_id | Body, headers with tokens, query strings, path segments carrying tokens or PII |
| Errors | ERROR | message, error type, stack (server-side), request_id | Full request/response, secrets |
| Recoverable issues | WARN | message, context (e.g. retry count), request_id | |
| Key business events | INFO | event name, relevant ids (order_id, user_id if safe), outcome | Full payloads, PII |
| External calls | INFO or DEBUG | service, operation, duration_ms, outcome (success/failure) | Full request/response, credentials |
| Detailed flow | DEBUG | step, state, ids | Secrets, PII |
JSON (recommended for production):
{
"timestamp": "2024-03-15T10:30:00.123Z",
"level": "info",
"message": "Request completed",
"request_id": "abc-123",
"method": "GET",
"path": "/api/orders",
"status": 200,
"duration_ms": 45
}
Fields: Prefer consistent names (snake_case or camelCase per project). Put variable data in fields, not only in the message string, so logs are queryable.
For request-driven services, prefer one context-rich structured event per request per service over scattered log lines:
finally so failures still produce the event. Handlers only add business fields along the way.Good:
logger.info({ request_id, method, path, status, duration_ms }, 'Request completed');
logger.error({ err, request_id }, 'Payment failed');
logger.debug({ order_id, step: 'validation' }, 'Validating order');
Bad:
console.log('User ' + user.email + ' did something'); // PII in log
logger.info('Token: ' + token); // Secret in log
logger.error('Error: ' + err); // May include stack or internal detail in message; use structured field
path before it is written: drop the query string and replace path segments that carry a token, an email or another personal identifier with a route template (/users/:id). Mask client IPs where the full address is not needed (zero the last octet of IPv4, the last 80 bits of IPv6).| Anti-pattern | Better approach |
|---|---|
| Logging full request/response | Log method, path, status, duration; redact or omit body/headers |
| Using console.log in server code | Use project logger with levels and structure |
| Interpolating everything into message | Use structured fields (request_id, order_id, etc.) |
| Logging at info for every iteration in a loop | Use debug or sample (e.g. every Nth) |
Leftover print-debugging (print(), fmt.Println, console.log) in production paths | Remove, or convert to logger.debug with fields |
| "We'll redact later" | Redact or omit from the start; do not log secrets |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub khasky/awesome-agent-skills --plugin awesome-agent-skills49 skills in this plugin
/awesome-accessibility-auditRead-only WCAG audit of UI and markup with a concrete fix per finding. Use when asked to check accessibility, a11y, keyboard or screen-reader support, or contrast./awesome-agents-md-generatorMines a codebase's real commands, conventions and boundaries into an agent-agnostic AGENTS.md, nested per package in monorepos, every rule backed by counted evidence. Use when asked to write, generate or refresh AGENTS.md or agent instructions for a repo./awesome-api-designDesigns or reviews an HTTP API's shape before code: resources, versioning, pagination, idempotency, filtering. Use when asked to design an API or an endpoint./awesome-architecture-auditRead-only audit of a whole codebase's design: module boundaries, dependency direction, docs-vs-code drift, extensibility, with a verdict. Use when asked to audit the architecture./awesome-bug-fixFixes a bug through a runnable reproduction and its root cause. Use for errors, crashes, failing tests or builds, flaky behavior, or repeated failed fixes./awesome-claims-auditChecks public claims (site, README, store listing, privacy policy, structured data) against the code and config that decide them, then fixes drift. Use when asked whether the site still matches the product.Other plugins' skills for the same job