Agent skill
micro-optimizer
Apply language-specific micro-optimizations
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/micro-optimizer
SKILL.md
Micro-Optimizer Skill
Purpose
Apply language-specific micro-optimizations to squeeze maximum performance from competitive programming solutions.
Capabilities
- C++ optimization tricks (fast I/O, pragma optimizations)
- Python optimization (PyPy hints, list comprehensions)
- Memory layout optimization
- Vectorization opportunities
- Compiler-specific optimizations
Target Processes
- code-level-optimization
- io-optimization
- memory-optimization
Optimization Catalog
C++ Optimizations
- Fast I/O:
ios_base::sync_with_stdio(false) - Pragma optimizations:
#pragma GCC optimize - Inline expansion
- Loop unrolling
- Memory prefetching
Python Optimizations
- Use PyPy when possible
- List comprehensions over loops
- Local variable caching
__slots__for classes- Avoiding global lookups
General Optimizations
- Branch prediction hints
- Cache-friendly data layout
- Avoiding unnecessary copies
- Bit manipulation tricks
Input Schema
{
"type": "object",
"properties": {
"code": { "type": "string" },
"language": {
"type": "string",
"enum": ["cpp", "python", "java"]
},
"optimizationLevel": {
"type": "string",
"enum": ["safe", "aggressive", "maximum"]
},
"preserveReadability": { "type": "boolean", "default": true }
},
"required": ["code", "language"]
}
Output Schema
{
"type": "object",
"properties": {
"success": { "type": "boolean" },
"optimizedCode": { "type": "string" },
"appliedOptimizations": { "type": "array" },
"expectedSpeedup": { "type": "string" },
"warnings": { "type": "array" }
},
"required": ["success", "optimizedCode"]
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?