Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Make functions v2/Sts-authoring
Reference · Make functions v2

Sts-authoring

Part of Make functions v2. Install the skill and your agent reads this page when it needs the depth.

STS authoring for Functions

Functions accepts a restricted TypeScript execution model. Ordinary TypeScript compilation alone does not prove STS compatibility. Check these rules before creating, publishing or inline testing content:

Conditional expressions

&&, ||, ?? and ternaries cannot hide conditional calls, awaits, assignments or increments, even when a call seems pure. A ternary selecting already-computed values is allowed.

// Rejected: test() executes conditionally.
if (input.date !== undefined && !datePattern.test(input.date)) {
  throw new Error('Invalid date');
}

// Supported structure (within main or a reachable named helper).
if (input.date !== undefined) { // @label Validate supplied date
  const validDate = datePattern.test(input.date);
  if (!validDate) { // @label Reject invalid date
    throw new Error('Invalid date');
  }
}

Likewise, compute Array.isArray(value) separately instead of placing it behind ||. Preserve evaluation semantics: use an explicit conditional when computing a value unconditionally would be unsafe.

Functions host restrictions

General STS supports imports; the Functions host rejects them. Do not import packages into Function source. Use direct make.endpoints.<app>.v<version>.<operation>({...}) calls with generated property identifiers. Do not use computed/bracket access or alias Endpoint functions. Supply one object literal containing the supported input and, when needed, connection fields. A connection is a literal label declared in the content's connections map, not a runtime expression or a credential. Declare each called Endpoint and its connection binding in the content. An Endpoint alias is display metadata, not a callable identifier.

Use an appropriate available STS validator locally, then check these host rules separately. Inline testing executes real code and can cause real Endpoint side effects; it is never a validation-only substitute.

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.