# Kaggle Skills

> A toolkit of Claude Code skills, hooks, and scripts that compound your Kaggle knowledge across competitions — designed so every session starts smarter than the last.

- **Type:** MCP server
- **Install:** `agentstack add mcp-subarnasaikia-kaggle-skills`
- **Verified:** Pending review
- **Seller:** [subarnasaikia](https://agentstack.voostack.com/s/subarnasaikia)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [subarnasaikia](https://github.com/subarnasaikia)
- **Source:** https://github.com/subarnasaikia/kaggle-skills

## Install

```sh
agentstack add mcp-subarnasaikia-kaggle-skills
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# kaggle-skills

A toolkit of Claude Code skills, hooks, and scripts that compound your Kaggle knowledge across competitions — designed so every session starts smarter than the last.

## What it does

- **Skills** — slash commands Claude invokes automatically: scaffold a competition, submit safely, run local eval, capture learnings, and more.
- **Hooks** — auto-inject your accumulated learnings at session start; nudge you to log experiments and review submissions.
- **Learning system** — a file-based memory that grows with you. Every scar, every validated pattern lives in `.learnings/`. Future sessions read it automatically.
- **Scripts** — `kln` CLI for humans to search, add, and archive learnings from the terminal.

## Prerequisites

| Tool | Version | Install |
|---|---|---|
| [Claude Code](https://claude.ai/code) | latest | `npm i -g @anthropic-ai/claude-code` |
| [kaggle CLI](https://github.com/Kaggle/kaggle-api) | ≥ 2.0.1 | `uv tool install --python 3.11 kaggle` |
| [uv](https://github.com/astral-sh/uv) | latest | `curl -Lsf https://astral.sh/uv/install.sh | sh` |
| Python | ≥ 3.11 | via uv or system |
| git | any | system |

Kaggle auth: put your API token (a single `KGAT_…` line) in `~/.kaggle/access_token` with mode `600`.

```bash
chmod 600 ~/.kaggle/access_token
```

## Quick install — let Claude Code do it

Paste this prompt directly into Claude Code. It will clone the toolkit, ask whether you're adding it to an existing workspace or starting fresh, and set everything up for you.

```
Set up my Kaggle workspace with kaggle-skills.

Clone the toolkit:
  git clone --depth 1 https://github.com/subarnasaikia/kaggle-skills.git /tmp/kaggle-skills

Then ask me ONE question before doing anything else:
  "Do you have an existing Kaggle workspace directory, or do you want to create a new one?"

  → Existing workspace: ask for the path, then run:
      bash /tmp/kaggle-skills/install.sh 

  → New workspace: ask where to create it (suggest ~/kaggle as default), then run:
      bash /tmp/kaggle-skills/install.sh 

After the install finishes:
  1. Tell me where my workspace lives and confirm which files were copied.
  2. Add a kaggle-skills section to my global ~/.claude/CLAUDE.md so all future
     sessions know the skills are available:

     ## kaggle-skills
     Workspace: 
     Repo: https://github.com/subarnasaikia/kaggle-skills
     Skills: new-competition, submit-competition, run-local-eval, improve-agent,
             debug-agent, leaderboard-check, eda-audit, ensemble-blend,
             log-experiment, capture-learning, recall-learnings,
             preflight-consult, post-submission-review, retrospect-session.
     Ritual: recall-learnings before any non-trivial move. capture-learning when
             surprised. retrospect-session before closing the laptop.

  3. Ask me: "Do you want to open Claude Code in the workspace now?"
```

## Manual install (terminal)

```bash
# HTTPS (no SSH config needed)
git clone --depth 1 https://github.com/subarnasaikia/kaggle-skills.git /tmp/kaggle-skills

# Fresh workspace
bash /tmp/kaggle-skills/install.sh ~/kaggle

# OR — add to an existing workspace
bash /tmp/kaggle-skills/install.sh /path/to/your/existing/kaggle-workspace
```

The install script will:
1. Verify prerequisites (kaggle CLI, uv, python3, git).
2. Copy `.claude/`, `scripts/`, `shared/`, and template files.
3. Make all scripts executable.
4. Skip files that already exist (safe to re-run).
5. Print what to do next.

## Workspace layout after install

```
your-kaggle-workspace/
├── CLAUDE.md                  # Global rules (loaded by Claude Code automatically)
├── LEARNINGS.md               # Digest of top learnings (auto-updated)
├── .claude/
│   ├── settings.json          # Permissions + hook wiring
│   ├── hooks/
│   │   ├── session-start.sh   # Injects learnings at every session start
│   │   ├── post-kaggle-action.sh  # Post-submit nudge
│   │   └── stop.sh            # End-of-session retro nudge
│   └── skills/                # One folder per skill
├── .learnings/                # One file per learning (grows over time)
├── scripts/
│   └── kln                    # Human CLI for learnings
└── competitions/
    └── /                # One folder per competition
```

## Skills reference

### Core workflow
| Skill | What it does |
|---|---|
| `new-competition` | Scaffold a full competition folder with README, LOG, gitignore, venv prompt |
| `submit-competition` | Pre-flight validate + safe submit with quota check and LOG update |
| `leaderboard-check` | Pull leaderboard, compare your best score, show gap to medals |
| `post-submission-review` | Poll score, diff vs best, update LOG, capture learning if notable |

### Agents / simulation
| Skill | What it does |
|---|---|
| `run-local-eval` | Run kaggle-environments matches, report win rate and time budget |
| `improve-agent` | Systematic improvement loop: diagnose → hypothesize → implement → verify |
| `debug-agent` | Step through a replay, find the failing turn, print diagnostics |

### Tabular / ML
| Skill | What it does |
|---|---|
| `eda-audit` | Structured EDA: target dist, missing values, leakage scan, train/test shift |
| `ensemble-blend` | Weighted average or rank average across multiple submission CSVs |

### Learning system
| Skill | What it does |
|---|---|
| `log-experiment` | Write hypothesis before running; fill outcome after |
| `capture-learning` | Write a durable `.learnings/L-*.md` learning file |
| `recall-learnings` | Surface prior learnings relevant to the current task |
| `preflight-consult` | Sanity-check a plan against prior learnings before committing time |
| `retrospect-session` | Extract 0-3 learnings at session end, refresh LEARNINGS.md digest |

## The learning system

```
session starts → hooks inject top learnings into context
     ↓
Claude does work (plans, experiments, submits)
     ↓
surprise? → capture-learning   experiment? → log-experiment
submit?   → post-submission-review
     ↓
session ends → retrospect-session extracts durable lessons
     ↓
next session starts smarter
```

## Competition templates

`competitions/template/` — a fully scaffolded reference folder showing the expected structure and file formats. Use it as a reference when contributing or when `new-competition.sh` doesn't fit your needs.

`.claude/templates/` — per-competition-type `CLAUDE.md` starters. Copy the one that matches your competition into `competitions//CLAUDE.md`:

| File | Competition type |
|---|---|
| `CLAUDE.tabular.md` | Tabular (LightGBM, XGBoost, feature engineering) |
| `CLAUDE.simulation.md` | Agent / simulation (kaggle-environments) |
| `CLAUDE.nlp.md` | NLP (text classification, generation, ranking) |
| `CLAUDE.cv.md` | Computer vision (classification, detection, segmentation) |
| `CLAUDE.notebook.md` | Code / notebook competitions (run on Kaggle's servers) |

## Shared utilities

| Script | What it does |
|---|---|
| `shared/utils/submit.py` | Python wrapper around `kaggle competitions submit` — pre-flight validates file, archives it with a timestamp, appends a row to `submissions/LOG.md`, then calls the CLI. Usable by both humans and Claude. |

```bash
# standard usage
python3 shared/utils/submit.py titanic submission.csv "lgbm baseline"

# skip the interactive y/N prompt (e.g. in scripts)
python3 shared/utils/submit.py titanic submission.csv "lgbm baseline" --yes
```

The script must be run from the workspace root (where `competitions/` lives). It reads `competitions//data/sample_submission.csv` for the header check if present.

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md). New skills, bug fixes, and competition-type-specific patterns are all welcome.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [subarnasaikia](https://github.com/subarnasaikia)
- **Source:** [subarnasaikia/kaggle-skills](https://github.com/subarnasaikia/kaggle-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-subarnasaikia-kaggle-skills
- Seller: https://agentstack.voostack.com/s/subarnasaikia
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
