Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问许可证需确认审计通过

coding-javacoding Java 测试

Agent Skill

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

总安装

420

周安装

17

GitHub Stars

4

下载量

132
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:coding-java(coding Java 测试)
来源仓库:https://github.com/alphaonedev/openclaw-graph
仓库路径:skills/coding-java
安装命令:
npx skills add https://github.com/alphaonedev/openclaw-graph --skill coding-java
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/alphaonedev/openclaw-graph --skill coding-java

简介

coding-java 支持 Java 21+ 特性如 record、sealed class 与 Project Loom 虚拟线程。

  • 适用于 Spring Boot 3 后端开发,集成 Maven/Gradle 构建与依赖版本控制。
  • 强调接口隔离与模块化设计,避免过度继承与静态工具类滥用。
  • 使用前请确认 JDK 版本不低于 21,并检查 pom.xml 或 build.gradle 插件兼容性。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

coding-java

Purpose

This skill enables the AI to assist with Java 21+ development, focusing on modern features like records, sealed classes, pattern matching, and virtual threads from Project Loom, plus Spring Boot 3 applications using Maven or Gradle for building and dependency management.

When to Use

Use this skill for projects requiring Java 21+ syntax, such as implementing sealed classes for restricted inheritance, pattern matching in switch statements, or scalable applications with virtual threads. Apply it in backend development with Spring Boot 3, or when managing builds with Maven/Gradle for enterprise-grade Java apps.

Key Capabilities

  • Handle Java records for immutable data classes: Define with record Point(int x, int y) {}.
  • Implement sealed classes to limit subclasses: Use sealed interface Shape permits Circle, Square {}.
  • Utilize pattern matching in switch: Example: switch (obj) {case String s -> process(s); default -> handleDefault();}.
  • Manage virtual threads for concurrency: Launch with Thread.startVirtualThread(() -> task()); in Java 21+.
  • Build Spring Boot 3 apps: Configure with @SpringBootApplication and use embedded Tomcat.
  • Automate builds: Run Maven with mvn spring-boot:run or Gradle with gradle bootRun for project compilation.

Usage Patterns

To accomplish tasks, structure code or commands precisely. For example, to create a Java record for a data model:

  1. Write: public record User(String name, int age) {}.
  2. Use in main method: User user = new User("Alice", 30); System.out.println(user);.

Another example: Set up a Spring Boot 3 app with virtual threads.

  1. Add dependency in pom.xml: <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>.
  2. In controller: @RestController public class MyController {@GetMapping("/") public String home() {Thread.startVirtualThread(() -> logMessage()); return "Hello";}}.
  3. Run with Maven: mvn spring-boot:run --define spring.threads.virtual.enabled=true.

Common Commands/API

Use these exact commands for building and running projects:

  • Maven: mvn clean install -DskipTests to compile; mvn spring-boot:run to start app.
  • Gradle: gradle build --no-daemon for compilation; gradle bootRun --args='--server.port=8080' for running.
  • Java API for virtual threads: ExecutorService executor = Executors.newVirtualThreadPerTaskExecutor(); executor.submit(() -> {/* task code */});.
  • Spring Boot API: Access endpoints like http://localhost:8080/api/data after defining @GetMapping("/api/data") public ResponseEntity<?> getData() {return ResponseEntity.ok(data);}.
  • Config formats: Use application.properties for settings, e.g., server.port=8080; or YAML: server: port: 8080.

Integration Notes

Integrate by setting environment variables for secure keys, e.g., export $SPRING_API_KEY for external services in Spring Boot. For IDEs, add plugins like Spring Tools Suite and configure build tools: In VS Code, use extensions for Maven/Gradle. To link with databases, add dependencies in build.gradle: implementation 'org.springframework.boot:spring-boot-starter-data-jpa', then configure datasource in application.yml: spring.datasource.url=jdbc:mysql://localhost/dbname. Ensure Java 21+ is set via SDK manager.

Error Handling

Handle errors prescriptively: For build failures, check logs for "Compilation error" and fix syntax, e.g., if sealed class is misused, ensure all permitted subclasses are defined. For virtual threads, catch InterruptedException with try {Thread.startVirtualThread(() -> {throw new RuntimeException();});} catch (Exception e) {log.error(e.getMessage());}. In Spring Boot, use @ExceptionHandler for API errors: @ControllerAdvice public class GlobalExceptionHandler {@ExceptionHandler(Exception.class) public ResponseEntity<?> handleError(Exception e) {return ResponseEntity.status(500).body("Error: " + e.getMessage());}}. For Maven/Gradle, use --debug flag to diagnose, e.g., mvn clean install --debug.

Graph Relationships

  • Related to: coding-general (via cluster 'coding' for shared coding tools).
  • Connected to: coding-python (for cross-language development patterns).
  • Links with: devops-deployment (for integrating Java builds with CI/CD pipelines).

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.4%
按下载量换算45

Claude

29.84%
按下载量换算39

Cursor

19.85%
按下载量换算26

Gemini CLI

8.81%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills