Skip to content

xiaoqianran/kaggle-demo / skills

kaggle-cli

Verified

Use the local Kaggle CLI skill for command guidance, workflows, and troubleshooting across competitions, datasets, kernels/notebooks, models, model variations and versions, inbox file uploads, forums/discussions, benchmarks, configuration, OAuth/API-token authentication, and accelerator quota. Activate this skill when the user asks about kaggle CLI commands, examples, flags, metadata files, download/upload flows, submissions, benchmark tasks, or Kaggle CLI behavior.

FileKindSize
SKILL.mdskill md4.2 KB
references/auth.mdmarkdown3.5 KB
references/benchmarks.mdmarkdown25.1 KB
references/competitions.mdmarkdown11.3 KB
references/configuration.mdmarkdown2.7 KB
references/datasets.mdmarkdown7.5 KB
references/files.mdmarkdown2.0 KB
references/forums.mdmarkdown2.9 KB
references/kernels.mdmarkdown6.0 KB
references/model_variations.mdmarkdown4.2 KB
references/model_variations_versions.mdmarkdown3.5 KB
references/models.mdmarkdown4.8 KB
references/quota.mdmarkdown1.2 KB
references/search.mdmarkdown2.4 KB

references/model_variations.md

View on GitHub
# Model Variations CLI Reference

Use `kaggle models variations` to manage framework-specific variations of a
Kaggle Model. The CLI also accepts legacy aliases
`kaggle models instances`, `kaggle models v`, and `kaggle models i`.

## Prerequisites

- Python 3.11+ with the `kaggle` package installed.
- Kaggle credentials for private models and mutation commands.
- An existing model for create flows.
- For init/create/update flows, use `model-instance-metadata.json`. Use
  `kaggle models variations init -p <FOLDER>` to generate a starter file.

## Command Hierarchy

```text
kaggle models variations (aliases: instances, v, i)
├── get
├── init
├── create
├── files
├── list
├── update
├── delete
└── versions | v
    ├── list
    ├── create
    ├── download
    ├── files
    └── delete
```

## `kaggle models variations init`

Creates a starter `model-instance-metadata.json`.

**Usage:**

```bash
kaggle models variations init [options]
```

**Options:**

- `-p, --path <FOLDER>`: Folder where metadata will be written.

**Examples:**

```bash
kaggle models variations init -p my-model/main
```

**Purpose:** Bootstrap metadata for a model variation.

## `kaggle models variations create`

Creates a new model variation and first version.

**Usage:**

```bash
kaggle models variations create [options]
```

**Options:**

- `-p, --path <FOLDER>`: Folder containing files and `model-instance-metadata.json`.
- `-q, --quiet`: Suppress progress output.
- `-r, --dir-mode <skip|zip|tar>`: Directory handling. Default `skip`.

**Examples:**

```bash
kaggle models variations create -p tmp -q -r skip
```

**Purpose:** Upload variation metadata and files under an existing model.

## `kaggle models variations get`

Gets model variation metadata.

**Usage:**

```bash
kaggle models variations get <MODEL_VARIATION> [options]
```

**Arguments:**

- `<MODEL_VARIATION>`: `<owner>/<model>/<framework>/<variation-slug>`.

**Options:**

- `-p, --path <FOLDER>`: Folder to download metadata to.

**Examples:**

```bash
kaggle models variations get google/gemma/pytorch/7b -p metadata
```

**Purpose:** Download metadata for a variation.

## `kaggle models variations files`

Lists files for the current version of a model variation.

**Usage:**

```bash
kaggle models variations files <MODEL_VARIATION> [options]
```

**Options:**

- `--page-size <SIZE>`: Page size, default 20.
- `--page-token <TOKEN>`: Page token.
- `-v, --csv`: Print CSV.

**Examples:**

```bash
kaggle models variations files google/gemma/pytorch/7b -v --page-size 5
```

**Purpose:** Inspect files associated with the latest variation version.

## `kaggle models variations list`

Lists variations of a model.

**Usage:**

```bash
kaggle models variations list <MODEL> [options]
```

**Options:**

- `--page-size <SIZE>`: Page size, default 20.
- `--page-token <TOKEN>`: Page token.
- `-v, --csv`: Print CSV.

**Examples:**

```bash
kaggle models variations list google/gemma
```

**Purpose:** See framework-specific variations under a model.

## `kaggle models variations update`

Updates variation metadata.

**Usage:**

```bash
kaggle models variations update [options]
```

**Options:**

- `-p, --path <FOLDER>`: Folder containing updated `model-instance-metadata.json`.

**Examples:**

```bash
kaggle models variations update -p tmp
```

**Purpose:** Change variation metadata. This does not upload new files or create
a version; use `models variations versions create` for file updates. The
variation identity is read from `ownerSlug`, `modelSlug`, `framework`, and
`instanceSlug` inside `model-instance-metadata.json`.

## `kaggle models variations delete`

Deletes a model variation.

**Usage:**

```bash
kaggle models variations delete <MODEL_VARIATION> [options]
```

**Options:**

- `-y, --yes`: Skip confirmation.

**Examples:**

```bash
kaggle models variations delete owner/model/jax/main -y
```

**Purpose:** Remove a model variation.

## Notes

- Variation handles use `<owner>/<model-name>/<framework>/<variation-slug>`.
- `instances` is accepted as a legacy spelling for `variations`.
- Directory uploads follow `--dir-mode`; `skip` ignores directories, `zip`
  compresses them, and `tar` uploads an uncompressed archive.
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall