Python code for the skill execution. Must contain a run() function as the entry point.
The function signature will be automatically analyzed to extract parameter schema.
Use type annotations to specify parameter types and descriptions.
For secrets, use Secret("secret_name") to reference secrets configured via /secrets APIs.
For files, use Annotated[File, "description"] to accept file uploads.
For regular parameters, use Annotated[type, "description"].
Example:
from typing import Annotated
import requests
def run(api_key: Annotated[str, Secret("gmail_api_key")],
input_file: Annotated[File, "CSV file to process"],
to_email: Annotated[str, "Recipient email address"]) -> str:
# Implementation here
with open(input_file) as f:
data = f.read()
return "File processed and email sent successfully"
For generated skills: set to null to revert to the original generated code.