本文へ移動
cccskills
無料GitHub で公開

python-performance

Profiles Python code for performance bottlenecks and memory issues. Use when Python code is slow or when profiling for optimization before a release.

インストール方法を見る

含まれるファイル(6)

  • SKILL.md2.8 KB
  • modules/benchmarking-tools.md1.0 KB
  • modules/best-practices.md1.2 KB
  • modules/memory-management.md1022 B
  • modules/optimization-patterns.md4.7 KB
  • modules/profiling-tools.md1.7 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Python Performance Optimization

Profiling and optimization patterns for Python code.

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

Eleven proven optimization patterns including list comprehensions, generators, caching, string concatenation, data structures, NumPy, multiprocessing, database operations, and loop transformations (what works in Python vs the compiler).

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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Shapes turns action-first: action leads, steps numbered, state restated. Use for ADHD-friendly output. Do not use to trim tokens; use response-compression.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

Inverts burden of proof for code additions. Use when reviewing PRs, planning refactors, or running unbloat to challenge every addition's necessity.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

Tracks per-agent token usage and flags waste in parallel dispatch. Use when evaluating parallel agent efficiency or after a multi-agent run.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

Coordinates Claude agent teams via filesystem protocol. Use when orchestrating parallel agents with task dependencies. Do not use for single-agent tasks.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

Evaluates API surface design, consistency, and exemplar alignment. Use when reviewing public API changes or before releasing a new API surface.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

Selects architecture paradigm via research before scaffolding. Use when architecture is undecided and the choice needs justification and documentation.

日本語の概要は準備中です。原文の説明を表示しています。

athola/claude-night-market3412026年10月10日 更新

athola のスキルをすべて見る

このスキルの問題を報告する