Open or create a helpdesk ticket linked to a specific execution task in the active project.
This skill delegates to skills/stage_tasks/SKILL.md.
Read and follow skills/stage_tasks/SKILL.md:
activate_project): Follow Steps 0–0b to select a workspace/project with execution stages, then continue.activate_project: The project is already active, so Step 0a (project selection) is skipped — go directly to Step 0b (load data).stage_tasks flow or stop.Always prefix active workspace, project, or ticket names with a 🟢 emoji.
Follow these steps in order.
Read .duplocloud/state.toon and .env.
project_id or workspace_id is absent: tell the user:
"No active project. Please run
/duplo:activate_projectfirst." Then stop.
Capture project_id, project_name, workspace_id, DUPLO_TOKEN, DUPLO_HELPDESK_URL.
Call duplo-helpdesk::Projects_get with id = project_id.
Extract execution.stages → stages.
Call duplo-helpdesk::Ticket_list with workspaceId = workspace_id.
From the returned tickets, build task_ticket_map keyed by metadata.taskId using only tickets where all of the following are true:
originContext.type is ProjectoriginContext.id equals project_idoriginContext.metadata.projectType equals plan_executionoriginContext.metadata.taskId is presentFor each mapped ticket, capture:
ticket_nameticket_titleticket_statusIf stages is empty or absent, tell the user:
"No execution stages found for 🟢 <project_name>. Please generate execution stages first using
/duplo:ai_planner." Then stop.
Count total tasks across all stages.
If total tasks > 10 — show stage list first:
Which stage would you like to work on?
1. <stage.title> — <stage.description> (<N> tasks)
2. ...Ask: "Which stage? (number)"
Capture selected stage as active_stage.
If total tasks ≤ 10 — show all tasks flat (skip to Step 3 using all tasks grouped by stage).
For each task in active_stage, look up an existing linked ticket in task_ticket_map using task.name.
Display with ticket status if found:
Tasks in <active_stage.title>:
1. <task.title> — 🟢 Ticket: <ticket_title> (<status>)
2. <task.title> — No ticket yet
...Ask: "Which task would you like to open a ticket for? (number)"
Capture selected task as active_task (with name, title, description) and any existing ticket_name if the task already has one.
If the task already has a linked ticket (ticket_name is present):
Tell the user:
"Task 🟢 <active_task.title> already has a ticket: <ticket_title> (<status>).
- Open this ticket
- Pick a different task"
active_ticket_name to the existing ticket name. Go to Step 6 (load past context).Call duplo-helpdesk::Workspaces_get_agents with id = workspace_id.
Show a numbered list of agent names (no IDs or endpoints):
Which agent should handle this task ticket?
1. <name>
2. ...Call duplo-helpdesk::Workspaces_get_personas with id = workspace_id (always fetch fresh from backend).
selected_persona_ids = [] and proceed."Auto-selecting persona 🟢 <name> — it's the only one available." Set
selected_persona_ids = [<that persona's id>]. Proceed.
Which personas should have access to this ticket? (enter comma-separated numbers, or press Enter to skip)
1. <name>
2. <name>
...selected_persona_ids.selected_persona_ids = [].HARD RULE: taskId MUST be inside originContext.metadata. Never place taskId as a top-level field. The ticket will NOT be linked to the task if the structure is wrong.
Call duplo-helpdesk::Ticket_create with workspaceId = workspace_id and body:
{
"title": "<active_task.title>",
"aiAgentId": "<selected agent id>",
"workspaceId": "<workspace_id>",
"origin": "api",
"ticketContextForAgent": {
"personaIds": ["<selected_persona_ids>"]
},
"originContext": {
"type": "Project",
"id": "<project_id>",
"subType": "execution",
"metadata": {
"taskId": "<active_task.name>",
"projectType": "plan_execution"
}
}
}Omit ticketContextForAgent entirely if selected_persona_ids is empty.
Capture the returned ticket name as active_ticket_name.
Tell the user:
"Ticket created for task 🟢 <active_task.title>."
Call duplo-helpdesk::Ticket_get_messages with workspaceId = workspace_id, ticketName = active_ticket_name.
Write .duplocloud/state.toon silently, preserving project_id, project_name, and workspace_id:
workspace_id: <workspace_id>
project_id: <project_id>
project_name: <project_name>
active_ticket_name: <active_ticket_name>HARD RULES — apply for the entire duration this ticket is active:
open state. Do NOT call Ticket_put_status automatically.duplo-helpdesk::Ticket_put_status with { "status": "inProgress" } before forwarding the message to the agent.duplo-helpdesk::Ticket_put_status with { "status": "closed", "disposition": "resolved" }. Remove active_ticket_name from state. Tell the user the ticket has been closed.Do NOT close the ticket automatically for any other reason. Only close when the user explicitly confirms they are done with the activity on this ticket.
Call duplo-helpdesk::Workspaces_get_agents with id = workspace_id.
Resolve the agent name from the ticket's aiAgentId.
Tell the user:
"Ticket 🟢 <ticket_title> is ready for task <active_task.title>. <agent name> will respond to your messages.
Task description: <active_task.description>"
The ticket is now active. All subsequent user messages are forwarded to the agent per the standard agent communication rules in CLAUDE.md.
duplocloud/duplo-claude-plugin
6a46510
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.