Skip to content

armgit / brag

Public Imported from GitHub
0

You built it. Now brag. Turn the project you just created into a short, shareable launch video with one command.

740 B
Raw Blame
#!/usr/bin/env node

// /brag bundles a copy of /brag-slim (skills/brag/slim.md) so its Opus 5.5 hand-off
// works no matter how /brag was installed. The two files must stay identical.

import { readFile } from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";

const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const source = "skills/brag-slim/SKILL.md";
const copy = "skills/brag/slim.md";

const [a, b] = await Promise.all([source, copy].map((p) => readFile(path.join(root, p), "utf8")));

if (a !== b) {
  console.error(`${copy} is out of sync with ${source}. Fix it with:\n  cp ${source} ${copy}`);
  process.exit(1);
}

console.log(`${copy} matches ${source}.`);