Skip to content

serejaris/personal-corp-os / skills/benchmark

benchmark

Verified

Use when choosing between engines or models for an agent pipeline and the answer must come from measurement on your own data, not from marketing pages: speech recognition for meeting recordings, the model that turns a transcript into notes, the critic model that checks it. Runs every variant in an isolated container, measures time, cost per hour of input (USD and RUB, with price source and date) and quality (WER/CER and course terms for ASR; code checks plus a judge of a different model for LLM steps), writes results.json/csv and one static analytics page. Triggers on "бенчмарк", "сравни движки", "сколько стоит час записи", "какую модель взять для пайплайна", "benchmark the pipeline", "compare ASR engines".

FileKindSize
SKILL.mdskill md7.3 KB
examples/adapter_example.pyscript4.9 KB
prices.example.jsonconfig3.3 KB
scripts/asr.pyscript10.8 KB
scripts/claude_step.pyscript5.8 KB
scripts/common.pyscript2.1 KB
scripts/llm.pyscript4.0 KB
scripts/report.pyscript10.4 KB
scripts/score.pyscript14.6 KB
task.example.jsonconfig1.7 KB

scripts/common.py

View on GitHub
"""Shared helpers for the benchmark scripts: task config, JSON io, timing, prices."""

from __future__ import annotations

import datetime as dt
import json
import os
import resource
import time
from pathlib import Path


def utc_now() -> str:
    return dt.datetime.now(dt.timezone.utc).replace(microsecond=0).isoformat().replace("+00:00", "Z")


def read_json(path: Path | str) -> dict:
    return json.loads(Path(path).read_text(encoding="utf-8"))


def write_json(path: Path | str, data) -> None:
    path = Path(path)
    path.parent.mkdir(parents=True, exist_ok=True)
    path.write_text(json.dumps(data, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")


def load_task(path: Path | str) -> dict:
    """Task config. Relative paths inside it resolve against the config's folder."""
    path = Path(path).resolve()
    task = read_json(path)
    task["_dir"] = str(path.parent)
    return task


def task_path(task: dict, value: str | None) -> Path | None:
    if not value:
        return None
    p = Path(os.path.expandvars(os.path.expanduser(value)))
    return p if p.is_absolute() else Path(task["_dir"]) / p


class Meter:
    """Wall clock plus CPU seconds of this process and its finished children."""

    def __enter__(self):
        self.t0 = time.monotonic()
        self.r0 = self._cpu()
        return self

    def __exit__(self, *exc):
        self.wall_s = round(time.monotonic() - self.t0, 2)
        self.cpu_s = round(self._cpu() - self.r0, 2)
        return False

    @staticmethod
    def _cpu() -> float:
        s = resource.getrusage(resource.RUSAGE_SELF)
        c = resource.getrusage(resource.RUSAGE_CHILDREN)
        return s.ru_utime + s.ru_stime + c.ru_utime + c.ru_stime


def audio_seconds(path: Path) -> float:
    import subprocess

    out = subprocess.run(
        ["ffprobe", "-v", "error", "-show_entries", "format=duration", "-of", "default=nw=1:nk=1", str(path)],
        capture_output=True, text=True, check=True,
    ).stdout.strip()
    return float(out)


def secret(env_name: str) -> str:
    value = os.environ.get(env_name, "").strip()
    if not value:
        raise KeyError(f"env {env_name} is not set")
    return value
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall