scf-worker

Automates asynchronous cloud task offloading to Tencent Cloud SCF.

2|1|Updated Nov 15, 2025
One-click install
npx skills add https://github.com/lpding888/aiygw4.0 --skill scf-worker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scf-worker
Source: https://github.com/lpding888/aiygw4.0/tree/main/skills/scf_worker_skill
Command: npx skills add https://github.com/lpding888/aiygw4.0 --skill scf-worker

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The SCF Worker skill unloads long-running, asynchronous processing from synchronous request paths by providing robust cloud function-based handling for COS uploads, callbacks, media processing, webhook forwarding, and backend bridging. It emphasizes security, reliability, and observability across distributed tasks.

Core Features & Use Cases

  • COS direct-upload signature generation with minimal permissions.
  • COS callback handling with signature verification and idempotent state persistence.
  • Asynchronous media tasks such as transcoding and thumbnail generation, decoupled from user requests.
  • Webhook forwarding with retry, idempotence, and dead-letter handling.
  • Backend bridging via REST/OpenAPI or queues to synchronize results.
  • Structured logs and metrics for success rate, retry rate, and latency.

Quick Start

Deploy and configure the SCF Worker to handle CMS-S-* task cards. Set environment variables for COS buckets/regions, temporary credentials, signatures expiry, and webhook secrets. Deploy the following SCF functions (media-sign, cos-callback, transcode, webhook-forward) and wire them to your triggers; monitor via logs and metrics.

Frequently Asked Questions about scf-worker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle asynchronous COS callbacks with signature verification in Tencent Cloud SCF?

To handle asynchronous COS callbacks in Tencent Cloud SCF, you need a function that verifies upload signatures and persists idempotent state. This ensures callbacks are processed securely without duplicate executions during retries.

What is the best way to offload high-latency media processing tasks from synchronous user requests?

Offloading high-latency media processing tasks involves decoupling transcoding and thumbnail generation from user requests using cloud functions. This asynchronous approach unblocks synchronous paths and allows background processing with structured logs for monitoring.

How do I implement exponential retry and dead-letter handling for webhook forwarding?

Implementing exponential retry and dead-letter handling for webhook forwarding requires configuring a cloud function to attempt delivery with increasing delays. Failed deliveries are routed to a dead-letter queue to prevent data loss and maintain system stability.

Does SCF support generating COS direct-upload signatures with minimal permissions?

Yes, SCF supports generating COS direct-upload signatures with minimal permissions. You can configure a dedicated cloud function to issue temporary credentials that restrict access strictly to the specified buckets and regions.

How do I monitor success rate and latency for backend bridging tasks in cloud functions?

Monitoring success rate and latency for backend bridging tasks requires implementing structured logs and metrics within your cloud functions. This provides observability into retry rates and execution times for REST/OpenAPI or queue synchronization results.

Why do I need idempotent processing for webhook forwarding in cloud functions?

Idempotent processing for webhook forwarding is necessary because network timeouts can trigger duplicate webhook deliveries. By persisting state, your cloud function recognizes and safely ignores repeated requests, preventing duplicate backend updates.