kaggle-notebook-generator
Skill2 starsChanged 7 months agoMITView on GitHub
Create ready‑to‑run Kaggle notebooks (Kernels) that include the necessary metadata, markdown explanations, and code cells based on the user’s request.
- Installs packages
In this repository20 other files it gives its agents.
- api-design-standardizerSkill
- api-documentation-generatorSkill
- cloud-infrastructure-architectSkill
- cobol-to-javaSkill
- code-reviewSkill
- compliance-policy-auditorSkill
- database-performance-auditorSkill
- data-cleanupSkill
- incident-post-mortem-generatorSkill
- meeting-transcriberSkill
- pdf-extractSkill
- python-structure-generatorSkill
- python-type-hinterSkill
- refactor-simplifySkill
- github-repo-structure-builderSkill
- security-vulnerability-scannerSkill
- sql-query-optimizerSkill
- unit-test-generatorSkill
- user-story-generatorSkill
- web-researchSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Use when the user asks for a Kaggle notebook, a Kaggle “kernel”, or a reproducible notebook for a competition/ dataset.
- Distinctive: line 6
Do NOT use for generic scripts that are not intended to run on Kaggle, for HTML‑only notebooks, or when the user explicitly wants only a …
- Distinctive: line 17
Create ready‑to‑run Kaggle notebooks (Kernels) that include the necessary metadata, markdown explanations, and code cells based on the …
- Very specific: line 34
IF a Kaggle competition or dataset is mentioned → store kaggle_ref.
- Distinctive: line 67
Use heuristic inference to add typical snippets:
- Distinctive: line 78
Run a lightweight JSON schema check.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Kaggle Notebook Generator
Create ready‑to‑run Kaggle notebooks (Kernels) that include the necessary metadata, markdown explanations, and code cells based on the user’s request.
🎯 When to Use
- Positive triggers
- User says “create a Kaggle notebook that …”, “I need a kernel for …”, or “Generate an IPython notebook for this task”.
- The request includes a dataset name, competition, or a clear analysis goal (e.g., “visualize Titanic data”).
- Negative triggers
- The user only wants a plain Python script or a Jupyter notebook that will not run on Kaggle (e.g., requires local file‑system access).
- The user asks for a notebook in another platform’s format (Google Colab
.ipynbwith specific magic commands). - The query is ambiguous to the point where the intended notebook purpose cannot be inferred (e.g., “make something cool”).
🧠 Core Workflow
- Parse User Intent
- Detect keywords:
kaggle,kernel,notebook,competition,dataset. - IF a Kaggle competition or dataset is mentioned → store
kaggle_ref. - ELSE IF only a generic analysis request → proceed with a generic notebook template.
- Detect keywords:
Construct Notebook Skeleton (uses the standard Jupyter JSON schema).
- Metadata block (required by Kaggle):
{ "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python", "version": "3.9" }, "title": "<Generated Title>", "id": "<UUID>", "slug": "<kaggle‑slug-if‑available>" } - Cell Generation
- IF the user provides a high‑level outline → create ordered markdown cells matching that outline.
- ELSE generate a default structure:
- Title & description (markdown).
- Imports (code).
- Data loading (code).
- Exploratory analysis (code + markdown).
- Modeling / evaluation (code).
- Conclusions (markdown).
- Metadata block (required by Kaggle):
- Populate Code Cells
- Use heuristic inference to add typical snippets:
import pandas as pdwhen a dataset is mentioned.import matplotlib.pyplot as pltfor visualization requests.from sklearn.model_selection import train_test_splitfor modeling tasks.
- IF the user supplies a specific algorithm (e.g., “random forest”) → inject the corresponding scikit‑learn import and model boiler‑plate.
- Use heuristic inference to add typical snippets:
- Insert Kaggle‑Specific Helpers (optional).
!pip install -q kaggle(only if the user asks for additional packages).from kaggle.api.kaggle_api_extended import KaggleApiblock for dataset download whenkaggle_refis present.
- Validate Notebook JSON
- Run a lightweight JSON schema check.
- IF validation fails → add a
# TODO: Fix notebook JSONcomment in the output report.
- Provide Diff / Summary
- Summarize generated sections, list added imports, and note any assumptions made.
📋 Output Format
1️⃣ Notebook Generation Report
{
"status": "success",
"notebook_name": "my_kaggle_notebook.ipynb",
"title": "Exploratory Analysis of Titanic Dataset",
"cells_created": 8,
"imports_added": ["pandas", "matplotlib.pyplot", "sklearn.model_selection"],
"kaggle_metadata": {
"competition": "titanic",
"dataset": "alexanderlindberg/titanic"
},
"confidence_issues": []
}2️⃣ Notebook JSON (truncated for readability)
{
"metadata": {
"kernelspec": { "name": "python3", "display_name": "Python 3" },
"language_info": { "name": "python", "version": "3.9" },
"title": "Exploratory Analysis of Titanic Dataset",
"id": "d3f1c9e2-8b4a-4f6e-9a2b-7c1e5f4a6b8c",
"slug": "titanic-exploratory-analysis"
},
"nbformat": 4,
"nbformat_minor": 5,
"cells": [
{ "cell_type": "markdown", "source": ["# Exploratory Analysis of Titanic Dataset\\n", "Using the Kaggle Titanic competition data."] },
{ "cell_type": "code", "source": ["import pandas as pd\\n", "import matplotlib.pyplot as plt\\n", "from sklearn.model_selection import train_test_split"] },
{ "cell_type": "code", "source": ["df = pd.read_csv('/kaggle/input/titanic/train.csv')\\n", "df.head()"] },
{ "cell_type": "markdown", "source": ["## Data Overview"] },
{ "cell_type": "code", "source": ["df.describe()"] },
{ "cell_type": "markdown", "source": ["## Modeling"] },
{ "cell_type": "code", "source": ["X = df.drop('Survived', axis=1)\\n", "y = df['Survived']\\n", "X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)"] },
{ "cell_type": "code", "source": ["# TODO: Insert model training code"] }
]
}3️⃣ Next‑Step Recommendation
# Save the JSON above to a file
echo '<PASTE_JSON>' > my_kaggle_notebook.ipynb
# Verify on Kaggle
kaggle kernels push -p .⚠️ Fallback Behavior
- All required components already exist (e.g., the user provides a complete notebook):
{
"status": "partial",
"message": "Provided input already contains a valid Kaggle notebook. No changes made.",
"suggestion": "You may still add Kaggle metadata using the `metadata` field in the notebook JSON."
}- Unclear intent or missing essential details (e.g., no dataset/competition is referenced and no analysis goal is stated):
{
"status": "error",
"message": "Unable to determine notebook purpose. Please specify the dataset, competition, or analysis objective."
}Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

