Skip to content

lennoxsaint/Threadify-workflows / plugins/claude/skills/threadify-create-my-week

threadify-create-my-week

Verified

Prepare a seven-day Threads content blueprint and resumable daily drafts. Use for a week plan, with rolling Day 1 drafting by default or upfront drafts by choice.

scripts/engine/automation.mjs

View on GitHub
const assert = (value, message) => {
  if (!value) throw new Error(message);
};

export function validateAutomation(value, plug = false, draft = false) {
  if (value === null) return;
  assert(value && Object.getPrototypeOf(value) === Object.prototype, 'Invalid automation.');
  const allowed = plug
    ? ['content', 'trigger', 'delay_minutes', 'likes_threshold']
    : ['trigger', 'delay_minutes', 'likes_threshold'];
  assert(
    Object.keys(value).every((field) => allowed.includes(field)),
    'Unknown automation field.',
  );
  assert(['time', 'likes'].includes(value.trigger), 'Choose a time or likes trigger.');
  if (plug)
    assert(
      typeof value.content === 'string' &&
        (draft || value.content.trim().length > 0) &&
        [...value.content].length <= (draft ? 20000 : 500),
      'Auto Plug needs 1–500 characters.',
    );
  const field = value.trigger === 'time' ? 'delay_minutes' : 'likes_threshold';
  assert(
    draft ? Number.isFinite(value[field]) : Number.isSafeInteger(value[field]) && value[field] >= (field === 'delay_minutes' ? 5 : 1),
    'Invalid automation trigger value.',
  );
  assert(
    value[field === 'delay_minutes' ? 'likes_threshold' : 'delay_minutes'] === undefined,
    'Use only the selected trigger.',
  );
}

export function validateGlobalRepost(value) {
  assert(
    value && typeof value.known === 'boolean' && typeof value.enabled === 'boolean',
    'Explicit account-wide Auto Repost state required.',
  );
  assert(
    Object.keys(value).every((field) =>
      ['known', 'enabled', 'trigger', 'delay_minutes', 'likes_threshold'].includes(field),
    ),
    'Unknown account-wide Auto Repost field.',
  );
  if (value.enabled) {
    assert(
      value.known && ['time', 'likes'].includes(value.trigger),
      'Enabled account-wide Auto Repost requires known settings.',
    );
    const field = value.trigger === 'time' ? 'delay_minutes' : 'likes_threshold';
    assert(
      Number.isSafeInteger(value[field]) && value[field] >= (value.trigger === 'time' ? 5 : 1),
      'Invalid account-wide Auto Repost trigger.',
    );
  }
}
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