Skip to content

matthewwong525/WongStack / .agents/plugins/browser/skills/hand-over

hand-over

Verified

scripts/lib/timings.mjs

View on GitHub
// The private links' timing record: one JSON line per link, saying what ended it and how long it was open, kept beside
// result.json and never committed. It takes only the fields named here, so no typed value or error text can reach it.

import { readFileSync, writeFileSync } from 'node:fs';

export const KEEP = 500;
const FIELDS = ['link', 'ended', 'cause', 'ms'];

/** Appends `entry` to `file` with the time, keeping the last `keep` lines, readable by its owner alone. */
export function appendTiming(file, entry, { keep = KEEP, now = Date.now() } = {}) {
  const line = JSON.stringify({ at: new Date(now).toISOString(), ...Object.fromEntries(FIELDS.filter(name => entry[name] !== undefined).map(name => [name, entry[name]])) });
  let lines = [];
  try { lines = readFileSync(file, 'utf8').split('\n').filter(Boolean); } catch { /* the first entry */ }
  writeFileSync(file, `${[...lines, line].slice(-keep).join('\n')}\n`, { mode: 0o600 });
}

/** A link's short name in the record: its completion id's first 8 characters. */
export const linkOf = completionId => String(completionId ?? '').slice(0, 8);
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