log-gen

Generate structured logging instrumentation and logger configurations in source code.

1|1|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/trevorbyrum/claude-skills-suite --skill log-gen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: log-gen
Source: https://github.com/trevorbyrum/claude-skills-suite/tree/main/skills/log-gen
Command: npx skills add https://github.com/trevorbyrum/claude-skills-suite --skill log-gen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the tedious but critical task of adding structured logging and observability to code, especially for LLM-generated code which often lacks it.

Core Features & Use Cases

  • Automated Logging Instrumentation: Adds structured logging, error context, correlation IDs, and API boundary logging.
  • Fixes Log-Review Findings: Implements recommendations from log-review processes.
  • Creates Logger Setup: Generates a minimal structured logger if none exists.
  • Use Case: After running a code generation skill, use log-gen to automatically add appropriate logging statements to the new code, ensuring better observability in production.

Quick Start

Use the log-gen skill to add logging instrumentation to the files in the src/api directory.

Frequently Asked Questions about log-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add structured logging to existing source code files?

Structured logging instrumentation is added by generating statements within source code files that address observability gaps. It detects or creates idiomatic logger configurations, prioritizing structured JSON formats for cloud environments.

What is the best way to instrument code with correlation IDs and error context?

The best way to instrument code with correlation IDs is through automated logging generation that adds structured statements to capture error context and mark API boundaries for better observability.

Does log-gen work with different programming languages and logging frameworks?

Yes, structured logging instrumentation supports various languages and frameworks by detecting or creating idiomatic logger configurations. It generates a minimal structured logger if none exists in the target codebase.

Can I automatically fix observability gaps identified by a log review?

Yes, you can fix observability gaps by implementing recommendations from log review findings. The instrumentation generation addresses uninstrumented code sections by adding appropriate structured logging statements.

Why does LLM-generated code often lack proper observability and logging?

LLM-generated code often lacks logging because generation focuses on core logic rather than production observability. Structured logging instrumentation automates adding this missing error context and API boundary tracking.