skills/code_generation/SKILL.md
```markdown # SKILL: Code Generation for Data Analysis This skill generates Python code for data analysis tasks, focusing on clarity, executability, and error handling. The code should use pandas, matplotlib, and scipy where appropriate. ## Output Format Python code as a single string. The code should be well-formatted and include comments explaining each step. The code should be ready to be executed. Always include error handling using `try...except` blocks. ## Decision Framework 1. **Und
npx skillsauth add prathamchopra001/inquiro skills/code_generationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
# SKILL: Code Generation for Data Analysis
This skill generates Python code for data analysis tasks, focusing on clarity, executability, and error handling. The code should use pandas, matplotlib, and scipy where appropriate.
## Output Format
Python code as a single string. The code should be well-formatted and include comments explaining each step. The code should be ready to be executed. Always include error handling using `try...except` blocks.
## Decision Framework
1. **Understand the Objective**: Carefully analyze the task description, dataset information, and research objective to fully grasp the analysis goal.
2. **Data Loading**: Load the data using `pandas`. Handle potential file errors (e.g., file not found) using `try...except`.
3. **Data Cleaning**: Based on the objective, clean the data. This may include handling missing values (imputation or removal), removing duplicates, and converting data types.
4. **Data Analysis**: Perform the core data analysis based on the objective. This might involve:
* **Descriptive Statistics**: Calculate means, medians, standard deviations using `pandas`.
* **Data Visualization**: Create plots and charts using `matplotlib` to explore data relationships. Choose appropriate plot types (scatter plots, histograms, bar charts, etc.). Label axes and provide titles.
* **Statistical Analysis**: Use `scipy` for statistical tests (e.g., t-tests, ANOVA, correlation tests).
5. **Error Handling**: Wrap potentially problematic sections of code in `try...except` blocks to catch errors and print informative error messages.
6. **Output**: Ensure the code prints the results of the analysis in a clear and understandable format.
7. **Confidence Scoring**: High confidence if all steps are implemented correctly, error handling is robust, and the code is well-commented and executable. Medium confidence if some parts are missing or could be improved. Low confidence if the code is incomplete, contains errors, or doesn't address the objective.
## Common Patterns
**Example 1:**
**Input:** "Analyze the 'iris' dataset to show the relationship between sepal length and sepal width using a scatter plot."
**Output:**
```python
import pandas as pd
import matplotlib.pyplot as plt
try:
# Load the iris dataset
iris = pd.read_csv('iris.csv')
# Create a scatter plot of sepal length vs sepal width
plt.figure(figsize=(8, 6))
plt.scatter(iris['sepal_length'], iris['sepal_width'])
plt.title('Sepal Length vs Sepal Width in Iris Dataset')
plt.xlabel('Sepal Length (cm)')
plt.ylabel('Sepal Width (cm)')
plt.grid(True)
plt.show()
except FileNotFoundError:
print("Error: The iris.csv file was not found.")
except Exception as e:
print(f"An error occurred: {e}")
Example 2:
Input: "Calculate the mean and standard deviation of the 'age' column in the 'customers' dataset."
Output:
import pandas as pd
try:
# Load the customers dataset
customers = pd.read_csv('customers.csv')
# Calculate the mean and standard deviation of the age column
mean_age = customers['age'].mean()
std_age = customers['age'].std()
# Print the results
print(f"Mean age: {mean_age:.2f}")
print(f"Standard deviation of age: {std_age:.2f}")
except FileNotFoundError:
print("Error: The customers.csv file was not found.")
except KeyError:
print("Error: The 'age' column was not found in the dataset.")
except Exception as e:
print(f"An error occurred: {e}")
try...except blocks to handle potential errors.try...except blocks.development
# SKILL.md: task_generation ## Task Description Generates focused research tasks to advance a scientific objective by addressing knowledge gaps and balancing exploration/exploitation. Prioritizes tasks that validate strong findings or explore high-impact hypotheses. ## Output Format **JSON Array** of objects with these fields: - `type`: "Exploration" (new hypotheses) or "Exploitation" (existing hypothesis validation) - `description`: Specific action to take (e.g., "Test hypothesis X un
development
```markdown # SKILL: Scoring ## Task Description This role is responsible for assigning scores or ratings based on predefined criteria. It involves evaluating information and applying a consistent scoring rubric. ## Output Format The output should be a JSON object with the following structure: ```json { "score": INTEGER, "reason": STRING, "confidence": FLOAT (0.0 to 1.0) } ``` ## Decision Framework 1. **Identify Criteria:** Understand the specific criteria to be used for scoring. This
development
```markdown # SKILL: schema_design ## Task Description This skill focuses on designing effective and well-structured schemas for various data types, ensuring data integrity and facilitating efficient data processing. It involves defining the structure, data types, and constraints for datasets. ## Output Format Output should be a well-formatted JSON schema definition, including: * `type`: Data type (e.g., "object", "string", "number", "array", "boolean") * `properties`: (For objects) A dict
development
```markdown # SKILL: Report Writing ## Task Description This skill focuses on synthesizing research findings into concise, well-structured reports. It involves identifying key themes, patterns, and insights from individual findings, and presenting them in a coherent and informative manner. ## Output Format The output should be a structured report, formatted as follows: ```json { "report_title": "Title of the Report", "executive_summary": "A brief overview of the report's key findings and