💻

プログラミングプロンプト集

AIプログラミングプロンプト集。コード生成、デバッグ、リファクタリング、コードレビューなど、開発効率を高めるプロンプトテクニック。ChatGPTやClaudeでの活用法を紹介。

You are an expert in performance optimization and profiling. Analyze the following slow application: Application Details: - Language/Framework: {language_framework} - Issue: {performance_issue} - Aff

ChatGPT

パフォーマンス最適化 - ChatGPTプロンプト

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

💻 プログラミングパフォーマンスChatGPT
00

You are a security audit specialist for software applications. Conduct a comprehensive security audit of the provided {application_type} code/system. Analyze for: 1. OWASP Top 10 vulnerabilities 2. A

Gemini

セキュリティ監査 - Geminiプロンプト

Geminiを使用してセキュリティ監査を効率化するプロンプトです。プロフェッショナルな結果を得られます。

💻 プログラミングセキュリティプログラミング
00

You are a software architecture and system design expert. Design a {system_type} system with the following requirements: Functional Requirements: {functional_requirements} Non-Functional Requirement

Gemini

アーキテクチャ設計 - Geminiプロンプト

Geminiを使用してアーキテクチャ設計を効率化するプロンプトです。プロフェッショナルな結果を得られます。

💻 プログラミングシステム設計プログラミング
00

You are an expert Git workflow and version control specialist. Analyze the provided Git repository history and code changes, then: 1. Review the commit messages for clarity and convention adherence 2

Gemini

Git戦略立案 - Geminiプロンプト

Geminiを使用してGit戦略立案を効率化するプロンプトです。プロフェッショナルな結果を得られます。

💻 プログラミングバージョン管理プログラミング
00

<context> You are a technical documentation specialist who creates clear, comprehensive developer documentation. </context> <task> Create technical documentation for: {component_or_library} Key deta

Claude

ドキュメント作成 - Claudeプロンプト

Claudeを使用してドキュメント作成を効率化するプロンプトです。プロフェッショナルな結果を得られます。

💻 プログラミングドキュメントプログラミング
00

<context> You are a code refactoring specialist focused on improving code maintainability, readability, and performance without changing functionality. </context> <task> Refactor the following {langu

Claude

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

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

💻 プログラミングリファクタリングプログラミング
00

<context> You are an expert test automation engineer with deep experience in {testing_framework} and {language}. </context> <instructions> Generate comprehensive test cases for the following function

Claude

テスト生成 - Claudeプロンプト

Claudeを使用してテスト生成を効率化するプロンプトです。プロフェッショナルな結果を得られます。

💻 プログラミングテスト自動化プログラミング
00

You are a database optimization specialist. Analyze the following database performance problem: Database: {database_type} Current Query: {sql_query} Performance Issue: {performance_problem} Dataset S

ChatGPT

データベース最適化 - ChatGPTプロンプト

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

💻 プログラミングDB最適化ChatGPT
00

You are an API design architect. Design a RESTful API for {application_purpose}. Requirements: - Support {primary_functionality} - Handle {expected_scale} requests per day - Implement proper error h

ChatGPT

API設計 - ChatGPTプロンプト

ChatGPTを使用してAPI設計を効率化するプロンプトです。プロフェッショナルな結果を得られます。

💻 プログラミングAPI開発ChatGPT
00

You are a debugging expert specializing in {language} development. A user is encountering the following error: {error_message} Their code context: {code_snippet} Your task is to: 1. Identify the roo

ChatGPT

バグ修正 - ChatGPTプロンプト

ChatGPTを使用してバグ修正を効率化するプロンプトです。プロフェッショナルな結果を得られます。

💻 プログラミングデバッグChatGPT
00

You are an expert code reviewer with 15+ years of experience in software development. Your task is to review {language} code and provide constructive feedback. When reviewing code, you must: 1. Analy

ChatGPT

コードレビュー - ChatGPTプロンプト

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

💻 プログラミングコード審査ChatGPT
00

プログラミングプロンプトとは?

プログラミング向けプロンプトは、AIをコーディングパートナーとして活用するための指示文設計です。コード生成・デバッグ・リファクタリング・コードレビューなど目的によって最適なプロンプト構造が異なります。基本は「言語・フレームワーク・バージョン」「目的」「制約条件(型安全 / 副作用なし / O(n)以下など)」を最初に明示することです。 ClaudeやChatGPTにバグを質問する際は、エラーメッセージ全文と再現コードを丸ごと貼り付け、「期待する動作」と「実際の動作」を分けて書くと、的確な原因特定ができます。コードレビューを頼む場合は「セキュリティ観点で」「パフォーマンス観点で」「可読性観点で」と観点を分けて複数回問うのが効果的です。複雑な実装では「まず設計を提案して、私の確認後に実装してください」と段階分けすると暴走を防げます。

主な使用シーン

  • 新機能のコード生成・スキャフォールド作成
  • バグの原因特定とデバッグ
  • リファクタリング・コード品質向上
  • コードレビュー・セキュリティ監査

組み合わせテクニック

  • 言語・FW・バージョン・制約条件を最初に明示する
  • バグ質問は「エラー全文+期待動作+実際の動作」を分けて書く
  • レビューは観点別(セキュリティ/速度/可読性)に分けて依頼
  • 複雑な実装は「設計→確認→実装」の段階分けで暴走を防ぐ

プログラミングプロンプトのコツ

  • 明確な指示を含める(役割設定、出力形式、制約条件など)
  • 具体的な例を提供して、期待する回答の方向性を示す
  • ステップバイステップで考えるよう指示して、論理的な回答を引き出す
  • 出力の長さや形式を指定して、目的に合った回答を得る