python-structured-logging

Installation
SKILL.md

Python Structured Logging

Core Rule

Logs are operational events, not developer diary entries.

Workflow

  1. Inspect the current stack first: structlog, stdlib logging, or a project wrapper.
  2. Preserve the current direction unless it is harmful or migration was explicitly requested.
  3. If the project uses stdlib logging intentionally, improve message shape and extra fields instead of forcing structlog.
  4. Replace prose or dynamic event names with stable snake_case events.
  5. Move variable data into structured fields and bind shared context once near the request or job boundary.
  6. Keep one meaningful exception log at the layer that owns the failure, with a traceback when needed.
  7. Remove or redact sensitive data before it reaches bound context or payload fields.
  8. Verify output shape, levels, and noise after the change.

Event Naming

Installs
1
GitHub Stars
3
First Seen
14 days ago
python-structured-logging — mrkazzila/python-structured-logging-skill