decebals avatar

Performance Smell Detection

This helps you spot Java performance smells like regex compilation in loops, string concatenation inefficiencies, and boxing overhead, but it's opinionated about modern Java realities. The author correctly notes that string concatenation with + is fine in Java 9+ for simple cases thanks to invokedynamic, and that streams are often acceptable except in tight loops with huge datasets. The guidance on regex pre-compilation and StringBuilder in loops remains valid. What I appreciate is the "measure first" philosophy throughout, acknowledging that readability often trumps micro-optimizations and that JVMs have gotten really good at optimization. It explicitly scopes itself to code-level issues and punts JPA/database problems to the jpa-patterns skill, which is the right call.

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

Install

$ npx -y skills add decebals/claude-code-java --skill performance-smell-detection --agent claude-code

Installs into .claude/skills of the current project.

Files

Performance Smell Detection Skill

Identify potential code-level performance issues in Java code.

Philosophy

"Premature optimization is the root of all evil" - Donald Knuth

This skill helps you notice potential performance smells, not blindly "fix" them. Modern JVMs (Java 21/25) are highly optimized. Always:

  1. Measure first - Use JMH, profilers, or production metrics
  2. Focus on hot paths - 90% of time spent in 10% of code
  3. Consider readability - Clear code often matters more than micro-optimizations

When to Use

  • Reviewing performance-critical code paths
  • Investigating measured performance issues
  • Learning about Java performance patterns
  • Code review with performance awareness

Scope

This skill: Code-level performance (streams, collections, objects) For database: Use jpa-patterns skill (N+1, lazy loading, pagination) For architecture: Use architecture-review skill


Quick Reference: Potential Smells

Sponsors

Details

Repository
github.com/decebals/claude-code-java
Categories
Backend & APIs, Debugging, Java & JVM, Databases
License
MIT
First seen
Jun 11, 2026

More from decebals/claude-code-java

All 18
1pproenca avataraudio-voice-recoverypproenca/dot-skillsAudio forensics and voice recovery guidelines for CSI-level audio analysis. This skill should be used when recovering voice from low-quality or low-volume audio340skills.sh installs
2arraydude avatarreact-query-best-practicesarraydude/agent-skillsReact Query v4 (TanStack Query) best practices, patterns, and troubleshooting. Use when working with useQuery, useMutation, query invalidation, caching, WebSock339skills.sh installs
3base avatardeploying-contracts-on-basebase/skillsDeploys smart contracts to Base using Foundry. Covers forge create commands, contract verification, testnet faucet setup via CDP, and BaseScan API key configura339skills.sh installs
4jwynia avataragile-coordinatorjwynia/agent-skillsOrchestrate multiple worker agents to implement groomed tasks. Use when multiple ready tasks need implementation, when you want autonomous multi-task execution,338skills.sh installs
5pinecone-io avatarpinecone-docspinecone-io/skillsCurated documentation reference for developers building with Pinecone. Contains links to official docs organized by topic and data format references. Use when w338skills.sh installs
6crypto-com avatarcrypto-agent-tradingcrypto-com/crypto-agent-tradingExecute crypto trades (buy, sell, swap, exchange) and query account balances, market prices, and transaction history via the Crypto.com API. View weekly trading337skills.sh installs