Skip to content

Kartik-Doye/Ravengard-AI-Recruiter / .agents/skills/hotpath

hotpath

Verified

Improves performance by defining a metric and workload, profiling first, controlling noise, changing one major variable, and comparing equivalent conditions. Use for latency, throughput, memory, CPU, rendering, query, bundle, or startup problems.

FileKindSize
SKILL.mdskill md11.5 KB
references/measurement.mdmarkdown3.1 KB
references/research.mdmarkdown2.4 KB
scripts/measure-reportother3.1 KB

scripts/measure-report

View on GitHub
#!/usr/bin/env python3
"""measure-report: turn before/after measurements into the hotpath report.

Computes deltas, flags regressions, and enforces the honesty fields
(conditions and explicit threshold). Deterministic; refuses to invent percentages
when inputs are missing.

Usage: skills/hotpath/scripts/measure-report --baseline 4.8 --after 2.9 \
         --unit seconds --conditions "throttled 4G, 50k rows, median of 3" \
         --threshold 0.1 [--label "LCP"] [--json]
Exit 0 = improvement ≥ threshold; 1 = regression or below threshold;
2 = usage error.
"""
import argparse, json, math, sys


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--baseline", type=float, required=True)
    ap.add_argument("--after", type=float, required=True)
    ap.add_argument("--unit", default="ms")
    ap.add_argument("--label", default="measurement")
    ap.add_argument("--conditions", required=True,
                    help="the conditions both runs shared: required, not optional")
    ap.add_argument("--threshold", type=float, required=True,
                    help="minimum relative delta selected from variance or product budget")
    ap.add_argument("--higher-is-better", action="store_true")
    ap.add_argument("--json", action="store_true")
    a = ap.parse_args()

    if not all(math.isfinite(value) for value in (a.baseline, a.after, a.threshold)):
        print("measure-report: measurements and threshold must be finite", file=sys.stderr)
        return 2
    if a.baseline == 0:
        print("measure-report: baseline of 0: not a measurable baseline", file=sys.stderr)
        return 2
    if a.threshold < 0:
        print("measure-report: threshold must be non-negative", file=sys.stderr)
        return 2
    if not a.conditions.strip():
        print("measure-report: conditions must not be empty", file=sys.stderr)
        return 2
    delta = a.after - a.baseline
    rel = delta / abs(a.baseline)
    if not math.isfinite(delta) or not math.isfinite(rel * 100):
        print("measure-report: measurement delta exceeds numeric range", file=sys.stderr)
        return 2
    improved = (a.after < a.baseline) if not a.higher_is_better else (a.after > a.baseline)
    significant = abs(rel) >= a.threshold
    verdict = ("KEEP" if improved and significant else
               "REVERT" if (not improved and significant) else
               "NOISE: below threshold, complexity cost not justified")

    doc = {"label": a.label, "unit": a.unit, "baseline": a.baseline,
           "after": a.after, "delta": round(delta, 6),
           "delta_percent": round(rel * 100, 2),
           "conditions": a.conditions, "threshold": a.threshold,
           "significant": significant, "verdict": verdict}
    if a.json:
        print(json.dumps(doc, indent=2))
        return 0 if improved and significant else 1
    arrow = "↓" if delta < 0 else "↑"
    print(f"{a.label}: {a.baseline}{a.unit == 'ms' and 'ms' or ' ' + a.unit} → "
          f"{a.after}  ({arrow} {abs(round(rel * 100, 2))}%)")
    print(f"conditions: {a.conditions}")
    print(f"verdict: {verdict}")
    return 0 if improved and significant else 1


if __name__ == "__main__":
    sys.exit(main())
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall