AgentSkillsCN

ticket-creator

当用户提出“创建工单”“创建 Linear 工单”“生成工单”“撰写工单”“创建问题”“提交 Bug”“创建功能工单”“撰写 Bug 报告”“我需要一个工单来……”“……中存在一个 Bug”“把这件事转为工单”“把这段内容写成工单”等请求,或希望为某个功能的落地而创建任意 Linear 问题时,均可使用此技能。

SKILL.md
--- frontmatter
name: ticket-creator
description: >-
  This skill should be used when the user asks to "create a ticket",
  "create a Linear ticket", "make a ticket", "write a ticket",
  "create an issue", "file a bug", "create a feature ticket",
  "write a bug report", "I need a ticket for...", "there's a bug in...",
  "turn this into a ticket", "write this up as a ticket",
  or wants to create any Linear issue for implementation.
version: 1.0.0
allowed_tools:
  - AskUserQuestion
  - Task
  - mcp__claude_ai_Linear__create_issue
  - mcp__claude_ai_Linear__list_issues
  - mcp__claude_ai_Linear__get_issue
  - mcp__claude_ai_Linear__list_teams

Ticket Creator

Create well-structured Linear tickets optimized for AI agent (Claude Code) implementation. Follow a pattern-first, template-driven workflow that ensures the implementing agent can plan and execute without making open-ended architectural decisions. Consult references/guidelines.md for detailed quality criteria and writing guidelines.

Core Principle: Pattern-First

The strongest predictor of ticket success is whether the implementing agent can copy-and-adapt from an existing pattern. Every ticket MUST reference an existing code pattern or explicitly flag it as a first-time pattern requiring extra specification.

AskUserQuestion Usage

Only invoke AskUserQuestion when the answer cannot be deduced from the current conversation context, the codebase, or prior responses. If the information is available or can be inferred, proceed without asking. This applies to all stages — classification, deduplication, information gathering, anti-pattern resolution, splitting, and confirmation.

Workflow

1. Gather Context & Classify

Extract as much information as possible from the current conversation before asking any questions. If work has been discussed, use that context to pre-fill ticket details.

Classify the ticket:

  • Normal (feature, improvement, refactor) → references/template-normal.md
  • Bug (error, broken behavior) → references/template-bug.md

Identify the domain from context or keywords:

DomainKeywords
UIpage, component, layout, frontend, table, form, modal, sidebar
Backendserver action, API, endpoint, database, schema, query, migration, job
Data-Engineharvester, actor, pipeline, scraper, PDF, Python, data-engine

If classification is ambiguous, use AskUserQuestion to clarify.

2. Check for Duplicates

Search Linear for existing similar tickets using list_issues with relevant search terms. If a matching ticket exists, surface it and ask whether to proceed or update the existing ticket.

3. Load Template & Gather Information

Load the appropriate template from references/. Gather missing required information conversationally, 1-2 questions at a time, in this priority order:

  1. What are we building/fixing and why? What's the scope?
  2. Is there an existing pattern to follow? (most critical)
  3. Technical details — types, contracts, file paths
  4. Side effects, integration points, permissions
  5. Acceptance criteria and verification hints

For bug tickets: if a Sentry issue ID or URL is available, use the Sentry MCP to auto-populate error details (see references/template-bug.md for integration details).

4. Pattern Discovery

Use Task with subagent_type Explore to search the codebase for:

  • Existing implementations to reference as patterns
  • Relevant Claude Code skills (scan .claude/ directories for SKILL.md files)

Include discovered patterns in the ticket's "Existing pattern to follow" field. Include discovered skills in the Implementation Toolkit section using the format: skills: [skill-name-1, skill-name-2]

5. Quality Gate

Run all anti-pattern checks from references/anti-patterns.md. Surface any warnings and resolve them with the user before proceeding.

Evaluate whether the ticket should be split (see Ticket Splitting below).

6. Draft & Confirm

Compile the ticket using the loaded template. Present a concise preview — title, summary, key fields, acceptance criteria — not the full ticket body.

Ask the user to confirm or request changes before creating.

7. Create in Linear

Create the ticket using create_issue with: team ("Sylla Tech"), title, description, priority. Only set assignee if the user specifies one.

If dependencies exist, use blockedBy or blocks fields. Link related tickets found during deduplication using relatedTo.

Share the ticket link with the user after creation.

Ticket Splitting

Multi-Category Split

If work spans multiple domains (e.g., UI + Backend + Data-Engine), create separate linked tickets — one per domain. Run stages 3-7 for each, carrying forward shared context (priority, description, related tickets). Cross-link tickets using relatedTo.

File-Based Split

If a ticket would modify more than 8 files, suggest splitting into smaller, focused tickets. Each split ticket should be independently implementable.

Title Conventions

TypeFormat
FeatureImplement [thing] for [purpose]
UI PageCreate [page name] page at [route]
UI ComponentAdd [component] to [location]
API/EndpointAdd [method] [endpoint] endpoint
RefactorRefactor [what] to [improvement]
BugFix [symptom] in [location]

Reference Files

FilePurpose
references/template-normal.mdTemplate for features, improvements, refactors (with conditional UI/Backend/Data-Engine sections)
references/template-bug.mdTemplate for bug fixes (with Sentry MCP integration)
references/anti-patterns.mdAnti-pattern detection rules to run before ticket creation
references/guidelines.mdQuality criteria, writing guidelines, and verification rules
references/layout-patterns.mdUI layout pattern decision table and component reference

Example Tickets

Consult these real ticket examples to calibrate structure and detail level:

ExampleDomainBased On
examples/backend-ticket.mdBackend (server action + API)S-1176
examples/bug-ticket.mdBug fix (root cause known)S-1222
examples/data-engine-ticket.mdData-engine harvesterS-1149
examples/ui-ticket.mdUI page creationS-1163

Quality Test

Before creating, verify: "Could the implementing agent create a complete plan from this ticket without making any open-ended architectural decisions?"

If the answer is no, identify what's ambiguous and ask for it. See references/guidelines.md for the full quality checklist.