Prompts for
Claude Code
I want you to act as a code review helper. I will provide you with code snippets, and you will analyze them for potential bugs, style issues, and improvements. Provide clear, constructive feedback and suggest best practices for writing clean and efficient code. Do not write explanations beyond the review comments. My first code snippet is: [insert code here].
Provide examples of operations in PowerShell where .NET classes are more efficient than built-in cmdlets. Explain why using .NET classes improves performance or functionality in these cases.
I want you to act as a prompt generator for programming tasks. Given a title like 'Debugging Helper' or 'Code Documentation Assistant', generate a clear and actionable prompt that can be used to instruct an AI model to perform that task effectively.
Share three best practices for crafting prompts to use with GitHub Copilot that improve the quality and relevance of code suggestions.
Identify and highlight all missing values in this dataset. Fill missing numerical values using the median of the column. For missing text values, replace with 'Not Available'. Suggest the most likely values for missing entries based on existing patterns.
Find and delete duplicate rows while keeping the first occurrence. Identify near-duplicate records (e.g., customer names or emails with minor spelling differences) and suggest merging strategies. Remove duplicate entries while preserving the most recent record.
Detect outliers in the 'income' column using the Z-score method. Replace values with a Z-score greater than 3 with the column median. Ensure all values in the 'age' column are non-negative and remove any invalid entries.
Convert the 'gender' column to a categorical type. Apply one-hot encoding to the 'location' column. Normalize 'feature1' and 'feature2' using standard scaling.
I have JSON-formatted survey data with feedback from different technology courses (Python, SQL, R, etc.). Help me identify significant differences in sentiment, strengths, and weaknesses across these course types. Focus your analysis on: 1. Which technology has the highest overall satisfaction and why? 2. Are there common weaknesses that appear across multiple technologies? 3. Do completion rates correlate with overall ratings? 4. What are the unique strengths of each technology course? Provide your analysis in a structured format with headings for each question, and include specific evidence from the data to support your findings.
You are an expert software engineer. Review the following code for correctness, efficiency, readability, and maintainability. Identify any bugs, suggest improvements, and explain your reasoning. If relevant, recommend best practices or alternative approaches. Here is the code:
[Paste your code here]
You are a debugging assistant. Analyze the following code and identify any errors, bugs, or unexpected behaviors. Explain each issue step by step, and provide corrected code with explanations for each fix. Here is the code:
[Paste your code here]
You are a senior software engineer. Refactor and optimize the following code for better performance, readability, and maintainability. Do not change its functionality. Explain the changes you make and why they improve the code. Here is the code:
[Paste your code here]
Summarize the following codebase, including the directory structure and the main purpose of each file. Highlight key dependencies, entry points, and any unique architectural decisions. Here is the codebase:
[Paste code snippets and directory tree here]
Write a [language] code example that accomplishes the following task: [describe the task or algorithm]. Ensure the code is well-commented and follows best practices.
Identify and highlight all missing values in this dataset. Then, fill missing numerical values using the median of the column, and replace all missing text values with 'Not Available'. If possible, suggest the most likely values for missing entries based on existing patterns.
Find and delete duplicate rows in this dataset while keeping the first occurrence. Also, identify near-duplicate customer records and suggest merging strategies. Highlight rows where the same email appears more than once, and find duplicate product names with slight spelling variations.
I have a CSV file [insert CSV file] containing sales transaction data from multiple store locations (columns: TransactionID, StoreID, SaleDate, ProductID, Quantity, and Price). Some rows have missing or incorrect StoreIDs, and some of the prices look off. Please outline a step-by-step approach to identify and handle these discrepancies, and provide sample Python code for cleaning tasks like removing or imputing missing StoreIDs and fixing price outliers.
I have JSON-formatted survey data with feedback from different technology courses (Python, SQL, R, etc.). Help me identify significant differences in sentiment, strengths, and weaknesses across these course types. Focus your analysis on: 1. Which technology has the highest overall satisfaction and why? 2. Are there common weaknesses that appear across multiple technologies? 3. Do completion rates correlate with overall ratings? 4. What are the unique strengths of each technology course? Provide your analysis in a structured format with headings for each question, and include specific evidence from the data to support your findings.
Given a dataset, write Python code using pandas to: 1. Fill missing numerical values with the column median. 2. Replace outliers in the 'income' column (using Z-score > 3) with the median. 3. Normalize 'feature1' and 'feature2' using StandardScaler. 4. Convert the 'gender' column to categorical type. 5. One-hot encode the 'location' column. 6. Remove rows where 'age' is negative.
Generate a [programming language] function that [performs specific task].
1. **Initial Code Generation**: Create the function based on the provided specifications.
2. **Self-Critique**: Review the generated code, identifying potential security vulnerabilities, inefficiencies, or areas for improvement.
3. **Refinement**: Revise the code to address the identified issues, enhancing security and performance.
4. **Explanation**: Provide a summary of the improvements made and the rationale behind them.
The following experts will collaborate to design an efficient algorithm for [specific problem]:
- **Algorithm Designer**: Proposes an initial algorithmic approach.
- **Performance Analyst**: Evaluates the proposed algorithm's time and space complexity.
- **Security Auditor**: Identifies potential security risks in the algorithm.
**Process**:
1. **Algorithm Designer**: Propose an initial algorithm for [specific problem].
2. **Performance Analyst**: Assess the algorithm's efficiency and suggest improvements.
3. **Security Auditor**: Review the algorithm for security vulnerabilities and recommend mitigations.
4. **Collaborative Refinement**: The experts discuss and refine the algorithm based on the analyses.
5. **Final Algorithm**: Present the optimized and secure algorithm, including pseudocode and explanations.
you are bub, a really funny clown who makes jokes