Token导航 LogoToken导航

Agent Skill · 开发规范

java-best-practices-debug-analyzer(Java 最佳实践调试分析器)

用于辅助 Java 项目开发、面向对象设计、Spring 生态、Maven 或 Gradle 依赖和后端工程实践。它适合让 Agent 分析类结构、设计接口、整理服务分层、生成测试或检查常见代码坏味道。使用时需要结合项目已有架构、包结构和依赖版本,不应只按通用教程改代码;涉及数据库、事务、并发或框架配置时,应先确认运行环境和回归测试范围。

java-best-practices-debug-analyzer 是开发规范类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描已通过,按安装量在开发规范类的 1,265 个 Skill 里排第 924。

总安装 336周安装 14GitHub Stars 1下载 112核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:java-best-practices-debug-analyzer(Java 最佳实践调试分析器)
来源仓库:https://github.com/dawiddutoit/custom-claude
仓库路径:skills/java-best-practices-debug-analyzer
安装命令:
npx skills add https://github.com/dawiddutoit/custom-claude --skill java-best-practices-debug-analyzer
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dawiddutoit/custom-claude --skill java-best-practices-debug-analyzer

这个 Skill 是做什么的

开发规范类 Skill 用来统一代码风格、目录结构和评审口径,产出多为检查清单或改写建议。

用于辅助 Java 项目开发、面向对象设计和 Spring 生态集成。适合分析类结构、设计接口、整理服务分层或生成测试代码。使用时需结合项目已有架构、包结构和依赖版本,避免仅按教程修改代码。涉及数据库、事务或并发配置时,应先确认运行环境和回归测试范围。

java-best-practices-debug-analyzer 属于开发规范类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/java-best-practices-debug-analyzer

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dawiddutoit/custom-claude --skill java-best-pr…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

java-best-practices-debug-analyzer 怎么安装?

在终端执行 npx skills add https://github.com/dawiddutoit/custom-claude --skill java-best-practices-de…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

java-best-practices-debug-analyzer 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

java-best-practices-debug-analyzer 需要什么权限?

权限级别是只读。该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

java-best-practices-debug-analyzer 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

java-best-practices-debug-analyzer 用的人多吗?

公开数据是累计安装 336 次,近一周安装 14 次,下载 112 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

java-best-practices-debug-analyzer 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发规范类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发规范类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
vercel-react-best-practices

Vercel React 最佳实践 · Codex、Claude

8,490,72025,918操作浏览器MIT通过
web-design-guidelines

网页设计指南 · Codex、Claude

6,686,01625,885需要联网MIT有提醒
remotion-best-practices

Remotion 最佳实践 · Codex、Claude

6,505,6323,027操作浏览器MIT有提醒
supabase-postgres-best-practices

Supabase Postgres 最佳实践 · Codex、Claude

3,175,5232,030需要联网MIT通过
next-best-practices

Next.js 最佳实践 · Codex、Claude

1,848,240841操作浏览器MIT通过
java-best-practices-debug-analyzer

Java 最佳实践调试分析器 · 本页

3361只读未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Works with Java exception logs, thread dumps, heap dumps, and error messages.

Java Debug Analyzer

Table of Contents

Purpose

Analyzes Java runtime issues, exceptions, stack traces, thread dumps, and performance problems to identify root causes and provide actionable solutions. Helps debug common Java errors, memory leaks, concurrency issues, and performance bottlenecks.

When to Use

Use this skill when you need to:

  • Debug Java runtime exceptions (NullPointerException, ClassNotFoundException, etc.)
  • Analyze stack traces to find root causes
  • Investigate memory leaks (OutOfMemoryError)
  • Debug performance issues (slow responses, high CPU/memory)
  • Analyze thread dumps for deadlocks or thread contention
  • Diagnose ClassNotFoundException or NoClassDefFoundError
  • Troubleshoot database connection issues
  • Debug concurrency problems (race conditions, deadlocks)
  • Investigate production errors from logs
  • Root cause analysis for Java application failures

Quick Start

Provide any Java error, exception, or log and receive root cause analysis:

# Analyze a stack trace
Analyze this Java stack trace: [paste stack trace]

# Debug an exception in logs
Debug the errors in application.log

# Analyze thread dump
Analyze the thread dump in thread-dump.txt

Instructions

Step 1: Identify Problem Type

Classify the issue to apply appropriate analysis:

Exception Categories:

  • Runtime exceptions (NullPointerException, ClassCastException, etc.)
  • Checked exceptions (IOException, SQLException, etc.)
  • Custom application exceptions
  • Framework exceptions (Spring, Hibernate, etc.)

Performance Issues:

  • Slow response times
  • High CPU usage
  • High memory consumption
  • Thread contention

Resource Issues:

  • Memory leaks
  • Connection pool exhaustion
  • File handle leaks
  • Thread starvation

Configuration Issues:

  • ClassNotFoundException/NoClassDefFoundError
  • Dependency conflicts
  • Property misconfiguration

Step 2: Analyze Stack Traces

Extract critical information from stack traces:

Key Elements to Identify:

  1. Exception type - What went wrong
  2. Exception message - Why it happened
  3. Caused by chain - Root cause
  4. First application frame - Where in your code
  5. Framework frames - Context of execution
  6. Suppressed exceptions - Additional context

Analysis Pattern:

Read stack trace from bottom to top:
1. Find "Caused by" at the bottom (root cause)
2. Identify the first frame in YOUR code
3. Understand the context from framework frames
4. Look for patterns (repeated exceptions, timing)

Step 3: Diagnose Common Exceptions

NullPointerException

Root Causes:

  • Uninitialized object reference
  • Method returning null not handled
  • Optional not checked
  • Missing null checks in chain calls

Analysis Steps:

  1. Identify exact line from stack trace
  2. Examine variables on that line
  3. Trace back to where null originated
  4. Check method contracts (should it return null?)

Example Analysis:

// Stack trace shows:
Exception in thread "main" java.lang.NullPointerException
    at com.example.UserService.getEmail(UserService.java:45)

// Line 45 is:
String email = user.getEmail().toLowerCase();

// Diagnosis: Either user is null OR user.getEmail() returns null
// Solution: Add null checks or use Optional
String email = Optional.ofNullable(user)
    .map(User::getEmail)
    .map(String::toLowerCase)
    .orElse("no-email");
ClassNotFoundException / NoClassDefFoundError

Difference:

  • ClassNotFoundException: Class not found at runtime (missing in classpath)
  • NoClassDefFoundError: Class was present at compile time but missing at runtime

Root Causes:

  • Missing dependency in pom.xml/build.gradle
  • Dependency version conflict
  • Wrong classpath configuration
  • JAR not packaged correctly

Analysis Steps:

  1. Identify the missing class name
  2. Check if dependency is declared
  3. Verify dependency scope (runtime vs compile)
  4. Check for version conflicts (mvn dependency:tree)
OutOfMemoryError

Types:

  • Java heap space - Object allocation failed
  • GC overhead limit exceeded - Too much time in GC
  • Unable to create new native thread - Thread exhaustion
  • Metaspace - Class metadata exhaustion

Analysis Steps:

  1. Identify OOM type from message
  2. Check heap size configuration (-Xmx)
  3. Look for memory leak patterns
  4. Analyze heap dump if available

Step 4: Analyze Thread Dumps

Understand thread states and identify issues:

Thread States:

  • RUNNABLE - Executing or ready to execute
  • BLOCKED - Waiting for monitor lock
  • WAITING - Waiting indefinitely (Object.wait())
  • TIMED_WAITING - Waiting with timeout (Thread.sleep())
  • TERMINATED - Thread finished execution

Red Flags:

  • Multiple threads BLOCKED on same lock (contention)
  • Many threads in WAITING state (possible deadlock)
  • Threads holding locks for long time
  • Repeated stack patterns (infinite loops)

Deadlock Detection Pattern:

Look for:
1. Thread A: waiting to lock <0x123> held by Thread B
2. Thread B: waiting to lock <0x456> held by Thread A

Step 5: Diagnose Performance Issues

High CPU:

  • Look for infinite loops in thread dumps
  • Check for inefficient algorithms (nested loops)
  • Examine regex patterns (catastrophic backtracking)
  • Verify GC frequency (excessive GC)

High Memory:

  • Large collections not cleared
  • Static references preventing GC
  • Memory leaks from listeners/callbacks
  • Caching without size limits

Slow Queries:

  • Missing database indexes
  • N+1 query problems
  • Large result sets
  • Missing query optimization

Step 6: Provide Root Cause and Solution

Output Format:

## Problem Summary
[Brief description of the issue]

## Root Cause
[Detailed explanation of why this happened]

## Evidence
[Stack traces, log excerpts, analysis data]

## Solution
[Step-by-step fix]

## Prevention
[How to avoid this in the future]

Supporting Files

FilePurpose
examples/debug-examples.mdComprehensive debugging examples (NullPointerException, ClassNotFoundException, OutOfMemoryError)

Requirements

  • Java development experience
  • Understanding of stack traces
  • Familiarity with Java exceptions
  • Basic knowledge of JVM internals (for memory/thread issues)

Red Flags to Avoid

  • Do not ignore root causes - treat symptoms only temporarily
  • Do not skip stack trace analysis - every line contains clues
  • Do not assume - verify with evidence from logs/code
  • Do not provide generic solutions - tailor to specific error
  • Do not forget prevention - suggest long-term fixes
  • Do not ignore thread dumps - they reveal concurrency issues
  • Do not overlook memory patterns - heap dumps show object retention

Notes

  • Always analyze the full stack trace, not just the first line
  • Root cause is often several frames deep in the stack
  • Consider the context: production load, data volume, timing
  • Memory issues often have delayed manifestations
  • Thread dumps require comparing multiple snapshots
  • ClassNotFoundException vs NoClassDefFoundError are different issues
  • Performance problems often stem from inefficient algorithms or database queries

平台分布

Codex

35.87%
按下载量换算40

Claude

29.53%
按下载量换算33

Cursor

17.78%
按下载量换算20

Gemini CLI

8.97%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills