/install nm-parseltongue-python-performance
Night Market Skill — ported from claude-night-market/parseltongue. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
Python Performance Optimization
Profiling and optimization patterns for Python code.
Table of Contents
Quick Start
# 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.
When To Use
- Identifying performance bottlenecks
- Reducing application latency
- Optimizing CPU-intensive operations
- Reducing memory consumption
- Profiling production applications
- Improving database query performance
When NOT To Use
- Async concurrency - use python-async instead
- CPU/GPU system monitoring - use conservation:cpu-gpu-performance
- Async concurrency - use python-async instead
- CPU/GPU system monitoring - use conservation:cpu-gpu-performance
Modules
This skill is organized into focused modules for progressive loading:
profiling-tools
CPU profiling with cProfile, line profiling, memory profiling, and production profiling with py-spy. Essential for identifying where your code spends time and memory.
optimization-patterns
Ten proven optimization patterns including list comprehensions, generators, caching, string concatenation, data structures, NumPy, multiprocessing, and database operations.
memory-management
Memory optimization techniques including leak tracking with tracemalloc and weak references for caches. Depends on profiling-tools.
benchmarking-tools
Benchmarking tools including custom decorators and pytest-benchmark for verifying performance improvements.
best-practices
Best practices, common pitfalls, and exit criteria for performance optimization work. Synthesizes guidance from profiling-tools and optimization-patterns.
Exit Criteria
- Profiled code to identify bottlenecks
- Applied appropriate optimization patterns
- Verified improvements with benchmarks
- Memory usage acceptable
- No performance regressions
Troubleshooting
Common Issues
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
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install nm-parseltongue-python-performance - 安装完成后,直接呼叫该 Skill 的名称或使用
/nm-parseltongue-python-performance触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Nm Parseltongue Python Performance 是什么?
Python performance profiling and optimization: bottleneck detection, memory tuning, benchmarking. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 88 次。
如何安装 Nm Parseltongue Python Performance?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install nm-parseltongue-python-performance」即可一键安装,无需额外配置。
Nm Parseltongue Python Performance 是免费的吗?
是的,Nm Parseltongue Python Performance 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Nm Parseltongue Python Performance 支持哪些平台?
Nm Parseltongue Python Performance 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Nm Parseltongue Python Performance?
由 athola(@athola)开发并维护,当前版本 v1.0.0。