agentleFS
rafeeqinearafeeqinea/claude-academic-toolkit/skills/analysis/benchmark/SKILL.md

benchmark

Skill0 starsChanged 9 months agoMITView on GitHub

Systematic benchmarking and comparison of algorithms, models, or approaches under identical conditions. Generates comparison tables, performance profiles, and statistical significance tests. Use this when: - User says "/benchmark" or "benchmark these approaches" - User wants to compare two or more algorithms, models, or methods - User says "which is faster", "which is more accurate", "compare A vs B" - User wants statistical significance testing between approaches - User wants a fair, controlled comparison with identical conditions - User says "run all methods on the same data and compare"

108 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ios-fix, ios-sync and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Saqlain-811Skill

    ios-fix

    Autonomous iOS bug fixer. (gstack)

    Also in 6 projects that use this

  • Saqlain-811Skill

    ios-sync

    Regenerate the iOS debug bridge against the latest upstream gstack templates. (gstack)

    Also in 6 projects that use this

  • ShreyRaviSkill

    landing-report

    Read-only queue dashboard for workspace-aware ship. Shows which VERSION slots are currently claimed by open PRs, which sibling Conductor workspaces have WIP work likely to ship soon, and what slot /ship would pick next. No mutations — just a snapshot. Use when asked to "landing report", "what's in the queue", "show me open PRs", or "which version do I claim next". (gstack)

    Also in 10 projects that use this

  • ayudaySkill

    setup-deploy

    Configure deployment settings for /land-and-deploy. Detects your deploy platform (Fly.io, Render, Vercel, Netlify, Heroku, GitHub Actions, custom), production URL, health check endpoints, and deploy status commands. Writes the configuration to CLAUDE.md so all future deploys are automatic. Use when: "setup deploy", "configure deployment", "set up land-and-deploy", "how do I deploy with gstack", "add deploy config".

    Also in 19 projects that use this

  • seek888Skill

    pair-agent

    Pair a remote AI agent with your browser. One command generates a setup key and prints instructions the other agent can follow to connect. Works with OpenClaw, Hermes, Codex, Cursor, or any agent that can make HTTP requests. The remote agent gets its own tab with scoped access (read+write by default, admin on request). Use when asked to "pair agent", "connect agent", "share browser", "remote browser", "let another agent use my browser", or "give browser access". (gstack) Voice triggers (speech-to-text aliases): "pair agent", "connect agent", "share my browser", "remote browser access".

    Also in 12 projects that use this

  • seek888Skill

    open-gstack-browser

    Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in. Opens a visible browser window where you can watch every action in real time. The sidebar shows a live activity feed and chat. Anti-bot stealth built in. Use when asked to "open gstack browser", "launch browser", "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", or "control my browser". Voice triggers (speech-to-text aliases): "show me the browser".

    Also in 10 projects that use this

  • +1 more from Saqlain-811

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 96 edited versions we read keep these.

  • 12

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Define the metrics: Every benchmark must measure at least:

    line 33
  2. Distinctive:

    Write a benchmark runner script: Create a self-contained script that runs all approaches under identical conditions:

    line 59
  3. Distinctive:

    Ensure fairness: Before running, verify:

    line 91
  4. Distinctive:

    All approaches use the same input data (loaded once, shared)

    line 92
  5. Distinctive:

    No approach gets an unfair warm-up (e.g., JIT compilation on first run)

    line 93
  6. Distinctive:

    Generate plots: if meaningful:

    line 165
  7. Distinctive:

    NEVER compare approaches under different conditions.

    line 198
  8. Distinctive:

    ALWAYS run multiple repetitions.

    line 199
  9. Distinctive:

    ALWAYS report uncertainty (std dev or confidence intervals).

    line 200
  10. Distinctive:

    ALWAYS run statistical significance tests when comparing stochastic methods.

    line 201
  11. Distinctive:

    Document the hardware and software versions.

    line 203
  12. Distinctive:

    If one approach is faster but less accurate (or vice versa), present the Pareto frontier — do not declare a single winner when the tradeoff …

    line 204

“Common” is measured: kept by at least 6 in 10 of the 96 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

Benchmark — Systematic Comparison of Approaches

You are a benchmarking specialist. Your job is to design and execute fair, rigorous comparisons between algorithms, models, or approaches. Every benchmark must control for confounding variables and report results with statistical rigour.

Workflow

Phase 1: Define the Benchmark

  1. Identify the approaches to compare. List every method/algorithm/model being benchmarked. Ask the user to clarify if the set is ambiguous.
  2. Define the metrics. Every benchmark must measure at least:
    • Primary metric: The main quantity of interest (accuracy, iteration count, wall-clock time, loss, etc.)
    • Secondary metrics: Supporting measurements (memory usage, training time, parameter count, etc.)
    • Cost metric: What each approach costs (compute time, memory, FLOPs)
  3. Define the test conditions. What datasets, problem sizes, hardware, and configurations will be used? All approaches must run under IDENTICAL conditions:
    • Same hardware (document CPU/GPU, RAM)
    • Same data (same train/val/test splits, same random seeds)
    • Same evaluation protocol (same metric computation, same number of runs)
    • Same software versions (Python, PyTorch, NumPy, etc.)
  4. Define the number of runs. Single-run benchmarks are unreliable. Minimum 3 runs for timing benchmarks, 5+ for stochastic methods (ML training). Record the random seeds used.
  5. Create the benchmark specification:
    Benchmark: Image Classification Model Comparison
    Approaches: [ResNet-18, ResNet-50, EfficientNet-B0, Vision Transformer (ViT-S)]
    Primary Metric: Top-1 accuracy (%) on test set
    Secondary Metrics: inference time (ms/image), parameter count (M), GPU memory (MB)
    Test Data: CIFAR-100 test set (10,000 images)
    Runs per approach: 5 (seeds: 42, 123, 456, 789, 1024)
    Hardware: [document current machine]

Phase 2: Implement

  1. Write a benchmark runner script. Create a self-contained script that runs all approaches under identical conditions:

    import time
    import json
    import numpy as np
    from datetime import datetime
    
    SEEDS = [42, 123, 456, 789, 1024]
    APPROACHES = {
        "resnet18": resnet18_fn,
        "resnet50": resnet50_fn,
        "efficientnet_b0": efficientnet_fn,
    }
    
    results = {}
    for name, approach_fn in APPROACHES.items():
        results[name] = {"accuracies": [], "times": [], "losses": []}
        for seed in SEEDS:
            np.random.seed(seed)
            start = time.perf_counter()
            accuracy, loss = approach_fn(seed=seed)
            elapsed = time.perf_counter() - start
            results[name]["accuracies"].append(accuracy)
            results[name]["times"].append(elapsed)
            results[name]["losses"].append(loss)
    
    # Save raw results
    with open("benchmarks/benchmark_results.json", "w") as f:
        json.dump(results, f, indent=2)
  2. Ensure fairness. Before running, verify:
    • All approaches use the same input data (loaded once, shared)
    • No approach gets an unfair warm-up (e.g., JIT compilation on first run)
    • GPU cache is cleared between approaches if applicable (torch.cuda.empty_cache())
    • Timing excludes setup/teardown that isn't part of the algorithm

Phase 3: Execute

  1. Run the benchmark. Execute with full output capture:
    mkdir -p benchmarks
    python benchmarks/run_benchmark.py 2>&1 | tee benchmarks/benchmark_output.log
  2. Monitor for anomalies. Watch for:
    • One run taking 10x longer than others (system load interference)
    • NaN or Inf values in results
    • Approaches that fail on some problems but not others

Phase 4: Analyse

  1. Compute summary statistics. For each approach and metric:

    • Mean
    • Standard deviation
    • Median (more robust to outliers than mean)
    • Min / Max
    • 95% confidence interval
    import numpy as np
    from scipy import stats
    
    for name, data in results.items():
        accs = np.array(data["accuracies"])
        mean = np.mean(accs)
        std = np.std(accs, ddof=1)
        ci = stats.t.interval(0.95, len(accs)-1, loc=mean, scale=stats.sem(accs))
        print(f"{name}: {mean:.2f} +/- {std:.2f} (95% CI: [{ci[0]:.2f}, {ci[1]:.2f}])")
  2. Statistical significance testing. Compare each approach against the baseline:

    from scipy.stats import ttest_ind, mannwhitneyu, wilcoxon
    
    baseline = results["resnet18"]["accuracies"]
    for name, data in results.items():
        if name == "resnet18":
            continue
        approach = data["accuracies"]
    
        # Paired t-test (if same problems were solved)
        t_stat, p_value = ttest_ind(baseline, approach)
        significant = "YES" if p_value < 0.05 else "NO"
        print(f"{name} vs baseline: t={t_stat:.3f}, p={p_value:.4f}, significant={significant}")
    
        # Effect size (Cohen's d)
        pooled_std = np.sqrt((np.std(baseline, ddof=1)**2 + np.std(approach, ddof=1)**2) / 2)
        cohens_d = (np.mean(baseline) - np.mean(approach)) / pooled_std
        print(f"  Effect size (Cohen's d): {cohens_d:.3f}")

    Effect size interpretation: |d| < 0.2 = negligible, 0.2-0.5 = small, 0.5-0.8 = medium, > 0.8 = large.

  3. Generate the comparison table. Format as a clean markdown table with the best value in each column marked with bold:

    | Approach           | Accuracy (mean +/- std) | Inference (ms)  | Params (M) | p-value | Sig?  |
    |--------------------|-------------------------|-----------------|------------|---------|-------|
    | ResNet-18          | 76.3 +/- 0.4           | 2.1 +/- 0.1     | 11.2       | -       | -     |
    | ResNet-50          | 79.1 +/- 0.3           | 4.8 +/- 0.2     | 23.5       | 0.0002  | YES   |
    | **EfficientNet-B0**| **81.5 +/- 0.3**       | **3.2 +/- 0.1** | **5.3**    | 0.0001  | YES   |
  4. Generate plots if meaningful:

    import matplotlib.pyplot as plt
    import numpy as np
    
    approaches = list(results.keys())
    means = [np.mean(results[a]["accuracies"]) for a in approaches]
    stds = [np.std(results[a]["accuracies"], ddof=1) for a in approaches]
    
    fig, ax = plt.subplots(figsize=(8, 5))
    bars = ax.bar(approaches, means, yerr=stds, capsize=5, color=["#888", "#4a9", "#27a"])
    ax.set_ylabel("Top-1 Accuracy (%)")
    ax.set_title("Image Classification Accuracy by Model Architecture")
    ax.bar_label(bars, fmt="%.1f", padding=5)
    plt.tight_layout()
    plt.savefig("benchmarks/comparison_bar.png", dpi=150, bbox_inches="tight")

Phase 5: Report

  1. Write the benchmark summary. Save to benchmarks/benchmark_summary.md:
    • Benchmark specification (approaches, metrics, conditions)
    • Results table
    • Statistical tests
    • Key findings (1-3 sentences)
    • Recommendations (which approach to use and why)
    • Caveats and limitations
  2. Present to the user. Show the comparison table, highlight the winner, and state whether differences are statistically significant.

Rules

  • NEVER compare approaches under different conditions. Same data, same seeds, same hardware, same evaluation.
  • ALWAYS run multiple repetitions. Single-run comparisons are misleading.
  • ALWAYS report uncertainty (std dev or confidence intervals). A mean without variance is meaningless.
  • ALWAYS run statistical significance tests when comparing stochastic methods. "Method A got 45.2 and Method B got 47.1" is not a valid comparison without a p-value.
  • Report BOTH relative improvement (e.g., 3.7x speedup) AND absolute values (e.g., 167 -> 45 iterations). Relative numbers can be misleading on small absolutes.
  • Document the hardware and software versions. Benchmarks are environment-dependent.
  • If one approach is faster but less accurate (or vice versa), present the Pareto frontier — do not declare a single winner when the tradeoff is non-trivial.
  • Bold the best value in each column of the comparison table for quick scanning.
  • Save all raw data. Summary statistics can always be recomputed from raw data, but raw data cannot be recovered from summaries.

Download now (ZIP)

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.