kaggle

kaggle is a skill for Claude Code from Borda/AI-Rig. It costs 149 tokens per session (7,017 once invoked), scanned C, original, Apache-2.0.

A tool for creating Kaggle competition notebooks as Jupytext Python scripts. Kaggle is a platform where people solve data-science competitions, and Jupytext stores notebooks as readable text files.

In plain words
What is it for?
It helps with exploring competition data, building baselines, training models, making predictions, and preparing submissions. For deep-learning models, it uses PyTorch Lightning and torchmetrics.
Why use it?
It turns a competition solution into a clear, reviewable learning path while keeping experiments organized. It also helps avoid data leakage, where information from the test data accidentally influences training.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the research plugin — 8 skills, 2 agents shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Borda/AI-Rig
Claude Code
/plugin install research

Made for: Claude Code.

Or install research, the plugin that ships this one along with the rest of its 8 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kaggle

README.md
[![agentmods](https://agentmods.dev/badge/skills/borda/ai-rig/kaggle.svg)](https://agentmods.dev/skills/borda/ai-rig/kaggle)
Your own site
<a href="https://agentmods.dev/skills/borda/ai-rig/kaggle"><img src="https://agentmods.dev/badge/skills/borda/ai-rig/kaggle.svg" alt="Measured on agentmods" height="20"></a>
Per session 149 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,017 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00149 $0.07017
Opus 5 $0.00075 $0.03508
Sonnet 5 $0.00030 $0.01403
Haiku 4.5 $0.00015 $0.00702

Measured 6d ago against content hash 8180a4d6f25f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade C, and why

kaggle scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

> 2. `mkdir -p ~/.kaggle && mv ~/Downloads/kaggle.json ~/.kaggle/ && chmod 600 ~/.kaggle/kaggle.json`

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

FOUNDRY_AVAILABLE=$({ find ~/.claude/plugins/cache -maxdepth 5 -path "*/foundry/*/agents/sw-engineer.md" 2>/dev/null; ls plugins/cc_foundry/agents/sw-engineer.md 2>/dev/null; } | head -1) # timeout: 5000
plugins/cc_research/skills/kaggle/SKILL.md · 424 lines

How it starts

The opening of the file, as written. The whole thing — 424 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Generate Kaggle competition notebook script, Jupytext # %% format.

Two goals, equal weight — neither traded for other:

  • Win — leaderboard-competitive: leakage-safe CV, metric-aligned loss/model choice, tuning/ensembling when it moves the score, not style theater
  • Teach — read top to bottom like a university/seminar lecture on solving this competition: reader new to it follows the full reasoning chain, every decision motivated, nothing left as unexplained code

Follows user's ML research style distilled from past notebooks:

  • PTL always for DNN training (PyTorch Lightning + torchmetrics) — even simple baselines
  • Tool agnostic — best-fit library for problem; PTL when training loop needed
  • Stages with lenses — each major stage: quick sanity check cell (show one batch, print shapes, verify submission format)
  • Small, single-purpose cells — one action per cell (load, one transform, one plot, one check); never bundle setup + run + verify to save cell count
  • Every cell earns its place — one-line why (comment or markdown sentence) before/in each cell: the specific reason this step happens now — never a restatement of what the code does
  • Section markdown is extensive and structured — full explanation of what/why/how-it-advances-the-goal per section, formatted as tables/lists/blockquotes over dense prose paragraphs; markdown before a plot sets up the question, markdown after states the finding and its implication — plot and prose flow as one beat, never an orphaned chart
  • # ! bash over subprocess — package installs, nvidia-smi, ls -lh, # ! head submission.csv
  • EDA is visual — distribution plots, sample grids, dimension scatters before any model
  • Inference included — model save pattern + separate load-and-infer cells
  • CSVLogger + seaborn — metrics plotted from metrics.csv after every training run

NOT for writing Python packages, modules, production code — notebook scripts only. NOT research literature survey — use /research:topic for SOTA literature search.

  • $ARGUMENTS: one of:
    • <competition-name> — short slug for output filename; generates blank template
    • <competition-name> <url> — fetches competition overview from URL before generating
    • <competition-name> "<description>" — inline description of problem and data
    • --type <type> — hint: classification, regression, segmentation, detection, tabular (auto-detected when omitted)
    • --eda-only — generate only EDA sections (no model/training/submission); always online (no offline setup)
    • --inference-only — generate inference notebook from checkpoint (no EDA, no training); always offline (frozen packages pattern); loads checkpoint from PATH_CHECKPOINT constant; output suffix -inference.py
    • --offline-setup — include offline package setup (frozen_packages pattern) in setup cell; auto-applied when --inference-only; ignored when --eda-only (EDA always online)
    • --resume <path> — read existing .py script, extend/improve it

Output: .experiments/kaggle/<competition-name>.py

OUTPUT_DIR:       .experiments/kaggle/
DATA_DIR:         .experiments/kaggle/data/<competition>/  # kaggle CLI downloads land here, gitignored
CELL_MARK:        "# %%"
MD_CELL_MARK:     "# %% [markdown]"
COMPETITORS_DIR:  resources/competitors/  # optional user-project path, not shipped in plugin — Step 1 reads if present
# NOTE: doc-only — not shell vars across Bash() calls (state doesn't persist); keep synced with literal use sites (Steps 1,3,4)
  • Key boundary: end of Step 3 — notebook script generated by foundry:sw-engineer, written to OUTFILE.
  • Preserve: OUTFILE path (derived from TMPDIR keys), COMPETITION_NAME (TMPDIR key), mode flags (EDA_ONLY, INFERENCE_ONLY, OFFLINE_SETUP).
  • Clear at Step 1 start (stale prior run) and after Step 4 package-distillation gate resolves.

Read the full file on GitHub · 424 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 424 lines · 149 tokens per session scan C 8180a4d6f25f

Subscribe to this mod's changes

kaggle is a skill published in the GitHub repository Borda/AI-Rig (26 stars, last pushed 2d ago), licensed Apache-2.0. It adds 149 tokens to every session and 7,017 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.