The W&B Primary Skill simplifies running scripts and managing packages for machine learning tasks. It is designed for data scientists and machine learning engineers seeking to streamline their workflows with Weights & Biases.
$ npx skills add https://github.com/wandb/skills --skill wandb-primaryThe W&B Primary Skill integrates Weights & Biases capabilities directly into Claude Code and other coding agents, enabling data scientists and ML engineers to streamline their workflows. It supports logging metrics and rich media during model training, tracking experiments across runs, analyzing results to understand model learning, and tuning hyperparameters. The skill also extends to agent building, allowing teams to trace agentic AI applications, classify failure modes, evaluate models with labeled datasets, and run online evaluations for production monitoring. Install via npx skills and authenticate with your W&B API key to access experiment analysis, Weave tracing, Reports, Signal Builder, and Launch functionality.
Install the skill using the provided command.
Running machine learning scripts
Managing Python packages
Integrating with OpenAI models
Tracking experiments with W&B
$ npx skills add https://github.com/wandb/skills --skill wandb-primarygit clone https://github.com/wandb/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Run the following script for [COMPANY]'s [INDUSTRY] project using Weights & Biases (W&B). Initialize W&B with the project name '[PROJECT_NAME]' and log the training metrics to the W&B dashboard. Ensure all package dependencies are installed and log the script's output. Here's the script: [SCRIPT_CONTENT]
# Weights & Biases Run Summary
## Run Details
- **Project Name:** `customer_churn_prediction`
- **Run ID:** `qwerty123`
- **Status:** Completed
- **Duration:** 45 minutes
## Metrics Logged
| Metric | Value | Change vs. Previous Run |
|-----------------|---------|-------------------------|
| Training Loss | 0.12 | -15% |
| Validation Loss | 0.18 | -10% |
| Accuracy | 92.4% | +2.1% |
| F1 Score | 0.89 | +0.05 |
## Artifacts Generated
- **Model:** `model-v1.2.0.pth` (logged as `best_model`)
- **Confusion Matrix:** `confusion_matrix.png`
- **Feature Importance:** `feature_importance.csv`
## Key Observations
- The model achieved 92.4% accuracy on the validation set, surpassing the target of 90%.
- Training loss decreased by 15% compared to the previous run, indicating improved convergence.
- Feature importance analysis revealed that `monthly_charges` and `tenure` were the top predictors of churn.
View the full run on W&B: [https://wandb.ai/company/customer_churn_prediction/runs/qwerty123](https://wandb.ai/company/customer_churn_prediction/runs/qwerty123)
```python
# Example script snippet logged to W&B
import wandb
from wandb.keras import WandbCallback
wandb.init(project="customer_churn_prediction", name="run_qwerty123")
wandb.config.update({"learning_rate": 0.001, "batch_size": 32})
```Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan