plugins/kaggle-master/skills/notebook-lifecycle/SKILL.md
Kaggle notebook/kernel lifecycle operations. PROACTIVELY activate for: (1) creating Kaggle notebooks or kernels, (2) `kaggle kernels init`, (3) pushing or running notebooks with `kaggle kernels push`, (4) pulling notebooks with metadata, (5) checking kernel status, files, logs, or outputs, (6) downloading output artifacts with file patterns, (7) deleting kernels, (8) Python API kernel operations, (9) auth for notebook CLI workflows. Provides: safe CLI/Python lifecycle commands, run monitoring, output retrieval, destructive-action guardrails.
npx skillsauth add JosiahSiegel/claude-plugin-marketplace notebook-lifecycleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill for local-to-Kaggle notebook administration: initialize, push, pull, run, inspect status/logs/files, download outputs, and delete kernels. Treat Kaggle Notebooks and Kaggle kernels as the same operational surface for CLI/API purposes.
| Task | Kaggle CLI |
|---|---|
| List kernels | kaggle kernels list |
| Initialize folder | kaggle kernels init -p <folder> |
| Push/update/run | kaggle kernels push -p <folder> [-t <timeout>] [--accelerator <ID>] |
| Pull source + metadata | kaggle kernels pull <owner/slug> -p <folder> -m |
| Status | kaggle kernels status <owner/slug> |
| Files | kaggle kernels files <owner/slug> |
| Outputs | kaggle kernels output <owner/slug> -p <folder> -o [--file-pattern <REGEX>] |
| Logs | kaggle kernels logs <owner/slug> |
| Delete | kaggle kernels delete <owner/slug> --yes |
Verify authentication before lifecycle commands. Supported public mechanisms include kaggle auth login, KAGGLE_API_TOKEN, ~/.kaggle/kaggle.json, and ~/.kaggle/access_token. Do not print token contents in responses or logs. When troubleshooting auth, check file presence and permissions without exposing secrets.
kernel-metadata.json before push; load kernel-metadata for schema repair.code_file exists and matches kernel_type/language.kaggle kernels push -p <folder> and optional -t or --accelerator.kaggle kernels status <owner/slug> until complete or failed.logs, files, and output to diagnose or retrieve artifacts.Use kaggle kernels pull <owner/slug> -p <folder> -m when the user needs both source and metadata. Treat pulls into non-empty folders as overwrite-sensitive: ask before replacing local work, or advise using a fresh folder. After pulling, compare metadata and code before pushing changes back.
Use kaggle kernels output <owner/slug> -p <folder> -o to download all outputs. Add --file-pattern <REGEX> to limit large output sets, for example submission files or model artifacts. Verify expected files exist before competition submission.
For long-running service or tunnel notebooks, do not rely only on logs for externally needed connection details. Logs may be blank during keepalive cells. Write discovered values such as a public tunnel URL to /kaggle/working/ollama_base_url.txt, then retrieve them with:
kaggle kernels output <owner>/<kernel-slug> -p ./outputs -o --file-pattern "ollama_base_url.txt"
After a successful kaggle kernels push, the Kaggle CLI does not provide a documented, stable contract that stdout includes a notebook URL. For e2e administration, derive the browser URL from kernel-metadata.json when its id field uses the documented identifier format owner/kernel-slug:
https://www.kaggle.com/code/<owner>/<kernel-slug>
Before the first successful push, call this the expected URL. After a successful push and status check, call it the notebook URL:
kaggle kernels push -p <notebook-folder>
kaggle kernels status <owner/kernel-slug>
Do not rely on parsing kaggle kernels push output for a URL; CLI text may change. Do not rely on undocumented CSV columns from list commands for URL construction. Private notebooks may require sign-in or appropriate permissions, and slug changes after renames can make older derived URLs stale.
Use KaggleApi().authenticate() before API calls. Relevant methods include kernels_push, kernels_status, kernels_pull, kernels_output, kernels_list, kernels_logs, and kernels_delete. Prefer CLI examples for users unless they explicitly ask for Python automation.
Require explicit confirmation before kaggle kernels delete <owner/slug> --yes; deletion is permanent. Also require confirmation before public visibility changes, overwriting local folders, pushing code that may contain secrets, or long accelerator-backed runs. If secrets appear in notebook source or metadata, stop and recommend moving them to Kaggle Secrets rather than pushing.
Do not claim public API support for notebook scheduling, secrets management, collaborator administration, cell-level editing of hosted notebooks, Docker image selection, or quota management. Suggest Kaggle UI workflows only when appropriate.
development
This skill should be used when the user asks to train, debug, scale, or improve ML models. PROACTIVELY activate for: (1) PyTorch, TensorFlow/Keras, JAX, Flax, Hugging Face Trainer/Accelerate training loops, (2) distributed training, DDP/FSDP/DeepSpeed, TPU/GPU setup, (3) mixed precision AMP/bf16, gradient accumulation, checkpointing, seeding, (4) overfitting, imbalance, loss functions, regularization, LR schedules, warmup, (5) memory optimization, gradient checkpointing, offloading, quantization-aware training. Provides: reproducible training best practices across deep learning and classical ML.
development
This skill should be used when the user asks to productionize, track, version, govern, monitor, or automate ML systems. PROACTIVELY activate for: (1) MLflow, Weights & Biases, Neptune, Comet, ClearML experiment tracking, (2) model registry, model versioning, artifact lineage, reproducibility, (3) Kubeflow, SageMaker Pipelines, Vertex AI Pipelines, Azure ML pipelines, Databricks workflows, (4) CI/CD, continuous training/evaluation, A/B tests, canary/shadow deployments, (5) drift detection, model monitoring, data validation, responsible AI governance. Provides: end-to-end MLOps architecture and operational safeguards.
development
This skill should be used when the user asks to optimize, export, serve, compress, or accelerate ML inference. PROACTIVELY activate for: (1) latency, throughput, p95/p99, batching, concurrency, KV cache, memory, or cost issues, (2) quantization INT8/INT4, GPTQ, AWQ, bitsandbytes, pruning, sparsity, distillation, (3) ONNX export, ONNX Runtime, TensorRT, TorchScript, torch.compile, XLA, OpenVINO, Core ML, TFLite, (4) Triton, TorchServe, TF Serving, BentoML, Seldon, KServe configuration, (5) edge deployment, CPU/GPU/TPU/Inferentia serving. Provides: hardware-aware inference optimization and safe benchmarking.
testing
This skill should be used when the user asks to tune hyperparameters, run sweeps, optimize search spaces, or use AutoML. PROACTIVELY activate for: (1) Optuna, Ray Tune, FLAML, AutoGluon, Hyperopt, Nevergrad, KerasTuner, W&B sweeps, (2) grid search, random search, Bayesian optimization, TPE, Gaussian processes, evolutionary search, (3) ASHA, Hyperband, successive halving, multi-fidelity optimization, population-based training, (4) learning-rate finder, batch-size search, early stopping, pruning, (5) reproducible sweep design and experiment analysis. Provides: budget-aware hyperparameter search strategy.