python-performance-optimization
Python パフォーマンスの最適化
遅い Python コードは、明確な測定なしに改善するのは困難です。このスキルは、Claude、Codex、Claude Code に対して、プロファイリング、ベンチマーク、対象を絞った最適化パターンを案内します。
自分のエージェントでインストール
このリクエストをエージェントにコピーしてください。正規の Skill ページとマニフェストが含まれています。
Review the Skillstore skill "python-performance-optimization" from https://skillstore.io/skills/activeinferenceinstitute-python-performance-optimization.md and its manifest at https://skillstore.io/api/skills/activeinferenceinstitute-python-performance-optimization/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.エージェントは引き続き計画を提示し、セキュリティポリシーで必要な確認を求める必要があります。
エージェントが読めるリソース
AI エージェント、クローラー、スクリプトがページ全体ではなく整理されたコンテキストを必要とする場合は、これらのリンクを使ってください。
テストする
「python-performance-optimization」を使用しています。 私の Python バッチジョブが遅く、どこから始めればよいかわかりません。
期待される結果:
- 累積時間が最も大きい関数を見つけるために、cProfile から始めます。
- pstats を使って結果を並べ替え、上位のホットパスに集中します。
- 各改善に測定された根拠を持たせるため、一度に 1 つの変更だけをベンチマークします。
「python-performance-optimization」を使用しています。 ファイル処理スクリプトのメモリ使用量が多すぎます。
期待される結果:
- スクリプトがファイル全体や大きなリストをメモリに読み込んでいないか確認します。
- 可能な場合は、完全な実体化をイテレータやジェネレータに置き換えます。
- 変更の前後でメモリプロファイリングを行い、ピーク使用量が低下したことを確認します。
「python-performance-optimization」を使用しています。 私の API は複数の HTTP 呼び出しを待っています。
期待される結果:
- multiprocessing を追加する前に、ワークロードを I/O バウンドとして分類します。
- リクエストを同時実行できる場合は、async I/O を検討します。
- 安全なテストエンドポイントに対して、レイテンシとエラー挙動を測定します。
セキュリティ監査
低リスクMost static detections are false positives caused by Markdown code fences and educational Python examples. The only confirmed issue is low-severity guidance for py-spy commands that attach to live processes and may expose stack traces if used without authorization. No prompt injection, credential exfiltration, or malicious intent was found.
確認済みのセキュリティ上の懸念 (3)
リスク要因
⚙️ 外部コマンド (49)
🌐 ネットワークアクセス (7)
検出されたパターン
このレポートを共有・引用
バージョン付き評価レポート、中立的なバッジ、埋め込みカード、引用を共有できます。Skillstore は証拠を報告しますが、この Skill が安全かどうかは判断しません。
レポートリンクをコピー
https://skillstore.io/skills/activeinferenceinstitute-python-performance-optimization/audits/10?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdownバッジ
[](https://skillstore.io/skills/activeinferenceinstitute-python-performance-optimization?utm_source=security_passport_badge)HTMLバッジ
<a href="https://skillstore.io/skills/activeinferenceinstitute-python-performance-optimization?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/activeinferenceinstitute-python-performance-optimization/security.svg" alt="Skillstore security assessment" loading="lazy"></a>埋め込みカード
<iframe src="https://skillstore.io/embed/skills/activeinferenceinstitute-python-performance-optimization.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学術引用 (APA · BibTeX · CFF)
APA形式の引用
ActiveInferenceInstitute. (2026). python-performance-optimization security audit report (audit version 10) [Author version unspecified]. Skillstore. https://skillstore.io/skills/activeinferenceinstitute-python-performance-optimization/audits/10BibTeX形式の引用
@techreport{activeinferenceinstitute-activeinferenceinstitute-python-performance-optimization-2026,
author = {ActiveInferenceInstitute},
title = {python-performance-optimization security audit report (audit version 10)},
institution = {Skillstore},
year = {2026},
number = {10},
url = {https://skillstore.io/skills/activeinferenceinstitute-python-performance-optimization/audits/10},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "python-performance-optimization security audit report (audit version 10)"
version: "unspecified"
type: report
authors:
- name: "ActiveInferenceInstitute"
date-released: "2026-07-09"
url: "https://skillstore.io/skills/activeinferenceinstitute-python-performance-optimization/audits/10"
identifiers:
- type: other
value: "skillstore:activeinferenceinstitute-python-performance-optimization:audit:10"
description: "Skillstore immutable audit report identifier"
バリアントを比較
インストール可能なバリアント 3 件各作者のスキルは個別のインストール項目として維持されます。推奨バリアントは Skillstore の証拠で順位付けされます。
このバリアントが首位の理由
sickn33-python-performance-optimization
2026-09-09
wshobson-python-performance-optimization
2026-09-09
activeinferenceinstitute-python-performance-optimization
2026-10-21
Skillstore スコア
このスコアの理由 証拠の信頼度: 高作成できるもの
遅いサービスエンドポイントを診断する
コードを変更する前に、プロファイリング出力を使ってホットな関数、高コストなクエリ、またはブロッキング I/O を特定します。
データジョブのメモリ負荷を軽減する
リストベースの処理を、ジェネレータ、イテレータ、弱参照、メモリプロファイリング手法と比較します。
パフォーマンス改善計画を準備する
現在の挙動をベンチマークし、焦点を絞った最適化パターンを選び、各変更後に結果を測定します。
これらのプロンプトを試す
python-performance-optimization skill を使って、この Python 関数のプロファイリングを手伝ってください。最初に使うべきプロファイラと、どの結果がボトルネックを証明するかを説明してください。
python-performance-optimization skill を使って、この遅い Python ループをレビューしてください。より高速なデータ構造や組み込み操作を提案し、その変更をベンチマークする方法を説明してください。
python-performance-optimization skill を使って、このメモリ消費の大きい Python ワークフローを分析してください。ジェネレータ、イテレータ、弱参照によってメモリ使用量を削減できる箇所を特定してください。
python-performance-optimization skill を使って、この Python アプリケーション向けに測定主導の最適化計画を作成してください。CPU プロファイリング、メモリプロファイリング、I/O レビュー、データベースチェック、ベンチマーク検証を含めてください。
ベストプラクティス
- 変更が測定済みのボトルネックを対象にするよう、最適化の前にプロファイリングします。
- ベンチマークは小さく、再現可能で、実際のワークロードに近いものに保ちます。
- 実行時間、メモリ、正確性を含めて、変更前後の結果を比較します。
回避
- 測定された遅延に関係しないコードパスを最適化しないでください。
- マイクロベンチマークの結果がすべてのプロダクションワークロードに当てはまると決めつけないでください。
- 承認なしにプロダクションプロセスへプロファイラを接続しないでください。
よくある質問
このスキルはプロファイラを自動的に実行しますか?
どのプロファイラから始めるべきですか?
プロダクション環境のパフォーマンス問題にも役立ちますか?
データベースパフォーマンスも扱いますか?
ネットワークバウンドな Python コードにも役立ちますか?
すべての最適化で私のアプリケーションは改善されますか?
開発者情報
ライセンス
MIT
Skillstore リビジョン
r1
バージョンに関する注意
作者はバージョンを宣言していません。
参照
7db9b9f06e0ab79c575b58bc48c4d8dc9849f424
メンテナンスの新しさ
2026/7/18
利用状況
13 ダウンロード · 302 閲覧
ファイル構成
📄 SKILL.md