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.
Optimize code performance through iterative improvements (max 2 rounds).
$ npx skills add huangruiteng/CS-Notes --skill code-optimization -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install huangruiteng/CS-Notes code-optimization --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/huangruiteng/CS-Notes.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.trae/openclaw-skills/code-optimization .claude/skills/code-optimization && rm -rf skills-srcUse ~/.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/
Install the "code-optimization" agent skill from https://github.com/huangruiteng/CS-Notes/tree/master/.trae/openclaw-skills/code-optimization into .claude/skills/code-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-optimization", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/huangruiteng/CS-Notes/tree/master/.trae/openclaw-skills/code-optimizationType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add huangruiteng/CS-Notes --skill code-optimization -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install huangruiteng/CS-Notes code-optimization --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/huangruiteng/CS-Notes.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.trae/openclaw-skills/code-optimization .agents/skills/code-optimization && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "code-optimization" agent skill from https://github.com/huangruiteng/CS-Notes/tree/master/.trae/openclaw-skills/code-optimization into .agents/skills/code-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-optimization", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add huangruiteng/CS-Notes --skill code-optimization -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install huangruiteng/CS-Notes code-optimization --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/huangruiteng/CS-Notes.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.trae/openclaw-skills/code-optimization .cursor/skills/code-optimization && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "code-optimization" agent skill from https://github.com/huangruiteng/CS-Notes/tree/master/.trae/openclaw-skills/code-optimization into .cursor/skills/code-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-optimization", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/huangruiteng/CS-Notes.git --path .trae/openclaw-skills/code-optimization--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add huangruiteng/CS-Notes --skill code-optimization -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install huangruiteng/CS-Notes code-optimization --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/huangruiteng/CS-Notes.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.trae/openclaw-skills/code-optimization .gemini/skills/code-optimization && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "code-optimization" agent skill from https://github.com/huangruiteng/CS-Notes/tree/master/.trae/openclaw-skills/code-optimization into .gemini/skills/code-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-optimization", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install huangruiteng/CS-Notes code-optimizationInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add huangruiteng/CS-Notes --skill code-optimization -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/huangruiteng/CS-Notes.git skills-src && mkdir -p .github/skills && cp -r skills-src/.trae/openclaw-skills/code-optimization .github/skills/code-optimization && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "code-optimization" agent skill from https://github.com/huangruiteng/CS-Notes/tree/master/.trae/openclaw-skills/code-optimization into .github/skills/code-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-optimization", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add huangruiteng/CS-Notes --skill code-optimization -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install huangruiteng/CS-Notes code-optimization --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/huangruiteng/CS-Notes.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.trae/openclaw-skills/code-optimization .opencode/skills/code-optimization && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "code-optimization" agent skill from https://github.com/huangruiteng/CS-Notes/tree/master/.trae/openclaw-skills/code-optimization into .opencode/skills/code-optimization/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-optimization", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
code-optimizationOptimize code performance through iterative improvements (max 2 rounds).
Code Optimization is an agent skill from huangruiteng/CS-Notes. Optimize code performance through iterative improvements (max 2 rounds). Benchmark execution time and memory usage, compare against baseline implementations, and generate detailed optimization reports. Supports C++, Python, Java, Rust, and other languages.
Its SKILL.md is about 2.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.
It works with C++, Python, Java and Rust. The licence is Apache-2.0.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit d01d8f8. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
python3javacjavarustcgoFrom the folder's file list and the shell code blocks in SKILL.md.
Hosts in commands or code, which the agent is likely to contact:
gcc.gnu.orgintel.comperf.wiki.kernel.orgbigocheatsheet.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Code Optimization loads about 2.6k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 749 words of instructions outside code blocks.
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.
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.
The full file from huangruiteng/CS-Notes at commit d01d8f8, republished under its Apache-2.0 licence (© huangruiteng). 749 words, ~2,595 tokens.
.claude/skills/code-optimization/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.You are an expert code optimization assistant focused on improving code performance beyond standard library implementations.
Use this skill when users need to:
IMPORTANT:
Use file-related tools to:
Example:
# Read code file
content = read_file("topk_benchmark.cpp")
# Analyze and implement optimization
# Fill in the my_topk_inplace function with optimized implementationExecute code via command line to measure performance:
For C++ code:
# Compile with optimization flags
g++ -O3 -std=c++17 topk_benchmark.cpp -o topk_benchmark
# Run and capture output
./topk_benchmarkFor Python code:
python3 optimization_benchmark.pyFor other languages:
# Java
javac MyOptimization.java && java MyOptimization
# Rust
rustc -O optimization.rs && ./optimization
# Go
go build optimization.go && ./optimizationFrom execution output, extract:
Example output to parse:
N=160000, K=16000
std::nth_element time: 1234 us (1.234 ms)
my_topk_inplace time: 567 us (0.567 ms)
Verification: PASS
Speedup: 2.18x fasterRepeat Steps 1-3 up to 2 times maximum to achieve optimal performance:
Stopping criteria:
Save optimized code and generate report:
Save optimized code:
# Save to code_optimization directory
write_file("code_optimization/topk_benchmark_optimized.cpp", optimized_code)Generate optimization report (code_optimization/report.md):
# Code Optimization Report
## 【优化版本】v1
### 【优化内容】
1. 使用 std::partial_sort 替代 std::nth_element,减少额外排序开销
2. 优化内存分配策略,使用 reserve() 预分配空间
3. 原因:partial_sort 对前 K 个元素的局部排序更高效
### 【优化后性能】
- 运行时间:从 1234 us 优化到 567 us
- 性能提升:54% 更快
- 内存占用:640 KB(与基线相同)
### 【和标准库对比】
- 比 std::nth_element 快 667 us(约 2.18x 倍速)
- 验证结果:PASS(输出与标准库完全一致)
---
## 【优化版本】v2
### 【优化内容】
1. 引入快速选择算法(Quick Select)优化分区过程
2. 使用 SIMD 指令加速比较操作(AVX2)
3. 原因:减少分支预测失败,提高 CPU 流水线效率
### 【优化后性能】
- 运行时间:从 567 us 优化到 312 us
- 性能提升:相比 v1 快 45%
- 内存占用:640 KB(无额外开销)
### 【和标准库对比】
- 比 std::nth_element 快 922 us(约 3.95x 倍速)
- 验证结果:PASS
---
## 最终总结
### 最佳版本:v2 (达到最大迭代次数)
- **总体性能提升**:从基线 1234 us 优化到 312 us(74.7% 性能提升)
- **相比标准库**:快 3.95 倍
- **优化策略**:算法改进 + SIMD 向量化
- **迭代次数**:2 轮(已达上限)
- **适用场景**:大规模数据(N > 100K)的 Top-K 查询
- **权衡考虑**:无额外内存开销,代码复杂度适中
### 优化技术总结
1. 算法层面:Quick Select(线性期望时间)
2. 指令级别:SIMD 向量化(AVX2)
3. 编译优化:-O3 -march=nativeOption A: Low-Level Optimizations (for CPU-bound tasks)
-O3, -march=native, -fltoOption B: Concurrency (for parallelizable tasks)
Baseline: std::nth_element: 1234 us
Iteration 1 (Algorithm): Quick Select with 3-way partitioning
→ my_topk v1: 567 us (54% faster) ✅
Iteration 2 (Low-level): Add SIMD vectorization (AVX2)
→ my_topk v2: 312 us (75% faster than baseline) ✅ BEST
Final result: 3.95x speedup over std::nth_element
Status: Reached maximum 2 iterations, optimization complete ✓# C++ with optimizations
g++ -O3 -march=native -std=c++17 code.cpp -o code
# Enable warnings
g++ -O3 -Wall -Wextra -pedantic code.cpp -o code
# Link-time optimization
g++ -O3 -flto code.cpp -o code# Linux perf
perf stat ./code
perf record ./code && perf report
# Valgrind (memory profiling)
valgrind --tool=massif ./code
# Google benchmark
./code --benchmark_format=console# Run with sanitizers
g++ -fsanitize=address,undefined code.cpp -o code
./code
# Compare output with reference
diff <(./reference) <(./optimized)Use this template for code_optimization/report.md:
# Code Optimization Report: [Problem Name]
## Baseline Performance
- Implementation: [e.g., std::nth_element]
- Execution time: [X] us
- Memory usage: [Y] KB
- Input size: N=[value], K=[value]
---
## 【优化版本】v1
### 【优化内容】
1. [具体优化措施1]
2. [具体优化措施2]
3. 原因:[为什么这样优化]
### 【优化后性能】
- 运行时间:从 [X] us 优化到 [Y] us
- 性能提升:[百分比]% 更快
- 内存占用:[Z] KB
### 【和标准库对比】
- 比基线快/慢 [差值] us(约 [倍数]x 倍速)
- 验证结果:[PASS/FAIL]
---
## 【优化版本】v2
### 【优化内容】
1. [具体优化措施1]
2. [具体优化措施2]
3. 原因:[为什么这样优化]
### 【优化后性能】
- 运行时间:从 [X] us 优化到 [Y] us
- 性能提升:相比 v1 [百分比]% 更快
- 内存占用:[Z] KB
### 【和标准库对比】
- 比基线快/慢 [差值] us(约 [倍数]x 倍速)
- 验证结果:[PASS/FAIL]
---
## 最终总结 (已达最大迭代次数: 2轮)
- 最佳版本:[vX]
- 总体性能提升:[百分比]%
- 最终加速比:[X]x
- 迭代次数:2 轮(已达上限)
- 优化策略:[列出关键技术]
- 适用场景:[说明最佳使用场景]
- 权衡考虑:[列出 trade-offs]
- 进一步优化建议:[如果时间允许,可以尝试的方向]https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.htmlhttps://www.intel.com/content/www/us/en/docs/intrinsics-guide/https://perf.wiki.kernel.org/https://www.bigocheatsheet.com/Remember: Performance optimization is an iterative process. You are limited to 2 optimization iterations maximum. Always measure, optimize one thing at a time, verify correctness, and document your findings thoroughly. Plan your 2 iterations strategically to maximize impact: focus on algorithms first, then choose between low-level optimizations or concurrency based on the problem characteristics.
© huangruiteng, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file in .trae/openclaw-skills/code-optimization of huangruiteng/CS-Notes.
Open the folder on GitHubat commit d01d8f8
Code 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Code Optimization this skillhuangruiteng/CS-Notes | 4k | — | ~2.6k | Automated safety check: Pass | Apache-2.0 | |
| Fory Releaseapache/fory | 4.6k | — | ~2.9k | Automated safety check: Pass | Apache-2.0 | |
| Fory Version Bumpapache/fory | 4.6k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Fory Performance Optimizationapache/fory | 4.6k | — | ~2.2k | Automated safety check: Pass | Apache-2.0 | |
| Dbgtheodo-group/debug-that | 158 | — | ~2.2k | Automated safety check: Pass | MIT | |
| Code Review Excellenceandrew-yangy/gru-ai | 155 | — | ~1.7k | Automated safety check: Notes | MIT |
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.
apache/fory
Bump Apache Fory release or post-release development versions across Java, Kotlin, Scala, Python, Rust, Go, C++, C, Dart, JavaScript, Swift, integration tests, examples, and source docs.
apache/fory
Run profile-driven bottleneck optimization across Apache Fory implementations (Java, C++, Python/Cython, Go, Rust, Swift, C, JavaScript/TypeScript, Dart, Kotlin, Scala).
theodo-group/debug-that
Debug applications using the dbg CLI debugger. An agent skill from theodo-group/debug-that.
andrew-yangy/gru-ai
Provides comprehensive code review guidance for React 19, Vue 3, Rust, TypeScript, Java, Python, and C/C++.
dallison/subspace
Write Subspace clients in C++, Python, Rust, or Java. An agent skill from dallison/subspace.
huangruiteng/CS-Notes
Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script.
huangruiteng/CS-Notes
A skill your agent uses when you need to control Slack from Clawdbot via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
huangruiteng/CS-Notes
Inspect and manage guarded Codex App-native or launchd heartbeats for Codex main control threads.
huangruiteng/CS-Notes
Locate and read a Codex thread by a codex thread link, thread id, or rollout path across all local CODEXHOME directories (~/.codex, ~/.codex-gpt, ...).
huangruiteng/CS-Notes
A skill your agent uses when the user asks Codex to research, find learning materials, process "素材:" links, "请你读" / "精读" a material, build a material radar, or use SenSight-like broad information…
huangruiteng/CS-Notes
Interact with GitHub using the gh CLI. An agent skill from huangruiteng/CS-Notes.
Optimize code performance through iterative improvements (max 2 rounds). Code Optimization is an agent skill from huangruiteng/CS-Notes. Optimize code performance through iterative improvements (max 2 rounds).
Run `npx skills add huangruiteng/CS-Notes --skill code-optimization -a claude-code`. Or copy the skill folder (.trae/openclaw-skills/code-optimization in huangruiteng/CS-Notes) into .claude/skills/code-optimization in your project. Claude Code loads it when a task matches its description.
Run `npx skills add huangruiteng/CS-Notes --skill code-optimization -a codex`. Or copy the skill folder (.trae/openclaw-skills/code-optimization in huangruiteng/CS-Notes) into .agents/skills/code-optimization in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add huangruiteng/CS-Notes --skill code-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/code-optimization, .gemini/skills/code-optimization, .github/skills/code-optimization and .opencode/skills/code-optimization in your project.
Going by SKILL.md and its folder, Code Optimization needs the command-line tools its instructions call (python3, javac, java, rustc and go). Our summary lists: Python 3.
SKILL.md names 4 domains. In commands or code: gcc.gnu.org, intel.com, perf.wiki.kernel.org and bigocheatsheet.com; the agent is likely to contact these when it follows the instructions. This is read from the text; nothing was executed.
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.
Code Optimization is published under the Apache-2.0 licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Code Optimization: Fory Release (apache/fory, 4.6k stars), Fory Version Bump (apache/fory, 4.6k stars), Fory Performance Optimization (apache/fory, 4.6k stars) and Dbg (theodo-group/debug-that, 158 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
huangruiteng (a GitHub user) maintains it in huangruiteng/CS-Notes, which has 4,000 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on October 6, 2026.
Source: huangruiteng/CS-Notes on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.