Install
openclaw skills install nm-parseltongue-python-performancePython performance profiling and optimization: bottleneck detection, memory tuning, benchmarking
openclaw skills install nm-parseltongue-python-performanceNight Market Skill — ported from claude-night-market/parseltongue. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
Profiling and optimization patterns for Python code.
# Basic timing
import timeit
time = timeit.timeit("sum(range(1000000))", number=100)
print(f"Average: {time/100:.6f}s")
Verification: Run the command with --help flag to verify availability.
This skill is organized into focused modules for progressive loading:
CPU profiling with cProfile, line profiling, memory profiling, and production profiling with py-spy. Essential for identifying where your code spends time and memory.
Ten proven optimization patterns including list comprehensions, generators, caching, string concatenation, data structures, NumPy, multiprocessing, and database operations.
Memory optimization techniques including leak tracking with tracemalloc and weak references for caches. Depends on profiling-tools.
Benchmarking tools including custom decorators and pytest-benchmark for verifying performance improvements.
Best practices, common pitfalls, and exit criteria for performance optimization work. Synthesizes guidance from profiling-tools and optimization-patterns.
Command not found Ensure all dependencies are installed and in PATH
Permission errors Check file permissions and run with appropriate privileges
Unexpected behavior
Enable verbose logging with --verbose flag