mirror of
https://github.com/pluginagentmarketplace/custom-plugin-java.git
synced 2026-09-14 20:26:38 +08:00
6e6d335330
## Summary Complete production-grade upgrade of all agents, skills, and commands with: - Input/Output JSON schemas for all agents - ReAct pattern workflow implementation - Error handling strategies with fallback mechanisms - Token/cost optimization settings - Comprehensive troubleshooting guides and debug checklists ## Changes ### Agents (8) - Upgraded to v3.0.0 - All agents now include: input_schema, output_schema, token_budget, max_iterations, ReAct workflow, fallback strategies, debug checklists - Agent responsibilities clearly defined with boundaries ### Skills (12) - SASMP v1.3.0 Compliant - All skills include: parameter validation, PRIMARY/SECONDARY bond types, quick reference code examples, troubleshooting tables - Fixed java-testing-advanced bonded_agent to 04-java-testing ### Commands (4) - v3.0.0 - All commands include: parameter validation in frontmatter, exit codes documentation, troubleshooting tables ### Documentation - Updated plugin.json to v3.0.0 - Updated README.md with correct agent/skill information - Added comprehensive CHANGELOG entry ### Integrity Check - All 12 skills correctly bonded to valid agents - Zero orphan skills, zero broken links, zero circular dependencies Co-authored-by: Claude <noreply@anthropic.com>
3.1 KiB
3.1 KiB
name, description, allowed-tools, version, parameters
| name | description | allowed-tools | version | parameters | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| java-debug | Debug Java applications - analyze errors, memory issues, performance | Bash, Read, WebSearch | 3.0.0 |
|
Java Debug Command
Diagnose and troubleshoot Java application issues.
What This Command Does
- Error Analysis - Parse and explain stack traces
- Common Errors - Identify known issue patterns
- JVM Diagnostics - Check memory, threads, GC
- Solutions - Provide targeted fixes
- Prevention - Best practices to avoid issues
Usage
/java-debug # Analyze current error
/java-debug OutOfMemoryError # Debug OOM specifically
/java-debug --pid 12345 # Debug running process
/java-debug ClassNotFoundException # Debug classpath issues
Common Issues
OutOfMemoryError
Causes:
- Heap too small
- Memory leak
- Large objects
Diagnosis:
# Heap dump
jmap -dump:format=b,file=heap.hprof <pid>
# GC logs
-Xlog:gc*:file=gc.log
# Heap settings
java -Xms512m -Xmx2g -XX:+HeapDumpOnOutOfMemoryError
ClassNotFoundException
Causes:
- Missing dependency
- Wrong classpath
- Shading issues
Diagnosis:
# Check classpath
java -cp . -verbose:class MyApp
# Dependency tree
mvn dependency:tree
gradle dependencies
NoSuchMethodError
Causes:
- Version conflict
- Incompatible dependency
- Classpath order
Diagnosis:
# Find duplicates
mvn dependency:tree -Dincludes=groupId:artifactId
gradle dependencyInsight --dependency name
StackOverflowError
Causes:
- Infinite recursion
- Deep call stack
- Circular references
Fix:
- Add base case to recursion
- Use iteration instead
- Increase stack size:
-Xss2m
NullPointerException
Causes:
- Null reference access
- Missing initialization
- Bad API return
Fix:
- Use Optional
- Add null checks
- Use @NonNull annotations
JVM Diagnostic Commands
# Thread dump
jstack -l <pid>
# Heap info
jmap -heap <pid>
# GC stats
jstat -gcutil <pid> 1000
# Flight recording
jcmd <pid> JFR.start duration=60s filename=recording.jfr
# Full diagnostics
jcmd <pid> VM.info
Troubleshooting Decision Tree
Error occurred?
├── OutOfMemoryError
│ ├── Heap? → Increase -Xmx, check leaks
│ └── Metaspace? → Increase -XX:MaxMetaspaceSize
├── ClassNotFoundException
│ ├── At runtime? → Check classpath
│ └── At startup? → Missing dependency
├── NoSuchMethodError
│ └── Check for version conflicts
└── Performance issue
├── High CPU? → Profile with async-profiler
└── Slow response? → Check GC pauses
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Diagnosis complete |
| 1 | Process not found |
| 2 | Insufficient permissions |
Related Commands
/java-build- Build project/java-check- Check environment