A template project for efficiently tackling Kaggle competitions using AI. Leverages Claude Code and MCP (Model Context Protocol) to support everything from competition research to coding.
- MCP Integration: Uses Model Context Protocol to integrate tools.
- Perplexity AI: For searching competition info and research.
- Kaggle MCP: For interacting with Kaggle datasets and competitions.
- Custom Commands: Includes Slash Commands for Claude Code (
/fetch-kaggle,/create-claude-md,/eda,/baseline, etc.) - Structured Directories: Optimized folder structure for experiment management
- Claude Code installed
- uv installed
- Perplexity API Key (for Perplexity MCP server)
- Kaggle API Token (for Kaggle MCP server)
-
Clone & Install Clone the repository or use it as a template. You can specify a directory name to make the competition clear at a glance:
git clone https://github.com/taimo3810/kaggle-with-ai-template.git titanic cd titanic -
Run Setup Command In Claude Code, run the setup command with your competition URL:
/setup [competition-url-or-name]
Example:
/setup https://www.guruguru.science/competitions/31 /setup titanic
This will automatically:
- Install Python dependencies via
uv sync - Create the necessary directory structure (
src/,data/,ai-src/, etc.) - Fetch competition info and create
.references/COMPETITION.md,.references/DATASET.md,.references/METRIC.md - Generate AI context file
CLAUDE.md
- Install Python dependencies via
-
Download Data Download competition data to
data/raw/directory. -
Start Working You're ready to go! Use
/edato explore data or/baselineto create a baseline solution.
This template uses MCP servers to enhance Claude's capabilities. Add the following to your MCP configuration file (e.g., .mcp.json or Claude Desktop config).
Set up with your Perplexity API Key.
- Note:
PERPLEXITY_API_KEYenvironment variable is required inmcpServerssettings.
To interact with Kaggle competitions and datasets directly, set up the Kaggle MCP server. Please refer to the official Kaggle MCP Documentation for installation and configuration instructions.
The following directory structure is initialized by running /setup:
src/: Human-authored code. Primary solutions and shared utilities reside here. AI should prioritize reading from here and avoid destructive edits unless explicitly instructed.commons/: Common utilitiesSolutionX/: Code for each solution
ai-src/: AI playground. A dedicated space for AI to freely generate code, run experiments, and store artifacts.notebook/: Jupyter Notebooksdata/: Datasets (usually ignored by.gitignore)raw/: Original immutable dataprocessed/: Processed data features
configs/: Configuration fileslogs/: Experiment logs.claude/commands/: Custom commands for Claude Code
Set up the entire project for a competition in one command:
/setup [competition-url-or-name]
Example:
/setup https://www.guruguru.science/competitions/31 /setup titanic
If you need to update competition info separately:
/fetch-kaggle [competition-name-or-url]
Regenerate the AI assistant's context file:
/create-claude-md
Execute EDA on data files and create a Notebook:
/eda [data-file-path]
Example:
/eda data/train.csv
Research specific topics, papers, or methods relevant to the competition:
/research [topic-or-question]
Example:
/research # Auto-detect topics from .references/COMPETITION.md /research "SOTA models for 2D bin packing"
Create baseline code for training and inference:
/baseline [solution-name]
Example:
/baseline Solution1
To add new Python packages during development:
uv add <package_name>