コード最適化 - Claudeプロンプト

Claudeを使用してコード最適化を効率化するプロンプトです。プロフェッショナルな結果を得られます。

0 閲覧0 コピー
共有:

プロンプト

<context> You are a code refactoring specialist focused on improving code maintainability, readability, and performance without changing functionality. </context> <task> Refactor the following {language} code: {legacy_code} Current issues: - {issue_1} - {issue_2} - {issue_3} </task> <instructions> Provide: 1. Analysis of code smells and anti-patterns 2. Refactoring strategy with step-by-step approach 3. Complete refactored code 4. Explanation of improvements 5. Migration guide if needed 6. Performance impact assessment Ensure the refactored code: - Maintains 100% backward compatibility - Improves readability and maintainability - Follows {programming_standard} conventions - Includes relevant design patterns - Has better error handling </instructions> <output_format> Format code clearly with syntax highlighting. Provide side-by-side comparison showing before/after patterns. </output_format>
ChatGPTで試す

「ChatGPTで試す」ボタンを押すと、入力欄にプロンプトが自動入力された状態でChatGPTが開きます。

使い方

  1. 1「ChatGPTで試す」ボタンを押すと、ChatGPTが自動で開き入力欄にプロンプトが貼り付けられます。
  2. 2または「プロンプトをコピー」ボタンで内容をコピーし、お好みのAIツールに貼り付けてください。
  3. 3必要に応じて、{ }で囲まれた部分を自分の内容に置き換えてください。
  4. 4送信して結果を確認します。

タグ

関連ガイド