원클릭으로
perf
Performance optimization with benchmarking first. Use when asked to optimize, improve speed, reduce allocations, or profile code.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Performance optimization with benchmarking first. Use when asked to optimize, improve speed, reduce allocations, or profile code.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Add or modify tests following project conventions. Use when asked to write tests, add test coverage, or fix failing tests.
Add or modify tests for PhotoManager following project conventions. Use this skill when asked to write tests, add test coverage, or fix failing tests.
Avalonia UI reference guide for PhotoManager: UI conventions, MVVM patterns, and cross-platform UI patterns. Use this skill when working on UI code, adding image-processing methods, or needing to understand the Avalonia UI layer of the application.
Refactor code following Clean Architecture patterns. Use when asked to restructure, extract, move, or reorganize code while preserving behavior.
Avalonia UI reference guide for PhotoManager: UI conventions, MVVM patterns, and cross-platform UI patterns. Use this skill when working on UI code, adding image-processing methods, or needing to understand the Avalonia UI layer of the application.
Refactor PhotoManager code following Clean Architecture patterns. Use this skill when asked to restructure, extract, move, or reorganize code while preserving behavior.
| name | perf |
| description | Performance optimization with benchmarking first. Use when asked to optimize, improve speed, reduce allocations, or profile code. |
| disable-model-invocation | true |
| argument-hint | <class.method to optimize> |
You are tasked with optimizing the performance of: $ARGUMENTS
Follow this workflow in order:
Create a BenchmarkDotNet benchmark file:
PhotoManager/Benchmarks/PhotoManager.Benchmarks/{Category}/{ClassName}{MethodName}Benchmarks.csPhotoManager/Benchmarks/PhotoManager.Benchmarks/Common/HashingHelperCalculateHashBenchmarks.cs[MemoryDiagnoser], [Orderer(SummaryOrderPolicy.FastestToSlowest)],
[RankColumn][Benchmark(Baseline = true)]Keep the original method unchanged in its source file — do NOT modify it yet.
Add optimized implementations IN THE BENCHMARK FILE ONLY:
[Benchmark] methodOptimized_ApproachName, Optimized_Stackalloc, etc.Run the benchmark:
dotnet run --project PhotoManager/Benchmarks/PhotoManager.Benchmarks/PhotoManager.Benchmarks.csproj -c Release -- --filter "*BenchmarkClassName"
Evaluate results (speed is priority, but allocation shouldn't increase significantly):
Implement the winner in the original source file:
// ClassName.MethodName: X% fasterGlobalUsings.cs before adding any using directivesVerify: Run dotnet test --filter "FullyQualifiedName~ClassName" PhotoManager/PhotoManager.slnx
to ensure no regressions. Build must produce zero warnings.
Keep all variants in the benchmark file (original + all optimizations) for future reference.
Return benchmark results summary with percentage improvement.