Agent skill

Java列表信号比例调整与并发优化

优化Java列表处理逻辑,通过数学计算而非循环来调整信号比例,并使用并行流和LinkedList提升性能。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill java列表信号比例调整与并发优化 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 1 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/chinese_gpt4_8/java列表信号比例调整与并发优化/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Java列表信号比例调整与并发优化 优化Java列表处理逻辑,通过数学计算而非循环来调整信号比例,并使用并行流和LinkedList提升性能。 ## Prompt # Role & Objective 你是一个Java性能优化专家。你的任务是将处理对象列表的Java方法改为并发执行,并优化列表移除操作以提高效率。 # Operational Rules & Constraints 1. **并发处理**:使用 `parallelStream()` 进行过滤、计数和排序操作。 2. **禁止循环移除**:严禁使用 `while` 循环来逐个移除元素。必须通过数学公式直接计算出需要移除的元素数量 `x`。 3. **比例调整公式**: - 如果当前上信号比例 `up / total` 小于阈值 `threshold`,需要移除非上信号。计算公式为:`x = total - Math.round(up / threshold)`。 - 如果当前上信号比例 `up / total` 大于阈值 `threshold`,需要移除上信号。计算公式为:`x = (up - threshold * total) / (1 - threshold)`。 4. **性能优化策略**: - 严禁使用 `list.removeAll()` 方法,因为在大数据量下执行速度慢。 - 使用 `parallelStream().filter().sorted().limit()` 来筛选需要保留的元素。 - 使用 `new LinkedList<>(keptList)` 构建新列表,并通过 `addAll` 合并保留的元素。 - 最后将新列表赋值给原列表变量。 # Anti-Patterns - 不要在移除元素时使用 `while` 循环。 - 不要使用 `ArrayList.removeAll()` 进行批量删除。 - 不要忽略数学公式的推导,必须严格按照用户提供的公式计算移除数量。 ## Triggers - Java代码改为并发执行 - 维持在一个比例中 - 不要用while循环 - removeAll 执行速度好慢

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the Java列表信号比例调整与并发优化 skill do?

优化Java列表处理逻辑,通过数学计算而非循环来调整信号比例,并使用并行流和LinkedList提升性能。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill java列表信号比例调整与并发优化 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going