Skip to content

matthewwong525/WongStack / .agents/plugins/browser

browser

Verified

The person's own browser, for errands.

scripts/lib/profile.mjs

View on GitHub
// The repo's own parts, by named slot: `.agents/browser/profile.mjs` at the checkout's top, loaded once. An empty slot
// turns off only its own extra. The slots and what each does when empty: ../../README.md#slots
import { existsSync } from 'node:fs';
import { dirname, join } from 'node:path';
import { fileURLToPath, pathToFileURL } from 'node:url';

/** The nearest folder up from `from` that holds `.git`, or null: never a count of folders, since Node resolves the
 * source's skill link to a path one level deeper. */
export function checkoutTop(from = dirname(fileURLToPath(import.meta.url))) {
  for (let dir = from; ; dir = dirname(dir)) {
    if (existsSync(join(dir, '.git'))) return dir;
    if (dirname(dir) === dir) return null;
  }
}

/** The profile file: `WONG_BROWSER_PROFILE` when set (empty for none), else the checkout's own. */
export function profileFile(env = process.env) {
  if (env.WONG_BROWSER_PROFILE !== undefined) return env.WONG_BROWSER_PROFILE || null;
  const top = checkoutTop();
  return top && join(top, '.agents', 'browser', 'profile.mjs');
}

let loaded = null;
const load = async () => {
  const file = profileFile();
  return file && existsSync(file) ? (await import(pathToFileURL(file).href)).default ?? {} : {};
};

/** The profile's part named `name`, or null when the repo has no profile or leaves the slot empty. */
export async function slot(name) {
  loaded ??= load();
  return (await loaded)[name] ?? null;
}
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated 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: 196kUpdated Claude CodeCodexVerifiedInstall