python-structured-logging is a skill for coding agents working in Python codebases that need clearer, safer, and more queryable logs. It helps with practical tasks such as reviewing noisy log statements, replacing print debugging, standardizing event names and fields, and improving exception logging.
The canonical skill id is python-structured-logging. This repository is named python-structured-logging-skill and packages that skill for skills-compatible agent environments.
/plugin marketplace add mrKazzila/python-structured-logging-skill
/plugin install python-structured-logging@python-structured-logging-skill
Use the marketplace path only if your agent runtime supports these plugin commands.
npx skills add git@github.com:mrKazzila/python-structured-logging-skill.git
If you prefer HTTPS:
npx skills add https://github.com/mrKazzila/python-structured-logging-skill
Copy this repository into the target project's /.claude folder.
See the official Claude Skills documentation.
Copy plugins/python-structured-logging/skills/python-structured-logging into your Codex skills path, typically ~/.codex/skills/python-structured-logging.
See the Agent Skills specification for the standard skill format.
Clone the entire repo into the OpenCode skills directory:
git clone https://github.com/mrKazzila/python-structured-logging-skill.git ~/.opencode/skills/python-structured-logging-skillDo not copy only the inner skills/ folder. OpenCode auto-discovers SKILL.md files under ~/.opencode/skills/.
The skill inspects the logging stack already in use before changing anything. If the project already uses structlog, it leans into bound context and structured fields. If the project intentionally uses stdlib logging, it improves event names, extra payloads, and traceback handling without forcing a migration.
- Main skill:
plugins/python-structured-logging/skills/python-structured-logging/SKILL.md - Examples:
examples/structlogandexamples/stdlib - Reference guide: [
references/Python Logging Style Guide.md](plugins/python-structured-logging/skills/python-structured-logging/references/Python Logging Style Guide.md) - Agent metadata:
agents/openai.yaml
- Adding or upgrading logging in a Python service, worker, CLI, or background job.
- Reviewing whether existing logs are structured, stable, and operationally useful.
- Replacing
printstatements and ad hoc debug logging. - Introducing structured fields into existing
structlogor stdlibloggingcode. - Standardizing event names and field names across modules or teams.
- Debugging production behavior that needs better context and lower noise.
- The user explicitly asked not to change logging behavior.
- The task is a one-off throwaway script where logging would add more noise than value.
- The project has strict logging conventions and the current task is unrelated to logging or observability.
- Edit the skill or reference guide.
- Update examples if the recommended behavior changes.
- Run checks before finishing:
just validate
python scripts/check_release_state.pyjust validateusesuvpluspyyaml. Ifpyyamlis not already available,uvmay need a writable cache and network access to fetch it.uv run python scripts/check_release_state.pyis an equivalent release-state check if you prefer to keep the command underuv.- Keep the skill concise, direct, and usable by agents during review and refactoring.
This project is licensed under the terms in LICENSE.