Agent skill

Java Optimization

by LeoYeAI in LeoYeAI/openclaw-master-skills

执行 Java 代码性能优化,包括 JVM 调优、并发编程、内存管理、缓存策略、数据库优化、集合框架优化等。Invoke when user needs to optimize Java code performance.

MITAuto-check passed

Install Java Optimization

skills CLI
$ npx skills add LeoYeAI/openclaw-master-skills --skill java-optimization -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LeoYeAI/openclaw-master-skills java-optimization --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/java-optimization .claude/skills/java-optimization && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
java-optimization
GitHub stars
2.2k
Token cost
~3.6k tokens
SKILL.md length
200 words
Files
3
Skills in repo
1,215
Repo updated
First seen
Licence
MIT

At a glance

执行 Java 代码性能优化,包括 JVM 调优、并发编程、内存管理、缓存策略、数据库优化、集合框架优化等。Invoke when user needs to optimize Java code performance.

  • Works in 12 steps: 缓存策略 (Caching) → 并行处理 (Parallel Processing) → 内存优化 (Memory Optimization) → …
  • Needs to optimize Java code performance
  • SKILL.md covers 性能优化策略, 性能分析工具, 基准测试 and 常见性能反模式, plus 3 more sections
  • Calls curl and java; reaches arthas.aliyun.com

What it does

Java Optimization is an agent skill from LeoYeAI/openclaw-master-skills. 执行 Java 代码性能优化,包括 JVM 调优、并发编程、内存管理、缓存策略、数据库优化、集合框架优化等。Invoke when user needs to optimize Java code performance.

Its SKILL.md is about 3.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `_meta.json` and `skill.json`).

It works with Java. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.

When your agent uses it

  • Needs to optimize Java code performance

Example prompts

  • “/java-optimization”

Workflow steps

12 steps, taken from the step headings in SKILL.md.

  1. 缓存策略 (Caching)
  2. 并行处理 (Parallel Processing)
  3. 内存优化 (Memory Optimization)
  4. 数据库查询优化
  5. 并发编程优化
  6. JVM 调优参数
  7. Stream API 优化
  8. 锁优化
  9. 集合框架选择
  10. Bean 作用域选择
  11. 延迟初始化加速启动
  12. AOP 性能考虑

What it can do on your machine

Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl
    • java

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • arthas.aliyun.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Java Optimization loads about 3.6k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 200 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~3.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 200 words, ~3,644 tokens.

Download SKILL.mdSave it as .claude/skills/java-optimization/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
java-optimization
description
执行 Java 代码性能优化,包括 JVM 调优、并发编程、内存管理、缓存策略、数据库优化、集合框架优化等。Invoke when user needs to optimize Java code performance.
version
1.0.0
last_updated
2026-03-11
author
赵辉亮

Java 性能优化技能

高级 Java 性能优化技术,专注于 JVM 应用性能提升、内存管理、并发处理和系统调优。

性能优化策略

1. 缓存策略 (Caching)

使用 Spring Cache 或 Caffeine 实现高效缓存:

java
// ✅ 使用 Caffeine 本地缓存
import com.github.benmanes.caffeine.cache.Cache;
import com.github.benmanes.caffeine.cache.Caffeine;
import java.time.Duration;

public class MaterialService {
    private final Cache<String, Material> cache = Caffeine.newBuilder()
        .maximumSize(10_000)
        .expireAfterWrite(Duration.ofMinutes(10))
        .recordStats()
        .build();
    
    public Material getMaterial(String code) {
        return cache.get(code, key -> repository.findByCode(code));
    }
}
java
// ✅ 使用 Spring Cache + Redis
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

@Service
public class FormulaService {
    
    @Cacheable(value = "formulas", key = "#id", 
               condition = "#id != null",
               unless = "#result == null")
    public Formula getFormula(Long id) {
        return formulaRepository.findById(id).orElse(null);
    }
}

何时使用缓存:

  • 频繁访问的数据库查询结果
  • 计算成本高的数据
  • 不经常变化的配置数据
  • 第三方 API 调用结果
2. 并行处理 (Parallel Processing)

使用 Stream API 和 Fork/Join 框架:

java
import java.util.stream.Collectors;

// ✅ 并行流处理 CPU 密集型任务
public List<NutritionResult> calculateBatch(List<Material> materials) {
    return materials.parallelStream()
        .map(this::calculateNutrition)
        .collect(Collectors.toList());
}
java
// ✅ 使用 CompletableFuture 异步处理
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class AsyncCalculator {
    private final ExecutorService executor = Executors.newFixedThreadPool(
        Runtime.getRuntime().availableProcessors()
    );
    
    public CompletableFuture<Double> calculateAsync(Material material) {
        return CompletableFuture.supplyAsync(() -> {
            return calculateNutrition(material);
        }, executor);
    }
    
    // ✅ 批量异步处理
    public CompletableFuture<List<Result>> batchCalculate(List<Material> materials) {
        List<CompletableFuture<Result>> futures = materials.stream()
            .map(m -> calculateAsync(m))
            .collect(Collectors.toList());
        
        return CompletableFuture.allOf(
                futures.toArray(new CompletableFuture[0]))
            .thenApply(v -> futures.stream()
                .map(CompletableFuture::join)
                .collect(Collectors.toList()));
    }
}

最佳实践:

  • 并行流适合大数据量和 CPU 密集型操作
  • 小数据集使用顺序流(避免线程切换开销)
  • 使用 @Async 进行异步方法调用
  • 合理设置线程池大小
3. 内存优化 (Memory Optimization)
避免不必要的对象创建
java
// ❌ 错误 - 循环内创建对象
for (int i = 0; i < items.size(); i++) {
    StringBuilder sb = new StringBuilder();
    sb.append(items.get(i));
}

// ✅ 正确 - 循环外创建
StringBuilder sb = new StringBuilder(items.size() * 10);
for (String item : items) {
    sb.append(item);
}
使用基本类型而非包装类
java
// ❌ 错误 - 使用包装类
List<Integer> values = new ArrayList<>();
int sum = 0;
for (Integer value : values) {
    sum += value; // 自动拆箱
}

// ✅ 正确 - 使用基本类型
int[] values = new int[size];
int sum = 0;
for (int value : values) {
    sum += value;
}
使用 String.join 替代字符串拼接
java
// ❌ 错误 - 低效的字符串拼接
String result = "";
for (String item : items) {
    result += item + ",";
}

// ✅ 正确 - 使用 String.join
String result = String.join(",", items);

// ✅ 或使用 StringBuilder
StringBuilder sb = new StringBuilder();
for (String item : items) {
    sb.append(item).append(",");
}
集合初始化时指定容量
java
// ❌ 错误 - 默认容量可能导致多次扩容
List<String> list = new ArrayList<>();
for (int i = 0; i < 1000; i++) {
    list.add(String.valueOf(i));
}

// ✅ 正确 - 预分配容量
List<String> list = new ArrayList<>(1000);
for (int i = 0; i < 1000; i++) {
    list.add(String.valueOf(i));
}
4. 数据库查询优化
避免 N+1 查询问题
java
// ❌ 错误 - N+1 查询
List<Formula> formulas = formulaRepository.findAll();
for (Formula formula : formulas) {
    List<Material> materials = materialRepository.findByFormulaId(formula.getId());
}

// ✅ 正确 - 使用 JOIN FETCH
@Query("SELECT f FROM Formula f LEFT JOIN FETCH f.materials WHERE f.deleted = 0")
List<Formula> findAllWithMaterials();
使用批量操作
java
// ✅ 批量插入/更新
@Transactional
public void batchInsert(List<Item> items) {
    int batchSize = 50;
    for (int i = 0; i < items.size(); i++) {
        entityManager.persist(items.get(i));
        
        if (i % batchSize == 0 && i > 0) {
            entityManager.flush();
            entityManager.clear();
        }
    }
}
使用投影查询减少数据传输
java
// ✅ 只查询需要的字段
@Query("SELECT new com.example.dto.FormulaSummary(f.id, f.name, f.totalCost) " +
       "FROM Formula f WHERE f.deleted = 0")
List<FormulaSummary> findSummaries();
5. 并发编程优化
使用线程池
java
// ✅ 自定义线程池配置
@Configuration
public class ThreadPoolConfig {
    
    @Bean
    public Executor taskExecutor() {
        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
        executor.setCorePoolSize(10);
        executor.setMaxPoolSize(20);
        executor.setQueueCapacity(100);
        executor.setThreadNamePrefix("async-executor-");
        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
        executor.initialize();
        return executor;
    }
}
使用并发容器
java
// ✅ 线程安全的 Map
ConcurrentHashMap<String, Object> cache = new ConcurrentHashMap<>();

// ✅ 原子操作
AtomicLong counter = new AtomicLong(0);
counter.incrementAndGet();

// ✅ 读写锁
ReadWriteLock lock = new ReentrantReadWriteLock();
lock.readLock().lock();
try {
    return cache.get(key);
} finally {
    lock.readLock().unlock();
}
6. JVM 调优参数
堆内存配置
bash
# 生产环境推荐配置
-Xms4g                    # 初始堆大小
-Xmx4g                    # 最大堆大小
-XX:NewRatio=2            # 新生代与老年代比例
-XX:SurvivorRatio=8       # Eden 与 Survivor 比例
-XX:+UseG1GC              # 使用 G1 垃圾收集器
-XX:MaxGCPauseMillis=200  # 最大 GC 停顿时间
-XX:+ParallelRefProcEnabled
GC 日志配置
bash
# GC 日志记录
-Xloggc:/var/log/gc.log
-XX:+PrintGCDetails
-XX:+PrintGCDateStamps
-XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=10
-XX:GCLogFileSize=100M
7. Stream API 优化
避免在 Stream 中执行副作用操作
java
// ❌ 错误 - forEach 有副作用
List<String> result = new ArrayList<>();
list.stream()
    .forEach(item -> result.add(transform(item)));

// ✅ 正确 - 使用 map 和 collect
List<String> result = list.stream()
    .map(this::transform)
    .collect(Collectors.toList());
合理使用并行流
java
// ❌ 错误 - 小数据集使用并行流
List<Integer> smallList = Arrays.asList(1, 2, 3, 4, 5);
smallList.parallelStream().map(...); // 线程切换开销大于收益

// ✅ 正确 - 大数据集或 CPU 密集型任务
if (list.size() > 10000) {
    return list.parallelStream().map(...).collect(...);
}
8. 锁优化
缩小同步范围
java
// ❌ 错误 - 方法级别同步
public synchronized void process() {
    // 非临界区代码
    prepare();
    
    // 临界区代码
    synchronized(this) {
        updateSharedState();
    }
}

// ✅ 正确 - 代码块级别同步
public void process() {
    prepare(); // 非同步
    
    synchronized(this) {
        updateSharedState(); // 仅同步必要部分
    }
}
使用读写锁优化读多写少场景
java
// ✅ 使用 ReentrantReadWriteLock
private final ReadWriteLock lock = new ReentrantReadWriteLock();

public Data get(String key) {
    lock.readLock().lock();
    try {
        return cache.get(key);
    } finally {
        lock.readLock().unlock();
    }
}

public void put(String key, Data value) {
    lock.writeLock().lock();
    try {
        cache.put(key, value);
    } finally {
        lock.writeLock().unlock();
    }
}
9. 集合框架选择
场景推荐集合性能特点
频繁随机访问ArrayListO(1) 访问
频繁头尾插入删除LinkedListO(1) 插入删除
高频并发读写ConcurrentHashMap分段锁
有序 MapTreeMapO(log n)
去重HashSetO(1)
固定大小缓存LinkedHashMapLRU 支持
java
// ✅ 根据场景选择合适的集合
// 需要快速查找 - 使用 HashMap
Map<Long, RefundOrder> orderMap = new HashMap<>(size);

// 需要保持插入顺序 - 使用 LinkedHashMap
Map<String, Object> orderedCache = new LinkedHashMap<>(16, 0.75f, true);

// 高并发场景 - 使用 ConcurrentHashMap
ConcurrentHashMap<String, Object> concurrentCache = new ConcurrentHashMap<>();

性能分析工具

VisualVM 监控
bash
# 启动 VisualVM
jvisualvm

# 连接到运行中的应用
# 监控:CPU、内存、线程、类加载
# 分析:CPU 热点、内存泄漏
JProfiler 性能分析
bash
# CPU 分析:识别方法执行热点
# 内存分析:检测内存泄漏
# SQL 分析:优化数据库查询
# 线程分析:检测死锁
Arthas 在线诊断
bash
# 安装 Arthas
curl -O https://arthas.aliyun.com/arthas-boot.jar
java -jar arthas-boot.jar

# 常用命令
dashboard          # 查看系统仪表盘
thread             # 查看线程信息
heapdump           # 导出堆转储
profiler           # CPU 性能分析
trace              # 方法调用追踪
watch              # 观察方法参数和返回值

基准测试

JMH 基准测试
java
import org.openjdk.jmh.annotations.*;
import java.util.concurrent.TimeUnit;

@State(Scope.Thread)
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public class BenchmarkTest {
    
    @Param({"100", "1000", "10000"})
    public int size;
    
    private List<String> dataList;
    
    @Setup
    public void setup() {
        dataList = IntStream.range(0, size)
            .mapToObj(String::valueOf)
            .collect(Collectors.toList());
    }
    
    @Benchmark
    public String testStringBuilder() {
        StringBuilder sb = new StringBuilder();
        for (String s : dataList) {
            sb.append(s);
        }
        return sb.toString();
    }
    
    @Benchmark
    public String testStringJoiner() {
        StringJoiner joiner = new StringJoiner("");
        for (String s : dataList) {
            joiner.add(s);
        }
        return joiner.toString();
    }
}

常见性能反模式

❌ 在循环中执行数据库查询
java
// 错误示例
for (Order order : orders) {
    User user = userRepository.findById(order.getUserId());
}

// 正确做法
List<Long> userIds = orders.stream()
    .map(Order::getUserId)
    .collect(Collectors.toList());
List<User> users = userRepository.findAllById(userIds);
❌ 滥用同步
java
// 错误示例 - 过度同步
public synchronized void method() {
    // 只有部分代码需要同步
}

// 正确做法 - 缩小同步范围
public void method() {
    // 非同步代码
    synchronized(lock) {
        // 仅同步必要部分
    }
    // 非同步代码
}
❌ 大对象频繁创建
java
// 错误示例
public void process() {
    byte[] buffer = new byte[1024 * 1024]; // 1MB
    // 使用...
} // GC 时会回收

// 正确做法 - 使用对象池或复用
private static final ThreadLocal<byte[]> BUFFER_POOL = 
    ThreadLocal.withInitial(() -> new byte[1024 * 1024]);

实际优化案例

案例 1:退款订单查询优化
优化前(耗时 2.5s)
java
// ❌ N+1 查询问题
@GetMapping("/list")
public List<RefundOrderVO> list() {
    List<RefundOrder> orders = refundOrderMapper.selectAll();
    return orders.stream()
        .map(order -> {
            RefundOrderVO vo = convertToVO(order);
            // 每次循环都查询数据库
            User user = userMapper.selectById(order.getUserId());
            vo.setUserName(user.getName());
            return vo;
        })
        .collect(Collectors.toList());
}
优化后(耗时 0.3s)
java
// ✅ 批量查询 + 内存组装
@GetMapping("/list")
public List<RefundOrderVO> list() {
    // 一次性查询所有订单
    List<RefundOrder> orders = refundOrderMapper.selectAll();
    
    // 批量查询用户信息
    Set<Long> userIds = orders.stream()
        .map(RefundOrder::getUserId)
        .collect(Collectors.toSet());
    
    List<User> users = userMapper.selectBatchIds(userIds);
    Map<Long, User> userMap = users.stream()
        .collect(Collectors.toMap(User::getId, u -> u));
    
    // 内存组装,无数据库查询
    return orders.stream()
        .map(order -> {
            RefundOrderVO vo = convertToVO(order);
            User user = userMap.get(order.getUserId());
            vo.setUserName(user != null ? user.getName() : "未知用户");
            return vo;
        })
        .collect(Collectors.toList());
}
案例 2:退款状态统计优化
优化前(单线程,耗时 5s)
java
// ❌ 串行处理
public Map<Integer, Long> statisticsByStatus() {
    List<RefundOrder> orders = getAllOrders();
    return orders.stream()
        .collect(Collectors.groupingBy(
            RefundOrder::getRefundStatus,
            Collectors.counting()
        ));
}
优化后(并行流,耗时 1.2s)
java
// ✅ 并行流处理
public Map<Integer, Long> statisticsByStatus() {
    List<RefundOrder> orders = getAllOrders();
    return orders.parallelStream() // 并行处理
        .collect(Collectors.groupingByConcurrent(
            RefundOrder::getRefundStatus,
            Collectors.counting()
        ));
}

Spring Boot 特定优化

1. Bean 作用域选择
java
// ✅ 无状态 Service 使用 Singleton(默认)
@Service
public class RefundOrderService {
    // 不要定义可变状态字段
}

// ✅ 有状态 Bean 使用 Prototype
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class OrderProcessor {
    private State state; // 每个请求新实例
}
2. 延迟初始化加速启动
java
// application.yml
spring:
  main:
    lazy-initialization: true  # 全局延迟初始化

// 或针对特定 Bean
@Component
@Lazy
public class ExpensiveComponent {
    // 首次使用时才创建
}
3. AOP 性能考虑
java
// ❌ 避免在高频调用方法上使用复杂切面
@Around("execution(* com.example.service.*.*(..))")
public Object logAll(ProceedingJoinPoint pjp) {
    // 会影响所有方法调用
}

// ✅ 精确匹配需要的类和方法
@Around("@annotation(com.example.annotation.NeedLog)")
public Object logNeeded(ProceedingJoinPoint pjp) {
    // 只拦截标注了@NeedLog 的方法
}

IO 和网络优化

1. 使用 NIO 读取大文件
java
// ❌ BIO 方式读取大文件
BufferedReader reader = new BufferedReader(new FileReader(file));
String line;
while ((line = reader.readLine()) != null) {
    // 逐行读取,效率低
}

// ✅ NIO 方式
try (FileChannel channel = FileChannel.open(path, StandardOpenOption.READ)) {
    MappedByteBuffer buffer = channel.map(MapMode.READ_ONLY, 0, channel.size());
    // 内存映射,适合大文件
}
2. 连接池配置
java
// HikariCP 推荐配置
spring:
  datasource:
    hikaricp:
      maximum-pool-size: 20      # 最大连接数
      minimum-idle: 10           # 最小空闲连接
      connection-timeout: 30000  # 连接超时 30s
      idle-timeout: 600000       # 空闲超时 10min
      max-lifetime: 1800000      # 最大生命周期 30min

性能检查清单

代码层面
  • 避免在循环中创建对象
  • 使用 StringBuilder 进行字符串拼接
  • 集合初始化时指定容量
  • 优先使用基本类型
  • 及时关闭资源(try-with-resources)
  • 避免不必要的同步
  • 使用懒加载
数据库层面
  • 添加合适的索引
  • 避免 SELECT *
  • 使用分页查询
  • 批量操作代替单条操作
  • 使用连接池
  • 慢查询监控
架构层面
  • 合理使用缓存
  • 异步处理耗时操作
  • 消息队列削峰填谷
  • CDN 加速静态资源
  • 负载均衡分散压力

何时使用此技能

当用户提到以下关键词时激活此技能:

  • "Java 性能优化"
  • "提高响应速度"
  • "减少内存占用"
  • "JVM 调优"
  • "并发优化"
  • "数据库优化"
  • "缓存策略"
  • "性能分析"
  • "CPU 占用高"
  • "内存泄漏"
  • "GC 频繁"
  • "接口响应慢"

© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files in skills/java-optimization of LeoYeAI/openclaw-master-skills.

  • SKILL.md
  • _meta.json
  • skill.json

Open the folder on GitHubat commit e5199b5

Compare with similar skills

Java Optimization next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Java Optimization compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Java Optimization this skillLeoYeAI/openclaw-master-skills2.2k—~3.6kAutomated safety check: PassMIT
Brainstormingxpinjection/test-driven-spring-boot11254 repos~2.6kAutomated safety check: PassMIT
Android API Diffgkd-kit/gkd43k—~796Automated safety check: PassGPL-3.0
Video Cover Imageitwanger/toBeBetterJavaer18k—~3.3kAutomated safety check: PassNone
Lancedb Update Lance Dependencylancedb/lancedb12k—~1.1kAutomated safety check: PassApache-2.0
Java SDK E2E Test with Replay Snapshotgithub/copilot-sdk11k—~1.8kAutomated safety check: PassMIT

Similar skills

  • Brainstorming

    xpinjection/test-driven-spring-boot

    You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior.

    112 GitHub starsUsed in 54 repos~2.6k tokens
    Agent WorkflowsAuto-check passed
  • Android API Diff

    gkd-kit/gkd

    Looks up Android framework Java and AIDL APIs across versions with the android-api-diff CLI: signatures, availability, source files and hidden-API access code.

    43k GitHub stars~796 tokensUpdated today
    MobileAuto-check passed
  • Video Cover Image

    itwanger/toBeBetterJavaer

    Generate matched 3:4, 16:9, and 4:3 short-video cover images from toBeBetterJavaer video scripts or AI/Java technical topics.

    18k GitHub stars~3.3k tokensUpdated today
    Media & CreativeAuto-check passed
  • Update LanceDB to a specific Lance release or tag. An agent skill from lancedb/lancedb.

    12k GitHub stars~1.1k tokensUpdated today
    DatabasesAuto-check passed
  • Official

    Creates a Java SDK end-to-end test for the Copilot SDK that runs against a recorded YAML snapshot through a replay proxy, so CI needs no real authentication.

    11k GitHub stars~1.8k tokensUpdated today
    Testing & QAAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated today
    Auto-check passed

More from LeoYeAI/openclaw-master-skills

All 1,215 skills in this repo
  • DevOps Pipeline Management

    LeoYeAI/openclaw-master-skills

    Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Feishu Document Collaboration

    LeoYeAI/openclaw-master-skills

    Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.

    2.2k GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed
  • Files Memory System

    LeoYeAI/openclaw-master-skills

    Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.

    2.2k GitHub stars~3.8k tokensUpdated 2 mo ago
    Auto-check passed
  • GEO-Claw AI Visibility Agent

    LeoYeAI/openclaw-master-skills

    Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.

    2.2k GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Google Workspace CLI

    LeoYeAI/openclaw-master-skills

    Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • HealthFit Health Advisors

    LeoYeAI/openclaw-master-skills

    Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.

    2.2k GitHub stars~4.4k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about Java Optimization

What does Java Optimization do?

执行 Java 代码性能优化,包括 JVM 调优、并发编程、内存管理、缓存策略、数据库优化、集合框架优化等。Invoke when user needs to optimize Java code performance. Java Optimization is an agent skill from LeoYeAI/openclaw-master-skills. 执行 Java 代码性能优化,包括 JVM 调优、并发编程、内存管理、缓存策略、数据库优化、集合框架优化等。Invoke when user needs to optimize Java code performance.

When should I use Java Optimization?

Java Optimization fits situations like: needs to optimize Java code performance.

How do I install Java Optimization in Claude Code?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill java-optimization -a claude-code`. Or copy the skill folder (skills/java-optimization in LeoYeAI/openclaw-master-skills) into .claude/skills/java-optimization in your project. Claude Code loads it when a task matches its description.

How do I install Java Optimization in Codex?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill java-optimization -a codex`. Or copy the skill folder (skills/java-optimization in LeoYeAI/openclaw-master-skills) into .agents/skills/java-optimization in your project. Codex loads it when a task matches its description.

Can I use Java Optimization in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill java-optimization -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/java-optimization, .gemini/skills/java-optimization, .github/skills/java-optimization and .opencode/skills/java-optimization in your project.

What does Java Optimization need to run?

Going by SKILL.md and its folder, Java Optimization needs the command-line tools its instructions call (curl and java).

Does Java Optimization access the network?

SKILL.md names 1 domain. In commands or code: arthas.aliyun.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Java Optimization safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Java Optimization use?

Java Optimization is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Java Optimization use?

About 3.6k tokens (SKILL.md is roughly 15k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Java Optimization?

Skills that share tags, products or a category with Java Optimization: Brainstorming (xpinjection/test-driven-spring-boot, 112 stars), Android API Diff (gkd-kit/gkd, 43k stars), Video Cover Image (itwanger/toBeBetterJavaer, 18k stars) and Lancedb Update Lance Dependency (lancedb/lancedb, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Java Optimization?

LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,158 GitHub stars. The repository holds 1,215 skills in this directory. The repository was last updated on July 20, 2026.

Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.