writing-skills
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
sdk-api-serverUse SkyPilot's Python SDK, async SDK, API server lifecycle commands, request IDs, remote login, compatibility checks, and dashboard deployment guidance.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the user wants to drive SkyPilot programmatically or manage the API server: Python SDK equivalents of CLI workflows, async SDK usage, request IDs and sky.get(), sky.stream_and_get(), sky api start/stop/status/login/logout/info/logs/cancel, remote API server compatibility, dashboard access, API versioning, or API server deployment/debugging.
Do not use this sub-skill for detailed task YAML schema authoring, CLI cluster operations, managed jobs semantics, SkyServe service recipes, cloud credential setup, storage/provider troubleshooting, or repository contribution rules. Route those to the sibling sub-skills.
task-yaml sub-skill.cluster-operations, managed-jobs, or serving.infrastructure-storage.repo-development.RequestId, not the final result. Call sky.get(request_id) for structured results or sky.stream_and_get(request_id) when the user needs live logs and the result.sky.Task.from_yaml(...) or sky.Task(...) plus sky.Resources(...); keep YAML schema decisions in task-yaml and keep cluster/job/service behavior in the owning operational sub-skill.sky.api_login(endpoint=...) or sky api login -e ... before remote operations, and prefer SKYPILOT_API_SERVER_ENDPOINT only for temporary endpoint override in one environment.sky.api_info() and version-gated behavior; old servers may ignore newer fields or raise APINotSupportedError.--reuse-values and protect database/credential settings.import sky
task = sky.Task.from_yaml('task.yaml')
request_id = sky.launch(task, cluster_name='demo', dryrun=True)
job_id, handle = sky.get(request_id)
status_request_id = sky.status(['demo'])
clusters = sky.get(status_request_id)
For async code, import sky.client.sdk_async; convenience wrappers such as status() and launch() await the submitted request and return final results by default:
from sky.client import sdk_async as sky_async
clusters = await sky_async.status(['demo'])