home / skills / arjenschwarz / agentic-coding / transit

transit skill

/claude/skills/transit

This skill routes Transit tickets to the correct workflow by extracting the T-[number], fetching task details, and handing off to the appropriate handler.

npx playbooks add skill arjenschwarz/agentic-coding --skill transit

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.3 KB
---
name: transit
description: Route Transit tickets to the appropriate workflow based on task type. Use when a user mentions a T-[number] ticket reference and wants to work on it. Fetches task details and dispatches to the correct skill (fix-bug, creating-spec, planning mode, or asks for clarification).
---

# Transit Ticket Router

Route Transit tickets to the appropriate workflow based on their task type.

## Workflow

### 1. Extract Ticket Reference

Parse the `T-[number]` reference from the user input. Extract the numeric display ID (e.g., `T-42` -> display ID `42`).

If no valid `T-[number]` reference is found, ask the user which ticket they want to work on.

### 2. Fetch Task Details

Query Transit for the task using `mcp__transit__query_tasks`. Match the task by its display ID from the results.

**If task is not found:** Stop and inform the user that the ticket could not be found in Transit. Do not proceed.

**If task status is `done` or `abandoned`:** Warn the user that the ticket is already marked as `{status}` and ask whether they still want to proceed. Stop if they decline.

### 3. Route by Task Type

Based on the task's `type` field, route to the appropriate workflow:

| Type | Action |
|------|--------|
| `bug` | Invoke `/fix-bug` and pass the ticket reference (`T-{number}`) and task context (name, description) |
| `feature` | Invoke `/starwave:creating-spec` and pass the ticket reference (`T-{number}`) and task context (name, description) |
| `research` | Enter planning mode with the research question from the task description |
| `chore` | Ask the user to clarify: is this closer to a bug fix or a feature? Route accordingly |
| `documentation` | Ask the user to clarify the scope, then route to the appropriate workflow |

### 4. Handoff

When routing to a skill, include:
- The Transit ticket reference (e.g., `T-42`)
- The task name and description from Transit as context
- Any relevant metadata from the task

The target skill is responsible for managing Transit status transitions from that point forward.

## Edge Cases

- **Ambiguous type:** If the task type doesn't clearly map to a workflow, ask a single clarifying question before routing.
- **Missing description:** If the task has no description, ask the user to provide context about what needs to be done.

Overview

This skill routes Transit tickets to the correct workflow based on the ticket reference and task type. It extracts T-[number] references, fetches task details from Transit, and dispatches the task to the appropriate downstream skill or asks clarifying questions when needed.

How this skill works

The skill parses the user's message to find a T-[number] display ID and queries Transit for the matching task. It checks task existence and status, warns if the task is done or abandoned, then routes by the task's type to the corresponding workflow while passing the ticket reference, name, description, and metadata.

When to use it

  • When a user mentions a Transit ticket like T-42 and wants to work on it.
  • When you need to determine whether a ticket is a bug, feature, research task, chore, or documentation item.
  • When you want to hand off a Transit ticket to the correct downstream skill with full context.
  • When task status needs to be checked before proceeding (done/abandoned).

Best practices

  • Always confirm the parsed display ID with the user if multiple T- references are present.
  • If Transit returns no matching task, inform the user and stop; do not guess.
  • If task status is done or abandoned, ask the user whether to continue before routing.
  • For ambiguous types or missing descriptions, ask one concise clarifying question and then route.
  • When handing off, include ticket reference, name, description, and relevant metadata.

Example use cases

  • User: 'Please work on T-42' — Parse T-42, fetch task, and route to fix-bug or creating-spec based on type.
  • User: 'I want to start research for T-128' — Enter planning mode using the research question from the description.
  • User: 'T-77 looks like a chore' — Ask whether it should be treated as a bug fix or feature, then route accordingly.
  • User: 'T-99 has no description' — Ask the user for context and then route once details are provided.

FAQ

What happens if no T-[number] is found in the user's message?

The skill asks the user which ticket they want to work on instead of proceeding.

How are tasks handled if their status is done or abandoned?

The skill warns the user that the ticket is marked done or abandoned and asks whether to continue; it stops if the user declines.