Skip to content

amanpal3/Dr-SKILLs / .agent/skills/archify

archify

Unverified

Create validated architecture, workflow, sequence, data-flow, lifecycle/state, ERD, class, tree, timeline, and waterfall diagrams as explorable standalone HTML with dark/light themes, motion and image/SVG/WebM export. Accept requirements or Mermaid; inspect repository evidence for code-backed diagrams. Use when visualizing systems, API calls, pipelines, schemas, histories, timings, or everyday steps, parts, relationships and states. Also turn an answer into a one-page explainer, with the conclusion first, structured panels, native diagrams and charts, when the user asks for a page, an explainer or an answer to share (做成一页, 用页面讲), or proactively when the user's rules opt in with an [archify explainer: ...] line. Not for dashboards.

FileKindSize
LICENSEother11.1 KB
LICENSE-MITother1.1 KB
NOTICEother1.3 KB
SKILL.mdskill md18.4 KB
THIRD_PARTY_NOTICES.mdmarkdown5.5 KB
assets/JetBrainsMono-OFL.txtmarkdown4.3 KB
assets/template.htmlother768.9 KB
bin/archify.mjsscript282.0 KB
bin/delivery-update.mjsscript3.6 KB
bin/finalize.mjsscript48.9 KB
bin/open-artifact.mjsscript4.0 KB
bin/preview.mjsscript35.8 KB
bin/recover-output.mjsscript1.3 KB
bin/visual-check.mjsscript117.7 KB
brand-marks/README.mdmarkdown1.4 KB
brand-marks/catalog.jsonconfig13.8 KB
delta/architecture-delta.mjsscript77.2 KB
examples/agent-run.lifecycle.jsonconfig3.2 KB
examples/agent-tool-call.workflow.jsonconfig4.8 KB
examples/archify-dev-activity.timeline.jsonconfig4.4 KB
examples/archify-repository.tree.jsonconfig4.3 KB
examples/async-job-roundtrip.sequence.jsonconfig3.7 KB
examples/brand-aware-delivery.architecture.jsonconfig2.7 KB
examples/cache-miss-request.sequence.jsonconfig3.7 KB
examples/checkout-platform.base.architecture.jsonconfig2.2 KB
examples/checkout-platform.head.architecture.jsonconfig2.4 KB
examples/checkout-request.waterfall.jsonconfig1.2 KB
examples/class-payment-processors-rendered.htmlother854.5 KB
examples/class-payments-rendered.htmlother821.1 KB
examples/dataflow-product-analytics.htmlother824.1 KB
examples/delivery.explainer.jsonconfig4.5 KB
examples/deployment-release.lifecycle.jsonconfig4.1 KB
examples/erd-orders-rendered.htmlother841.1 KB
examples/event-stream.dataflow.jsonconfig4.7 KB
examples/example-rebuild.waterfall.jsonconfig4.5 KB
examples/holiday-planning.workflow.jsonconfig2.9 KB
examples/incident-response.workflow.jsonconfig4.6 KB
examples/lifecycle-agent-run.htmlother827.8 KB
examples/locales/de.jsonconfig27.8 KB
examples/locales/fr.jsonconfig28.6 KB
examples/locales/fr.partial.jsonconfig959 B
examples/locales/it.jsonconfig28.1 KB
examples/locales/ja.jsonconfig31.7 KB
examples/locales/pt.jsonconfig27.8 KB
examples/locales/ru.jsonconfig36.1 KB
examples/orders.erd.jsonconfig7.1 KB
examples/payment-incident.timeline.jsonconfig1.4 KB
examples/payment-platform.tree.jsonconfig1.2 KB
examples/payment-processors.class.jsonconfig7.1 KB
examples/payments.class.jsonconfig2.8 KB
examples/product-analytics.dataflow.jsonconfig4.9 KB
examples/production-deployment.architecture.jsonconfig4.6 KB
examples/release-delivery.workflow.jsonconfig4.4 KB
examples/sequence-cache-miss-request.htmlother821.8 KB
examples/subscription-billing-rendered.htmlother863.5 KB
examples/subscription-billing.erd.jsonconfig11.5 KB
examples/timeline-archify-dev-activity-rendered.htmlother846.2 KB
examples/timeline-payment-incident-rendered.htmlother814.5 KB
examples/tree-archify-repository-rendered.htmlother856.8 KB
examples/tree-payment-platform-rendered.htmlother820.0 KB
examples/waterfall-checkout-request-rendered.htmlother813.9 KB
examples/waterfall-example-rebuild-rendered.htmlother843.0 KB
examples/web-app-rendered.htmlother826.4 KB
examples/web-app.architecture.jsonconfig3.1 KB
examples/workflow-agent-tool-call-rendered.htmlother831.3 KB
explainer/browser-check.mjsscript30.0 KB
explainer/charts.mjsscript5.9 KB
explainer/check.mjsscript14.5 KB
explainer/diagrams.mjsscript37.8 KB
explainer/diff.mjsscript8.3 KB
explainer/inline.mjsscript8.5 KB
explainer/layout.mjsscript2.5 KB
explainer/page-bundle.mjsscript1.1 KB
explainer/parse.mjsscript26.6 KB
explainer/patch.mjsscript11.8 KB
explainer/prepare.mjsscript9.6 KB
explainer/reader.cssother46.1 KB
explainer/reader.jsscript50.5 KB
explainer/render.mjsscript33.2 KB
explainer/revision.mjsscript1.9 KB
explainer/sources.mjsscript20.4 KB
explainer/validate.mjsscript14.2 KB
explainer/writing.mjsscript11.1 KB
locales/README.mdmarkdown2.2 KB
locales/ar.jsonconfig33.0 KB
locales/en.jsonconfig26.7 KB
locales/es.jsonconfig28.8 KB
locales/ko.jsonconfig30.1 KB
locales/manifest.jsonconfig293 B
locales/zh-CN.jsonconfig26.4 KB
locales/zh-TW.jsonconfig26.5 KB
migrations/workflow-v2.mjsscript9.0 KB
package.jsonmanifest400 B
recipes/scenarios.mjsscript40.5 KB
references/architecture-layout-repair.mdmarkdown4.3 KB
references/authoring-contract.mdmarkdown41.7 KB
references/authoring-defaults.mdmarkdown12.6 KB
references/brand-marks.mdmarkdown5.6 KB
references/delivery-contract.mdmarkdown48.7 KB
references/explainer-authoring.mdmarkdown18.5 KB
references/repository-authoring.mdmarkdown7.8 KB
references/update-awareness.mdmarkdown1.9 KB
references/viewer-runtime.mdmarkdown5.6 KB
renderers/architecture/grid.mjsscript2.0 KB
renderers/architecture/labels.mjsscript155 B
renderers/architecture/render-architecture.mjsscript57.2 KB
renderers/architecture/routing.mjsscript72.7 KB
renderers/class/README.mdmarkdown6.6 KB
renderers/class/render-class.mjsscript52.3 KB
renderers/dataflow/README.mdmarkdown9.0 KB
renderers/dataflow/dataflow-compiler.mjsscript89.1 KB
renderers/dataflow/joint-label-routing.mjsscript10.6 KB
renderers/dataflow/label-capacity.mjsscript4.3 KB
renderers/dataflow/render-dataflow.mjsscript960 B
renderers/erd/README.mdmarkdown14.2 KB
renderers/erd/grid.mjsscript6.9 KB
renderers/erd/render-erd.mjsscript78.6 KB
renderers/explainer/render-explainer.mjsscript3.2 KB
renderers/lifecycle/README.mdmarkdown6.0 KB
renderers/lifecycle/render-lifecycle.mjsscript59.9 KB
renderers/sequence/README.mdmarkdown8.5 KB
renderers/sequence/render-sequence.mjsscript55.8 KB
renderers/shared/atomic-output.mjsscript68.7 KB
renderers/shared/automatic-labels.mjsscript14.4 KB
renderers/shared/brand-marks.mjsscript28.3 KB
renderers/shared/cli.mjsscript18.6 KB
renderers/shared/desktop-readability.mjsscript6.8 KB
renderers/shared/diagnostics.mjsbinary8.1 KB
renderers/shared/engineering-profiles.mjsscript6.8 KB
renderers/shared/generated-brand-marks.mjsscript159.8 KB
renderers/shared/generated-validators.mjsscript996.1 KB
renderers/shared/geometry.mjsscript87.8 KB
renderers/shared/i18n.mjsscript13.5 KB
renderers/shared/layout-report.mjsscript1.5 KB
renderers/shared/legend.mjsscript9.0 KB
renderers/shared/node-card-style.mjsscript2.4 KB
renderers/shared/output-path.mjsscript18.6 KB
renderers/shared/owned-temp-directory.mjsscript3.1 KB
renderers/shared/path-semantics.mjsscript31.6 KB
renderers/shared/portable-path.mjsscript12.2 KB
renderers/shared/repository-evidence.mjsscript19.9 KB
renderers/shared/repository-location.mjsscript4.2 KB
renderers/shared/route-quality.mjsscript26.3 KB
renderers/shared/sidecar-path.mjsscript1.2 KB
renderers/shared/software-notices.mjsscript506 B
renderers/shared/spatial-grid.mjsscript2.4 KB
renderers/shared/svg-path-analysis.mjsscript5.3 KB
renderers/shared/text-fit.mjsscript5.1 KB
renderers/shared/utils.mjsscript12.7 KB
renderers/shared/validator.mjsscript3.3 KB
renderers/timeline/README.mdmarkdown4.0 KB
renderers/timeline/render-timeline.mjsscript29.6 KB
renderers/tree/README.mdmarkdown4.2 KB
renderers/tree/render-tree.mjsscript29.9 KB
renderers/waterfall/README.mdmarkdown3.4 KB
renderers/waterfall/render-waterfall.mjsscript22.5 KB
renderers/workflow/README.mdmarkdown17.3 KB
renderers/workflow/render-workflow.mjsscript1.6 KB
renderers/workflow/workflow-compiler.mjsscript244.3 KB
renderers/workflow/workflow-migration-geometry.mjsscript6.2 KB
renderers/workflow/workflow-placement-repair.mjsscript4.7 KB
schemas/README.mdmarkdown14.7 KB
schemas/architecture.schema.jsonconfig5.9 KB
schemas/class.schema.jsonconfig7.9 KB
schemas/common.schema.jsonconfig5.6 KB
schemas/dataflow.schema.jsonconfig6.2 KB
schemas/erd.schema.jsonconfig9.1 KB
schemas/explainer.schema.jsonconfig18.8 KB
schemas/lifecycle.schema.jsonconfig5.2 KB
schemas/sequence.schema.jsonconfig6.0 KB
schemas/timeline.schema.jsonconfig3.9 KB
schemas/tree.schema.jsonconfig3.1 KB
schemas/waterfall.schema.jsonconfig3.4 KB
schemas/workflow.schema.jsonconfig9.9 KB
scripts/check-render-output.mjsscript66.9 KB
scripts/check-update.mjsscript57.9 KB
scripts/delivery-update-child.mjsscript1.3 KB
scripts/render-examples.mjsscript2.0 KB
scripts/update-contract.mjsscript6.7 KB
skill-release.jsonconfig260 B

renderers/shared/i18n.mjs

View on GitHub
import fs from 'node:fs';
import { fileURLToPath } from 'node:url';

export const DEFAULT_LOCALE = 'en';

const ESCAPE_MAP = { '&': '&amp;', '<': '&lt;', '>': '&gt;', '"': '&quot;', "'": '&#39;' };

export function escapeHtml(value) {
  return String(value ?? '').replace(/[&<>"']/g, (character) => ESCAPE_MAP[character]);
}

// Bundled catalogs are package data, not renderer code. locales/manifest.json
// enrolls the catalogs meta.locale selects automatically; only listed files
// are read, relative to this installed package and never from the working
// directory, home, environment, or network. Adding a language changes data
// only. en.json defines the canonical keys and the final fallback.
const LOCALES_DIR = new URL('../../locales/', import.meta.url);
// Mirrors common.schema.json#/$defs/locale.
const LOCALE_TAG = /^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$/;
const CATALOG_FILE = /^[A-Za-z0-9][A-Za-z0-9._-]*\.json$/;

function readLocaleData(file) {
  try {
    return JSON.parse(fs.readFileSync(fileURLToPath(new URL(file, LOCALES_DIR)), 'utf8'));
  } catch (error) {
    throw new Error(`Archify locale data ${JSON.stringify(file)} could not be loaded: ${error.message}`);
  }
}

function loadManifest() {
  const catalogs = readLocaleData('manifest.json')?.catalogs;
  if (!Array.isArray(catalogs)) throw new Error('Archify locale manifest must list catalogs');
  const byKey = new Map();
  for (const entry of catalogs) {
    const { locale, file } = entry || {};
    if (typeof locale !== 'string' || locale.length > 35 || !LOCALE_TAG.test(locale)) {
      throw new Error(`Archify locale manifest has an invalid locale tag ${JSON.stringify(locale)}`);
    }
    if (typeof file !== 'string' || !CATALOG_FILE.test(file)) {
      throw new Error(`Archify locale manifest has an invalid catalog file for ${locale}`);
    }
    // Tags match case-insensitively, so two entries differing only in case
    // would make selection ambiguous.
    const key = locale.toLowerCase();
    if (byKey.has(key)) throw new Error(`Archify locale manifest lists ${locale} more than once`);
    byKey.set(key, { locale, file });
  }
  if (byKey.get(DEFAULT_LOCALE)?.locale !== DEFAULT_LOCALE) {
    throw new Error(`Archify locale manifest must enroll the ${DEFAULT_LOCALE} source catalog`);
  }
  return byKey;
}

const MANIFEST = loadManifest();

export const SUPPORTED_LOCALES = Object.freeze([...MANIFEST.values()].map(({ locale }) => locale));

const EN = Object.freeze(readLocaleData(MANIFEST.get(DEFAULT_LOCALE).file));
for (const [key, message] of Object.entries(EN)) {
  if (typeof message !== 'string' || message.length === 0) {
    throw new Error(`Archify source message ${JSON.stringify(key)} must be a non-empty string`);
  }
}

const CANONICAL_KEYS = Object.keys(EN);
const PLACEHOLDER_PATTERN = /\{([a-zA-Z0-9_]+)\}/g;

function extractPlaceholders(message) {
  return new Set([...String(message).matchAll(PLACEHOLDER_PATTERN)].map((match) => match[1]));
}

const CANONICAL_PLACEHOLDERS = Object.fromEntries(
  CANONICAL_KEYS.map((key) => [key, extractPlaceholders(EN[key])]),
);

function placeholdersMatch(expected, actual) {
  if (expected.size !== actual.size) return false;
  for (const token of expected) if (!actual.has(token)) return false;
  return true;
}

// Splits translation data into the entries that can replace a canonical
// message and the ones that cannot. Rejected entries never replace a valid
// lower-priority message.
function classifyTranslations(translations) {
  const supplied = Object.keys(translations || {});
  const usable = new Map();
  const unknownKeys = [];
  const placeholderMismatches = [];
  for (const key of supplied) {
    if (!Object.hasOwn(CANONICAL_PLACEHOLDERS, key)) {
      unknownKeys.push(key);
      continue;
    }
    const value = translations[key];
    const expected = [...CANONICAL_PLACEHOLDERS[key]].sort();
    if (typeof value !== 'string' || value.length === 0) {
      placeholderMismatches.push({ key, expected, actual: null });
      continue;
    }
    const actual = extractPlaceholders(value);
    if (placeholdersMatch(CANONICAL_PLACEHOLDERS[key], actual)) {
      usable.set(key, value);
    } else {
      placeholderMismatches.push({ key, expected, actual: [...actual].sort() });
    }
  }
  return { supplied, usable, unknownKeys, placeholderMismatches };
}

// Validates caller-supplied translation data against the canonical (English)
// message-key set. Pure and side-effect free; coverage here describes only the
// supplied data. resolveCatalog() reports the final resolved coverage.
export function validateTranslations(translations = {}) {
  const { usable, unknownKeys, placeholderMismatches } = classifyTranslations(translations);
  return {
    totalKeys: CANONICAL_KEYS.length,
    coveredKeys: usable.size,
    coverage: CANONICAL_KEYS.length ? usable.size / CANONICAL_KEYS.length : 1,
    missingKeys: CANONICAL_KEYS.filter((key) => !Object.hasOwn(translations || {}, key)),
    unknownKeys,
    placeholderMismatches,
  };
}

export function bundledLocaleFor(locale) {
  if (typeof locale !== 'string') return null;
  return MANIFEST.get(locale.toLowerCase())?.locale || null;
}

function isEnglishTag(locale) {
  const key = locale.toLowerCase();
  return key === DEFAULT_LOCALE || key.startsWith(`${DEFAULT_LOCALE}-`);
}

// Bundled catalogs load on first use and stay immutable; a diagram's
// overrides are layered onto a copy.
const BUNDLED_CATALOGS = new Map([[DEFAULT_LOCALE, { usable: new Map(Object.entries(EN)), messages: EN }]]);

function bundledCatalog(locale) {
  if (!BUNDLED_CATALOGS.has(locale)) {
    const { usable } = classifyTranslations(readLocaleData(MANIFEST.get(locale.toLowerCase()).file));
    const messages = Object.freeze(Object.fromEntries(
      CANONICAL_KEYS.map((key) => [key, usable.get(key) ?? EN[key]]),
    ));
    BUNDLED_CATALOGS.set(locale, { usable, messages });
  }
  return BUNDLED_CATALOGS.get(locale);
}

// Resolves each canonical message as: valid meta.translations value →
// selected bundled-catalog value → English source. Pure; returns the resolved
// catalog with a report that separates rejected overrides from real English
// fallback gaps. Omitted or empty translations mean no override. A tag with
// neither a bundled catalog nor a usable override falls back to English UI
// and language metadata.
export function resolveCatalog(locale, translations = undefined) {
  const override = classifyTranslations(translations);
  const bundledLocale = bundledLocaleFor(locale);
  const fallback = Boolean(locale) && !bundledLocale && override.usable.size === 0;
  const resolvedLocale = !locale || fallback ? DEFAULT_LOCALE : bundledLocale || locale;
  const bundled = bundledLocale ? bundledCatalog(bundledLocale) : null;
  const english = isEnglishTag(resolvedLocale);
  const messages = {};
  const fallbackKeys = [];
  for (const key of CANONICAL_KEYS) {
    if (override.usable.has(key)) {
      messages[key] = override.usable.get(key);
    } else if (bundled?.usable.has(key)) {
      messages[key] = bundled.usable.get(key);
    } else {
      messages[key] = EN[key];
      if (!english) fallbackKeys.push(key);
    }
  }
  const translatedKeys = english ? CANONICAL_KEYS.length : CANONICAL_KEYS.length - fallbackKeys.length;
  return {
    messages: Object.freeze(messages),
    report: {
      locale: locale || null,
      resolvedLocale,
      bundledLocale,
      fallback,
      totalKeys: CANONICAL_KEYS.length,
      translatedKeys,
      coverage: CANONICAL_KEYS.length ? translatedKeys / CANONICAL_KEYS.length : 1,
      fallbackKeys,
      override: {
        suppliedKeys: override.supplied.length,
        appliedKeys: override.usable.size,
        unknownKeys: override.unknownKeys,
        placeholderMismatches: override.placeholderMismatches,
      },
    },
  };
}

// Per-document catalogs installed by registerLocale(). Tags are
// case-insensitive, so the key is lowercased: renderers may pass the authored
// meta.locale (zh-cn) or its resolved tag (zh-CN) and reach the same document
// catalog. They never mutate a bundled catalog.
const DOCUMENT_CATALOGS = new Map();

function documentKey(locale) {
  return typeof locale === 'string' ? locale.toLowerCase() : locale;
}

function catalogFor(locale) {
  const key = documentKey(locale);
  if (DOCUMENT_CATALOGS.has(key)) return DOCUMENT_CATALOGS.get(key);
  const bundledLocale = bundledLocaleFor(locale);
  return bundledLocale ? { locale: bundledLocale, messages: bundledCatalog(bundledLocale).messages } : null;
}

// Installs the resolved catalog for one authored locale and returns its
// report. Re-registering the same tag replaces the previous document's
// overrides; a fallback clears them.
export function registerLocale(locale, translations = undefined) {
  const { messages, report } = resolveCatalog(locale, translations);
  if (report.fallback || !locale) {
    DOCUMENT_CATALOGS.delete(documentKey(locale));
  } else {
    DOCUMENT_CATALOGS.set(documentKey(locale), { locale: report.resolvedLocale, messages });
  }
  return report;
}

// Agent-facing warnings for one document's meta.locale/meta.translations.
// Pure, so the renderer and the CLI receipts (validate/deliver/finalize)
// report the same diagnostics from the same input.
export function localeDiagnostics(diagramType, meta) {
  const locale = meta?.locale;
  if (!locale) return [];
  const report = resolveCatalog(locale, meta.translations).report;
  const diagnostics = [];
  const { unknownKeys, placeholderMismatches, appliedKeys } = report.override;
  const rejected = unknownKeys.length + placeholderMismatches.length;
  if (rejected) {
    const kept = report.bundledLocale ? `bundled ${report.bundledLocale} message` : 'English message';
    diagnostics.push({
      code: 'i18n/invalid-translation',
      severity: 'warning',
      message: `meta.translations for locale ${JSON.stringify(locale)} has ${rejected} unusable ${rejected === 1 ? 'entry' : 'entries'} (${unknownKeys.length} unknown, ${placeholderMismatches.length} placeholder mismatch); each keeps its ${kept}.`,
      subject: { diagramType, path: '/meta/translations' },
      evidence: {
        locale,
        unknownKeys: unknownKeys.slice(0, 10),
        unknownKeysTotal: unknownKeys.length,
        placeholderMismatches: placeholderMismatches.slice(0, 10),
        placeholderMismatchesTotal: placeholderMismatches.length,
      },
      supportedFixes: ['Remove each unknown key or rename it to a canonical message key.', 'Use exactly the {placeholders} of the English source string for each mismatched key.'],
    });
  }
  if (report.fallback) {
    diagnostics.push({
      code: 'i18n/locale-fallback',
      severity: 'warning',
      message: `meta.locale ${JSON.stringify(locale)} has no bundled catalog and no usable meta.translations; the Viewer chrome and <html lang> fall back to English.`,
      subject: { diagramType, path: '/meta/locale' },
      evidence: { locale, bundledLocales: SUPPORTED_LOCALES },
      supportedFixes: ['Supply meta.translations for this locale.', `Use a bundled locale: ${SUPPORTED_LOCALES.join(', ')}.`],
    });
  } else if (report.fallbackKeys.length) {
    const source = [
      report.bundledLocale && `the bundled ${report.bundledLocale} catalog`,
      appliedKeys && `${appliedKeys} meta.translations ${appliedKeys === 1 ? 'entry' : 'entries'}`,
    ].filter(Boolean).join(' and ');
    const missingKeys = report.fallbackKeys.slice(0, 10);
    diagnostics.push({
      code: 'i18n/translation-coverage',
      severity: 'warning',
      message: `meta.locale ${JSON.stringify(locale)} resolves ${report.translatedKeys}/${report.totalKeys} renderer-owned messages (${Math.floor(report.coverage * 100)}%) from ${source}; ${report.fallbackKeys.length} fall back to English.`,
      subject: { diagramType, path: '/meta/translations' },
      evidence: {
        locale,
        resolvedLocale: report.resolvedLocale,
        bundledLocale: report.bundledLocale,
        translatedKeys: report.translatedKeys,
        totalKeys: report.totalKeys,
        appliedOverrideKeys: appliedKeys,
        missingKeys,
        missingKeysTotal: report.fallbackKeys.length,
        // English source for the listed gaps, so a caller can translate
        // exactly those keys without re-reading the whole catalog.
        englishSource: Object.fromEntries(missingKeys.map((key) => [key, EN[key]])),
      },
      supportedFixes: ['Add each missing key to meta.translations, translating its English source string and keeping its {placeholders}.'],
    });
  }
  return diagnostics;
}

export function resolveLocale(locale) {
  return catalogFor(locale)?.locale || DEFAULT_LOCALE;
}

export function formatMessage(template, values = {}) {
  return String(template).replace(/\{([a-zA-Z0-9_]+)\}/g, (match, key) => (
    Object.hasOwn(values, key) ? String(values[key]) : match
  ));
}

export function translateMessage(locale, key, values = {}) {
  const catalog = catalogFor(locale)?.messages || EN;
  if (!Object.hasOwn(catalog, key)) {
    throw new Error(`Missing Archify i18n message ${JSON.stringify(key)} for ${resolveLocale(locale)}`);
  }
  return formatMessage(catalog[key], values);
}

export function translateCount(locale, key, count, values = {}) {
  const suffix = count === 1 ? 'one' : 'other';
  return translateMessage(locale, `${key}.${suffix}`, { ...values, count });
}

export function viewerCatalog(locale) {
  const messages = catalogFor(locale)?.messages || EN;
  return Object.fromEntries(Object.entries(messages).filter(([key]) => key.startsWith('viewer.')));
}

export function localizeTemplate(template, locale) {
  return template.replace(/\{\{i18n:([a-zA-Z0-9_.-]+)\}\}/g, (_match, key) => escapeHtml(translateMessage(locale, key)));
}

export function catalogKeys() {
  return [...CANONICAL_KEYS];
}
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