Skip to content

LeoYeAI/agent-master-skills / skills/ai-task-hub

ai-task-hub

Verified

AI task hub for image analysis, background removal, speech-to-text, text-to-speech, markdown conversion, and async execute/poll/presentation orchestration. Use when users need hosted AI outcomes while host runtime manages identity, credits, payment, and risk control.

FileKindSize
.clawhub/origin.jsonconfig143 B
SKILL.mdskill md4.7 KB
SKILL.zh-CN.mdmarkdown4.4 KB
_meta.jsonconfig130 B
references/capabilities.jsonconfig20.9 KB
references/openapi.jsonconfig6.3 KB
scripts/agent-task-auth.mjsscript2.2 KB
scripts/attachment-normalize.mjsscript5.9 KB
scripts/base-url.mjsscript1.0 KB
scripts/skill.mjsscript18.7 KB
scripts/telemetry.mjsscript912 B

scripts/agent-task-auth.mjs

View on GitHub
#!/usr/bin/env node

import { pathToFileURL } from 'node:url';
import { getDefaultBaseUrl, isHttpBaseUrl, normalizeBaseUrl } from './base-url.mjs';

const DEFAULT_BASE_URL = getDefaultBaseUrl();

export const AGENT_TASK_DEFAULT_BASE_URL = DEFAULT_BASE_URL;

export async function resolveAgentTaskAuth(params = {}) {
  const explicitToken = readToken(params.explicitAgentTaskToken);
  const envToken = readToken(process.env.AGENT_TASK_TOKEN);
  const agentTaskToken = explicitToken || envToken;

  if (!agentTaskToken) {
    throw createAuthError(
      401,
      'AUTH_UNAUTHORIZED',
      'agent task token is required (pass [agent_task_token] CLI arg or set AGENT_TASK_TOKEN)'
    );
  }

  return {
    baseUrl: normalizeBaseUrl(params.baseUrl),
    agentTaskToken,
    source: explicitToken ? 'explicit' : 'env'
  };
}

function readToken(value) {
  if (typeof value !== 'string') {
    return '';
  }
  return value.trim();
}

function createAuthError(status, code, message) {
  const error = new Error(message);
  error.status = status;
  error.code = code;
  return error;
}

function parseCliArgs(args) {
  if (args.length === 0) {
    return {
      explicitAgentTaskToken: '',
      baseUrl: DEFAULT_BASE_URL
    };
  }

  const first = args[0] ?? '';
  if (isHttpBaseUrl(first)) {
    return {
      explicitAgentTaskToken: '',
      baseUrl: first
    };
  }

  return {
    explicitAgentTaskToken: first,
    baseUrl: args[1] ?? DEFAULT_BASE_URL
  };
}

async function main() {
  try {
    const auth = await resolveAgentTaskAuth(parseCliArgs(process.argv.slice(2)));
    console.log(
      JSON.stringify({
        base_url: auth.baseUrl,
        source: auth.source,
        agent_task_token_available: Boolean(auth.agentTaskToken)
      })
    );
  } catch (error) {
    const status = Number.isFinite(error?.status) ? error.status : 500;
    const code = typeof error?.code === 'string' ? error.code : 'SYSTEM_INTERNAL_ERROR';
    const message = error instanceof Error ? error.message : String(error);
    process.stderr.write(`${JSON.stringify({ event: 'agent_task_auth_failed', status, code, message })}\n`);
    process.exit(1);
  }
}

if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
  await main();
}
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