performance-smell-detection

仓库创建 2026年1月30日最近提交 5 个月前SkillHot 收录 23 天前
▸ 精选理由

帮助发现可能的性能热点,强调先测量再优化。

这个 Skill 做什么

识别 Java 代码中的潜在性能味道(流、装箱、正则、对象创建等)并给出注意点。

扫描 Java 代码找出潜在的性能“味道”,比如 streams 滥用、装箱/拆箱、频繁对象创建、正则问题等,并给出注意点而非盲改。适合代码评审或性能排查前先做预警,配合 JMH、profilers 或生产指标再决定优化。强调现代 JVM 优化很多,先测量再改,并提醒数据库/JPA 类问题用专门工具处理。

▸ 展开 SKILL.md 英文原文

Detect potential code-level performance smells in Java - streams, collections, boxing, regex, object creation. Provides awareness, not absolutes - always measure before optimizing. For JPA/database performance, use jpa-patterns instead.

开发编程性能代码味道JVM通用
692
Stars
135
Forks
18
仓库内 Skill
+20
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/decebals/claude-code-java/main/.claude/skills/performance-smell-detection/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/decebals/claude-code-java/main/.claude/skills/performance-smell-detection/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# 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
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有