Activate a DuploCloud project context.
Follow these steps in order:
Step 1 — Read current state:
python3 ~/.duplocloud/bin/duplo_activate.py --check-stateCapture workspace and project from the JSON output. This makes no API call.
Step 2 — Workspace: resume or switch?
If workspace is not null in the Step 1 output: ask the user:
"You are currently working as <workspace.name>. Continue with this workspace? (y/n)"
If workspace is null: continue to Step 3.
Step 3 — List workspaces (also validates credentials):
python3 ~/.duplocloud/bin/duplo_activate.py --list-workspacesIf exit code is 3 (no auth or invalid token): tell the user:
"Your credentials file will open in VSCode. Fill in
base_urlandtoken, then save and close. If VSCode is not available, a terminal command will be shown instead."
Then run:
python3 ~/.duplocloud/bin/duplo_activate.py --edit-auth--list-workspaces.
--list-workspaces still returns exit 3: tell the user "Credentials still invalid — please re-check the values." and re-run --edit-auth./duplo:activate_project once they're done.If exit code is 0: show the numbered workspace list to the user. Write out each numbered item clearly in your response text so the user can read the full list without expanding tool output.
"Which workspace are you working as? (enter the number)"
Step 4 — Set workspace:
python3 ~/.duplocloud/bin/duplo_activate.py --set-workspace <N>(Replace <N> with the number the user provided, or 1 if auto-selected.)
After setting the workspace, the old project is cleared from state. Continue directly to Step 6 (always show project list after an workspace change).
Step 5 — Project: resume or switch? (only reached if workspace was NOT changed in this run)
If project is not null in the Step 1 output: ask the user:
"Active project: <project.name>. Continue with this project? (y/n)"
If project is null: continue to Step 6.
Step 5a — Sync local files (same project):
Check if local files exist:
.duplocloud/spec.md.duplocloud/plan.mdIf neither file exists: silently download both (proceed to Step 5b).
If one or both exist: ask the user:
"Local spec/plan files exist. Overwrite with the latest versions from the platform? (y/n)"
Step 5b — Download spec and plan:
python3 ~/.duplocloud/bin/duplo_ticket.py --get-spec.duplocloud/spec.md..duplocloud/spec.md unchanged (no platform content yet).python3 ~/.duplocloud/bin/duplo_ticket.py --get-plan.duplocloud/plan.md..duplocloud/plan.md unchanged.Tell the user which files were updated, then continue to Step 10.
Step 6 — List projects (filtered by workspace in state):
python3 ~/.duplocloud/bin/duplo_activate.py --listShow the numbered project list to the user. Write out each numbered item clearly in your response text so the user can read the full list without expanding tool output.
Step 7 — Ask user to select project:
"Which project would you like to activate? (enter the number)"
python3 ~/.duplocloud/bin/duplo_activate.py --select <N>(Replace <N> with the number the user provided.)
Step 8 — Show the confirmation output to the user.
Step 9 — Sync local files (new project — always overwrite):
python3 ~/.duplocloud/bin/duplo_ticket.py --get-spec.duplocloud/spec.md.python3 ~/.duplocloud/bin/duplo_ticket.py --get-plan.duplocloud/plan.md.Tell the user which files were written (or "no platform content yet" if both were empty). Continue to Step 10.
Step 10 — Show project health:
python3 ~/.duplocloud/bin/duplo_ticket.py --check-projectProject:
<project_name>
Artifact Status Spec Approved / Draft (local file exists) / Not started Plan Approved / Draft (local file exists) / Not started
Determine artifact status independently for each artifact:
Spec status:
action = "plan" or "none" → Approvedaction = "spec" and .duplocloud/spec.md exists → Draftaction = "spec" and .duplocloud/spec.md does not exist → Not startedPlan status:
action = "none" → Approvedaction != "none" and .duplocloud/plan.md exists → Draftaction != "none" and .duplocloud/plan.md does not exist → Not startedThen ask the user whether to proceed:
"spec" → ask: "Would you like to activate the spec ticket now? (y/n)"
activate_ticket skill inline (follow its steps from the beginning)."plan" → ask: "Spec is approved. Would you like to activate the plan ticket now? (y/n)"
activate_ticket skill inline (follow its steps from the beginning)."none" + has_execution_tasks = true → tell the user "Both spec and plan are approved. Execution tasks are ready." then ask: "Would you like to pick up an execution task now? (y/n)"
activate_ticket skill inline (follow its steps from the beginning, starting at Step 2b since has_execution_tasks is already known to be true)."none" + has_execution_tasks = false → tell the user "Both spec and plan are approved — waiting for the platform to generate execution tasks." and stop.0b53740
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.