twill-cloud-coding-agent
Use Twill Cloud Coding Agent to manage Twill's public v1 API workflows. Create/list/update tasks, stream and cancel jobs, manage scheduled tasks, list repositories, and export Claude teleport sessions.
npx skills add twillai/skills --skill twill-cloud-coding-agentBefore / After 效果对比
0 组description 文档
name: twill-cloud-coding-agent description: Use Twill Cloud Coding Agent to manage Twill's public v1 API workflows. Create/list/update tasks, stream and cancel jobs, manage scheduled tasks, list repositories, and export Claude teleport sessions. compatibility: Requires access to https://twill.ai/api/v1, curl, and a TWILL_API_KEY environment variable. metadata: author: TwillAI version: "1.2.0" category: coding homepage: https://twill.ai api_base: https://twill.ai/api/v1
Twill Cloud Coding Agent
Use this skill to run Twill workflows through the public v1 API.
Setup
Set API key and optional base URL:
export TWILL_API_KEY="your_api_key"
export TWILL_BASE_URL="${TWILL_BASE_URL:-https://twill.ai}"
All API calls use:
Authorization: Bearer $TWILL_API_KEY
Use this helper to reduce repetition:
api() {
curl -sS "$@" -H "Authorization: Bearer $TWILL_API_KEY" -H "Content-Type: application/json"
}
Endpoint Coverage (Public v1)
GET /api/v1/auth/meGET /api/v1/repositoriesPOST /api/v1/tasksGET /api/v1/tasksGET /api/v1/tasks/:taskIdOrSlugPOST /api/v1/tasks/:taskIdOrSlug/messagesGET /api/v1/tasks/:taskIdOrSlug/jobsPOST /api/v1/tasks/:taskIdOrSlug/approve-planPOST /api/v1/tasks/:taskIdOrSlug/cancelPOST /api/v1/tasks/:taskIdOrSlug/archiveGET /api/v1/tasks/:taskIdOrSlug/teleport/claudeGET /api/v1/jobs/:jobId/logs/streamPOST /api/v1/jobs/:jobId/cancelGET /api/v1/scheduled-tasksPOST /api/v1/scheduled-tasksGET /api/v1/scheduled-tasks/:scheduledTaskIdPATCH /api/v1/scheduled-tasks/:scheduledTaskIdDELETE /api/v1/scheduled-tasks/:scheduledTaskIdPOST /api/v1/scheduled-tasks/:scheduledTaskId/pausePOST /api/v1/scheduled-tasks/:scheduledTaskId/resume
Auth and Discovery
Validate key and workspace context:
curl -sS "$TWILL_BASE_URL/api/v1/auth/me" -H "Authorization: Bearer $TWILL_API_KEY"
List available GitHub repositories for the workspace:
curl -sS "$TWILL_BASE_URL/api/v1/repositories" -H "Authorization: Bearer $TWILL_API_KEY"
Tasks
Create Task
api -X POST "$TWILL_BASE_URL/api/v1/tasks" -d '{"command":"Fix flaky tests in CI","repository":"owner/repo","userIntent":"SWE"}'
Required fields:
commandrepository(owner/repoor full GitHub URL)
Optional fields:
branchagent(provider or provider/model, for examplecodexorcodex/gpt-5.2)userIntent(SWE,PLAN,ASK,DEV_ENVIRONMENT) — defaults toSWEtitlefiles(array of{ filename, mediaType, url })
Always report task.url back to the user.
List Tasks
curl -sS "$TWILL_BASE_URL/api/v1/tasks?limit=20&cursor=BASE64_CURSOR" -H "Authorization: Bearer $TWILL_API_KEY"
Supports cursor pagination via limit and cursor.
Get Task Details
curl -sS "$TWILL_BASE_URL/api/v1/tasks/TASK_ID_OR_SLUG" -H "Authorization: Bearer $TWILL_API_KEY"
Returns task metadata plus latestJob including status, type, plan content, and plan outcome when available.
Send Follow-Up Message
api -X POST "$TWILL_BASE_URL/api/v1/tasks/TASK_ID_OR_SLUG/messages" -d '{"message":"Please prioritize login flow first","userIntent":"PLAN"}'
userIntent and files are optional.
List Task Jobs
curl -sS "$TWILL_BASE_URL/api/v1/tasks/TASK_ID_OR_SLUG/jobs?limit=30&cursor=BASE64_CURSOR" -H "Authorization: Bearer $TWILL_API_KEY"
Supports cursor pagination:
limitdefaults to30(max100)cursorfetches older pages- response includes
jobsandnextCursor
Approve Plan
Use when the latest plan job is completed and ready for approval.
api -X POST "$TWILL_BASE_URL/api/v1/tasks/TASK_ID_OR_SLUG/approve-plan" -d '{}'
Cancel Task
api -X POST "$TWILL_BASE_URL/api/v1/tasks/TASK_ID_OR_SLUG/cancel" -d '{}'
Archive Task
api -X POST "$TWILL_BASE_URL/api/v1/tasks/TASK_ID_OR_SLUG/archive" -d '{}'
Jobs
Stream Job Logs (SSE)
curl -N "$TWILL_BASE_URL/api/v1/jobs/JOB_ID/logs/stream" -H "Authorization: Bearer $TWILL_API_KEY" -H "Accept: text/event-stream"
Stream emits JSON payloads in data: lines and terminates with a complete event.
Cancel Job
api -X POST "$TWILL_BASE_URL/api/v1/jobs/JOB_ID/cancel" -d '{}'
Scheduled Tasks
List and Create
curl -sS "$TWILL_BASE_URL/api/v1/scheduled-tasks" -H "Authorization: Bearer $TWILL_API_KEY"
api -X POST "$TWILL_BASE_URL/api/v1/scheduled-tasks" -d '{
"title":"Daily triage",
"message":"Review urgent issues and open tasks",
"repositoryUrl":"https://github.com/org/repo",
"baseBranch":"main",
"cronExpression":"0 9 * * 1-5",
"timezone":"America/New_York",
"agentProviderId":"claude-code/sonnet"
}'
Required: title, message, repositoryUrl, baseBranch, cronExpression.
Optional: timezone (defaults to "UTC"), agentProviderId (provider/model override).
Read, Update, Delete
curl -sS "$TWILL_BASE_URL/api/v1/scheduled-tasks/SCHEDULED_TASK_ID" -H "Authorization: Bearer $TWILL_API_KEY"
api -X PATCH "$TWILL_BASE_URL/api/v1/scheduled-tasks/SCHEDULED_TASK_ID" -d '{
"message":"Updated instructions",
"cronExpression":"0 10 * * 1-5",
"agentProviderId":"codex/gpt-5.2"
}'
curl -sS -X DELETE "$TWILL_BASE_URL/api/v1/scheduled-tasks/SCHEDULED_TASK_ID" -H "Authorization: Bearer $TWILL_API_KEY"
Pause and Resume
api -X POST "$TWILL_BASE_URL/api/v1/scheduled-tasks/SCHEDULED_TASK_ID/pause" -d '{}'
api -X POST "$TWILL_BASE_URL/api/v1/scheduled-tasks/SCHEDULED_TASK_ID/resume" -d '{}'
Behavior
- Use
userIntent(SWE,PLAN,ASK,DEV_ENVIRONMENT) when calling API endpoints directly. - Create task, report
task.url, and only poll/stream logs when requested. - Ask for
TWILL_API_KEYif missing. - Do not print API keys or other secrets.
forum用户评价 (0)
发表评价
暂无评价,来写第一条吧
统计数据
用户评分
为此 Skill 评分