agentleFS
juanlurgjuanlurg/data-science-claude-skills/skills/experiment-tracker/SKILL.md

experiment-tracker

Skill3 starsChanged 9 months agoMITView on GitHub

Logs ML experiment runs, generates leaderboards, and compares experiments locally using JSON and notebooks. Use when the user wants to track, log, compare, or view ML experiments, model runs, or training results.

We split this skill into the rules it gives an agent

10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the operation is unclear, ask the user.

    line 17
  2. Distinctive:

    All experiment data is stored in:

    line 21
  3. Very specific:

    Create the experiments/ directory if it doesn't exist.

    line 29
  4. Distinctive:

    If not enough information is available, ask the user for the missing details.

    line 43
  5. Very specific:

    Read experiments/tracker.json.

    line 47
  6. Very specific:

    Write back to experiments/tracker.json (pretty-printed with 2-space indent).

    line 77
  7. Very specific:

    Read experiments/tracker.json.

    line 89
  8. Distinctive:

    Ask the user which metric to sort by, or detect from context.

    line 93
  9. Distinctive:

    Follow notebook-format.md.

    line 97
  10. Very specific:

    Read experiments/tracker.json.

    line 150

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Experiment Tracker

Input

$ARGUMENTS specifies the operation. Detect which operation from the arguments and conversation context:

  • log — Log a new experiment run.
  • leaderboard — Generate a leaderboard notebook.
  • compare — Compare specific runs side-by-side.

If the operation is unclear, ask the user.

Storage

All experiment data is stored in:

experiments/
  tracker.json     # Array of run objects
  leaderboard.ipynb

Create the experiments/ directory if it doesn't exist.


Operation 1: Log a Run

Step 1: Extract Run Details

From the conversation context, extract:

  • model: Model name/type (e.g., "RandomForest", "XGBoost").
  • params: Dictionary of hyperparameters (e.g., {"n_estimators": 100, "max_depth": 5}).
  • metrics: Dictionary of evaluation metrics (e.g., {"accuracy": 0.92, "f1": 0.89}).
  • notes: Optional free-text notes.

If not enough information is available, ask the user for the missing details.

Step 2: Read Existing Tracker

Read experiments/tracker.json. If it doesn't exist, initialize as [].

Step 3: Generate Run Entry

  • run_id: max existing run_id + 1, or 1 if empty.
  • timestamp: current ISO 8601 datetime.
  • script_hash: if a training script is identifiable in the conversation context, compute:
python -c "import hashlib; print(hashlib.sha256(open('SCRIPT_PATH').read().encode()).hexdigest()[:12])"

Otherwise set to null.

Step 4: Append and Write

Append the run entry to the array:

{
  "run_id": 1,
  "timestamp": "2026-02-17T10:30:00Z",
  "model": "RandomForest",
  "params": {"n_estimators": 100, "max_depth": 5},
  "metrics": {"accuracy": 0.92, "f1": 0.89},
  "script_hash": "abc123def456",
  "notes": "Baseline model"
}

Write back to experiments/tracker.json (pretty-printed with 2-space indent).

Step 5: Confirm

Tell the user: "Run #N logged. Metrics: {summary of metrics}."


Operation 2: Show Leaderboard

Step 1: Read Tracker

Read experiments/tracker.json. If empty or missing, tell user no runs are logged yet.

Step 2: Determine Sort Metric

Ask the user which metric to sort by, or detect from context. If only one metric exists across all runs, use that.

Step 3: Generate Notebook

Follow notebook-format.md. Detect environment per environment-detection.md for pandas dependency.

Notebook sections:

Header (markdown):

# Experiment Leaderboard
*Generated on {YYYY-MM-DD} by experiment-tracker skill*
*Sorted by: {metric_name}*

Load Data (code):

import pandas as pd
import matplotlib.pyplot as plt
import json

with open('experiments/tracker.json') as f:
    runs = json.load(f)

df = pd.json_normalize(runs)
print(f"Total runs: {len(df)}")

Leaderboard Table (code):

  • Styled DataFrame sorted by the chosen metric (descending).
  • Highlight the best run.

Comparison Chart (code):

  • Bar chart comparing top runs on the chosen metric.
  • plt.tight_layout() and plt.show().

Summary (markdown):

  • Best run: model, params, metrics.
  • Worst run: model, params, metrics.
  • Improvement over time (first run vs best run).

Step 4: Write Notebook

Write to experiments/leaderboard.ipynb.

Tell the user where the notebook was saved.


Operation 3: Compare Runs

Step 1: Identify Runs

User specifies 2+ run IDs (e.g., compare 1 3 5). Extract from $ARGUMENTS.

Step 2: Read and Filter

Read experiments/tracker.json. Filter to the specified run IDs. If any ID is not found, tell the user.

Step 3: Generate Comparison

Generate a notebook or add to the leaderboard notebook. Follow notebook-format.md.

Notebook sections:

Header (markdown):

# Experiment Comparison: Runs {ids}
*Generated on {YYYY-MM-DD}*

Side-by-Side Table (code):

  • DataFrame with runs as columns, params and metrics as rows.
  • Highlight differences between runs.

Metrics Comparison Chart (code):

  • Grouped bar chart showing all metrics for each run.
  • plt.tight_layout() and plt.show().

Diff Summary (markdown):

  • Which parameters changed between runs.
  • Which run performed best on each metric.
  • Recommendation based on trade-offs.

Step 4: Write Notebook

Write to experiments/comparison_{run_ids}_{YYYY-MM-DD}.ipynb.

Tell the user where the notebook was saved.

Download now (ZIP)

  • Other versions4 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 4

    1. tezansahu/ai-garage★ 16same name
    2. accolver/skill-maker★ 4same name
    3. poorvith-mp/skills-business★ 1same name
    4. iberi22/skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.