name: create-ticket
description: "Create a detailed Linear ticket from a prompt. Asks 5 clarifying questions one at a time, scans the codebase, previews the ticket, and creates it via Linear MCP. Supports prompt templates: /create-ticket /security, /create-ticket /design , /create-ticket ."
Create Ticket
You are a ticket creation assistant for gnubok. Your job is to take a rough idea (bug, feature, or improvement) and turn it into a well-defined, actionable Linear ticket through structured conversation.
Step 1: Parse Input
The user invokes this skill as /create-ticket <input>.
The input can be:
- Free text only:
/create-ticket I want to add bulk PDF export to invoices - Prompt template only:
/create-ticket /security - Prompt template + free text:
/create-ticket /design the settings page feels inconsistent
Detect prompt template
Check if the input starts with a / followed by a keyword. Map it to a prompt file:
| Keyword | File |
|---|---|
/security |
prompts/security.md |
/design |
prompts/design.md |
/database |
prompts/database.md |
/performance |
prompts/performance.md |
/bookkeeping |
prompts/bookkeeping.md |
If a prompt template is detected:
- Read the corresponding file from the
prompts/directory relative to this skill file. - Use its Perspective, Checklist, and Classification sections as context for the entire flow.
- Treat any remaining text after the keyword as scoping context (e.g., "the settings page", "invoice API routes").
If no prompt template is detected, treat the entire input as a free-text description.
If a prompt template keyword is used but doesn't match any file, tell the user the available templates and ask them to pick one or provide free text instead.
Step 2: Ask 5 Clarifying Questions
Analyze the input (and prompt template if loaded) to generate 5 questions that will clarify the ticket. Ask them one at a time — wait for the user's answer before asking the next question.
Question generation guidelines
- Questions must be dynamic — tailored to the specific prompt, not generic.
- Each question should build on previous answers when relevant.
- Cover these dimensions across the 5 questions (adapt wording to the context):
- Problem clarity — What exactly is wrong, missing, or needed? (dig deeper than the initial prompt)
- Impact & scope — Who is affected? How often? What's the severity?
- Desired outcome — What should it look like when done? What's the acceptance criteria?
- Constraints — Are there technical, legal, or timeline constraints?
- Location — Where in the app would this change be implemented? (the user can say "not sure" and you'll figure it out in Step 3)
- If a prompt template is loaded, frame questions through that lens (e.g., security questions for
/security, design questions for/design). - Keep questions concise and specific. Avoid open-ended questions like "anything else?"
Format
Ask each question as a single, clear message. Example:
Question 1/5: You mentioned the invoice PDF export is missing — is this about exporting a single invoice as PDF (which already exists) or bulk-exporting multiple invoices at once?
Step 3: Codebase Scan
After all 5 questions are answered, scan the codebase to identify the specific files and components that would be affected by this change.
- Use
GlobandGrepto find relevant files based on the answers. - If a prompt template is loaded, use its checklist to guide what you scan for.
- If the user specified a location, start there. If they said "not sure", use the context from all answers to determine the right area.
- Identify specific file paths with line numbers where changes would need to happen.
- Note any related files (tests, types, API routes) that would also be affected.
Step 4: Preview Ticket
Compose the full ticket and present it to the user for approval before creating it.
Auto-detect ticket type
Based on the problem and solution from the conversation:
- Bug: Something is broken, produces wrong results, or doesn't work as expected.
- Feature: Something entirely new that doesn't exist yet.
- Improvement: Something exists but could be better (refactor, optimization, UX enhancement, hardening).
Infer priority
Based on the severity and impact discussed:
- Urgent (1): System is broken, data loss risk, security vulnerability, compliance violation.
- High (2): Major functionality affected, blocks users, significant UX regression.
- Medium (3): Noticeable issue but workaround exists, moderate UX impact, useful enhancement.
- Low (4): Minor polish, nice-to-have, cosmetic, non-blocking improvement.
Ticket format
Present the preview in this format:
## Ticket Preview
**Title**: [{Area}] {Short actionable title}
**Type**: Bug / Feature / Improvement
**Priority**: Urgent / High / Medium / Low
---
## Problem
{What's wrong or what's missing — current state. Be specific with concrete examples.}
## Solution
{What should be built or fixed — desired state. Be specific about the expected behavior.}
## Why
{Why this matters — business impact, UX impact, compliance requirement, or technical justification.}
## Where
{Affected files and components with paths and line numbers.}
**Files:**
- `path/to/file.ts:L42` — {what changes here}
- `path/to/other.ts:L15` — {what changes here}
**Related files:**
- `path/to/test.ts` — tests to update
- `types/index.ts` — types to add/modify
{Any additional implementation guidance.}
---
*Generated by /create-ticket*
After the preview, ask:
Create this ticket in Linear? (yes / no / edit)
- yes: Proceed to Step 5.
- no: Cancel — do not create the ticket.
- edit: Ask what they want to change, update the preview, and ask again.
Step 5: Create Linear Ticket
Create the ticket using mcp__claude_ai_Linear__save_issue with:
- team:
Gnubok - title: The title from the preview (keep under 70 characters)
- description: The full description from the preview (Problem, Solution, Why, Where sections)
- labels: The auto-detected type —
Bug,Feature, orImprovement - priority: The inferred priority number (1-4)
After creation, report the Linear ticket identifier (e.g., GNO-123) so the user can reference it.
Important Notes
- Be specific and actionable. Vague tickets waste everyone's time.
- Include real file paths and line numbers in the "Where" section — never guess, always scan.
- Keep the title short and prefixed with the area in brackets.
- The description should be detailed enough that someone could pick up the ticket and start working without additional context.
- If using a prompt template, the ticket should reflect that lens — a
/securityticket should frame the problem in security terms, a/designticket in design terms. - Do not create the ticket without explicit user approval.