LeoYeAI/agent-master-skills / skills/ai-task-hub
ai-task-hub
VerifiedAI 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.
| File | Kind | Size |
|---|---|---|
| .clawhub/origin.json | config | 143 B |
| SKILL.md | skill md | 4.7 KB |
| SKILL.zh-CN.md | markdown | 4.4 KB |
| _meta.json | config | 130 B |
| references/capabilities.json | config | 20.9 KB |
| references/openapi.json | config | 6.3 KB |
| scripts/agent-task-auth.mjs | script | 2.2 KB |
| scripts/attachment-normalize.mjs | script | 5.9 KB |
| scripts/base-url.mjs | script | 1.0 KB |
| scripts/skill.mjs | script | 18.7 KB |
| scripts/telemetry.mjs | script | 912 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();
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| 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: 198k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| 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: 194k | Updated | Claude CodeCodex | Verified | Install |