Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问clear审计异常

java-developerJava 开发者

Agent Skill

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

总安装

1,272

周安装

53

GitHub Stars

133

下载量

424
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/yennanliu/cs_basics --skill java-developer

简介

用于辅助 Java 项目开发、面向对象设计和 Spring 生态集成。

  • 适合分析类结构、设计接口、整理服务分层或生成测试代码。
  • 使用时需结合项目已有架构、包结构和依赖版本,避免仅按教程修改代码。
  • 涉及数据库、事务或并发配置时,应先确认运行环境和回归测试范围。
  • java-developer 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Java Developer

When to use this Skill

Use this Skill when:

  • Writing new Java solutions for LeetCode problems
  • Implementing data structures or algorithms in Java
  • Converting solutions from other languages to Java
  • Setting up Java test cases with JUnit

Instructions

1. Code Structure

Follow the project's Java conventions:

  • Package structure: AlgorithmJava, DataStructure, LeetCodeJava
  • Use Java 8 compatibility features
  • Include proper imports and class declarations
  • Follow camelCase naming conventions

For LeetCode problems:

package LeetCodeJava;

/**
 * Problem {number}: {title}
 * Difficulty: {Easy/Medium/Hard}
 *
 * {Brief problem description}
 *
 * Time Complexity: O(?)
 * Space Complexity: O(?)
 */
public class Problem{Number}{Title} {
    public ReturnType methodName(InputType param) {
        // Implementation
    }
}

2. Best Practices

Optimize for interviews:

  • Write clean, readable code first
  • Add comments only for complex logic
  • Use meaningful variable names
  • Handle edge cases explicitly

Common patterns:

  • Two pointers: left, right or i, j
  • Sliding window: start, end
  • Binary search: lo, hi, mid
  • DFS/BFS: Use Stack/Queue with explicit types

Data structures to prefer:

  • List<> instead of arrays when size varies
  • HashMap<> for O(1) lookups
  • HashSet<> for uniqueness checks
  • PriorityQueue<> for heap operations
  • Deque<> for stack/queue flexibility

3. Performance Guidelines

Time Complexity Goals:

  • Array problems: Aim for O(n) or O(n log n)
  • String problems: Aim for O(n) with HashMap/array counting
  • Tree problems: O(n) traversal is usually optimal
  • Graph problems: O(V + E) for BFS/DFS

Space Optimization:

  • Modify input in-place when possible
  • Use bit manipulation for boolean arrays
  • Consider iterative over recursive for O(1) space

4. Testing Approach

Include test cases:

// In test class
@Test
public void testBasicCase() {
    Problem{Number}{Title} solution = new Problem{Number}{Title}();
    assertEquals(expected, solution.methodName(input));
}

@Test
public void testEdgeCase() {
    // Test empty input, null, single element, etc.
}

5. Common Mistakes to Avoid

  • Integer overflow: Use long for large sums
  • Array index out of bounds: Check i < arr.length
  • Null pointer: Validate inputs
  • Off-by-one errors: Double-check loop boundaries
  • Mutable vs immutable: Be careful with references

6. Java-Specific Tips

Useful methods:

// String
s.charAt(i), s.substring(i, j), s.toCharArray()

// Collections
Collections.sort(list), Collections.reverse(list)
Arrays.sort(arr), Arrays.fill(arr, val)

// Math
Math.max(a, b), Math.min(a, b), Math.abs(x)

// Queue/Stack
queue.offer(), queue.poll(), queue.peek()
stack.push(), stack.pop(), stack.peek()

Lambda expressions for sorting:

Arrays.sort(intervals, (a, b) -> a[0] - b[0]);
PriorityQueue<int[]> pq = new PriorityQueue<>((a, b) -> a[0] - b[0]);

Example Workflow

  1. Read the problem from leetcode_java/ or create new file
  2. Identify the pattern (two pointers, sliding window, DP, etc.)
  3. Write the solution with clear variable names
  4. Add complexity analysis in comments
  5. Test with examples including edge cases
  6. Optimize if needed after correct solution works

Project-Specific Notes

  • Maven project: Build with mvn compile, test with mvn test
  • JUnit 5 is configured for testing
  • Problems are organized by algorithm type
  • Follow existing code style in the package

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

OpenCode

27.45%
按下载量换算116

Claude Code

23.81%
按下载量换算101

windsurf

19.6%
按下载量换算83

Codex

12.49%
按下载量换算53

github-copilot

7.49%
按下载量换算32

Antigravity

3.31%
按下载量换算14

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills