This one nails the practice of making logs machine-readable for AI debugging, which matters more now that Claude is analyzing your stack traces. It pushes JSON structured logging with SLF4J and MDC for request tracing, giving you Spring Boot 3.4+ native configs and Logstash encoder setups for older versions. The AI-friendly format section is the real hook: it shows why JSON logs let Claude parse fields directly instead of burning tokens interpreting text patterns. You get working filter code for request IDs, profile switching between JSON and human-readable formats, and jq queries for log analysis. Opinionated about defaulting to JSON, which makes sense if you're doing AI-assisted debugging daily.

skills.sh installs
300
GitHub stars
771
last updated
Feb 8, 2026

Install

$ npx -y skills add decebals/claude-code-java --skill logging-patterns --agent claude-code

Installs into .claude/skills of the current project.

Files

Logging Patterns Skill

Effective logging for Java applications with focus on structured, AI-parsable formats.

When to Use

  • User says "add logging" / "improve logs" / "debug this"
  • Analyzing application flow from logs
  • Setting up structured logging (JSON)
  • Request tracing with correlation IDs
  • AI/Claude Code needs to analyze application behavior

AI-Friendly Logging

Key insight: JSON logs are better for AI analysis - faster parsing, fewer tokens, direct field access.

Why JSON for AI/Claude Code?

# Text format - AI must "interpret" the string
2026-01-29 10:15:30 INFO OrderService - Order 12345 created for user-789, total: 99.99

# JSON format - AI extracts fields directly
{"timestamp":"2026-01-29T10:15:30Z","level":"INFO","orderId":12345,"userId":"user-789","total":99.99}
AspectTextJSON
ParsingRegex/interpretationDirect field access
Token usageHigher (repeated patterns)Lower (structured)
Error extractionParse stack trace textexception field
Filteringgrep patternsjq queries

Recommended Setup for AI-Assisted Development

Sponsors

Details

Repository
github.com/decebals/claude-code-java
Categories
DevOps & CI/CD, AI & Agent Building, Debugging, Java & JVM
License
MIT
First seen
Jun 11, 2026

More from decebals/claude-code-java

All 18
1cinience avataralicloud-observability-sls-log-query-testcinience/alicloud-skillsMinimal smoke test for SLS log query skill. Validate SDK auth and one bounded query.294skills.sh installs
2mvanhorn avatarpp-docker-hubmvanhorn/printing-press-libraryPrinting Press CLI for Docker Hub. Docker Hub public API. Search container images, browse tags, check sizes, inspect Dockerfiles, and explore the...292skills.sh installs
3hyperb1iss avatarandroid-buildhyperb1iss/hyperdroid-skillUse when building Android apps (Gradle CLI) or ROMs (AOSP, LineageOS). Triggers on "gradle build", "assemble", "AOSP", "LineageOS", "lunch", "mka", "breakfast",291skills.sh installs
4patricio0312rev avatarstructured-logging-standardizerpatricio0312rev/skillsEnforces consistent structured logging with request correlation IDs, standardized log schema, middleware integration, and best practices. Use for "structured lo267skills.sh installs
5vivy-yi avatarsentiment-monitoringvivy-yi/xiaohongshu-skillsUse when monitoring brand sentiment on Xiaohongshu, tracking public opinion, managing reputation, responding to negative feedback, analyzing brand perception tr263skills.sh installs
6octagonai avatarearnings-product-pipelineoctagonai/skillsExtract product development and pipeline updates from earnings calls, including clinical trial progress, regulatory submissions, and launch timelines.262skills.sh installs