AgentSkillsCN

add-to-backlog

从自由格式的输入中为Linear Backlog添加问题。当用户说“添加到待办事项”、“创建待办事项”、“跟踪此事”,或描述需要添加的任务、改进点或Bug时,可使用此功能。系统会将用户的创意、调查结果或对话背景转化为结构清晰的Backlog问题。支持一次性处理多项任务。

SKILL.md
--- frontmatter
name: add-to-backlog
description: Add issues to Linear Backlog from free-form input. Use when user says "add to backlog", "create backlog issues", "track this", or describes tasks/improvements/bugs to add. Interprets user's ideas, investigation findings, or conversation context into well-structured Backlog issues. Can process multiple items at once.
argument-hint: [description of what to add, or "from conversation", or "from investigation"]
allowed-tools: Read, Glob, Grep, Task, mcp__linear__list_issues, mcp__linear__get_issue, mcp__linear__create_issue, mcp__linear__list_issue_labels, mcp__linear__list_issue_statuses
disable-model-invocation: true

Add issues to Linear Backlog from user input. Interprets free-form descriptions into well-structured issues.

Purpose

  • Convert user's free-form ideas into structured Backlog issues
  • Parse multiple items from a single input
  • Reference conversation context or investigation findings
  • Write problem-focused descriptions (what, not how)
  • Include implementation hints for plan-backlog to use later

Input Modes

The skill supports three input modes based on $ARGUMENTS:

Mode 1: Direct Description

User provides task descriptions directly:

code
/add-to-backlog Add rate limiting to API routes, also need to handle image upload errors gracefully, and the barcode scanner fails on blurry images

Mode 2: From Conversation

User references the current conversation:

code
/add-to-backlog from conversation - add the three issues we discussed
/add-to-backlog add all the improvements mentioned above
/add-to-backlog track the bug we just found

Mode 3: From Investigation

User references findings from investigate skill:

code
/add-to-backlog from investigation findings
/add-to-backlog add the issues found by investigate

Workflow

  1. Parse input - Understand what to add based on $ARGUMENTS
  2. Identify items - Separate multiple items from the input
  3. Check existing Backlog - Avoid duplicates
  4. Draft issues - Write problem-focused descriptions
  5. Confirm with user - Show proposed issues before creating
  6. Create in Linear - Add to Backlog state

Issue Structure

Each issue should have:

Title

  • Clear, concise problem statement
  • Action-oriented: "Rate limiting missing on API routes", "Barcode scanner fails on blurry images"
  • NO solution in title

Description

Structure:

code
**Problem:**
[What is wrong or missing - 1-2 sentences]

**Context:**
[Where this occurs, affected files/areas - brief]

**Impact:**
[Why this matters - user impact, data quality, errors]

**Implementation Hints:** (optional)
[Suggestions for plan-backlog, patterns to follow, related code]

Labels

Map to Linear labels based on issue type:

Issue TypeLinear Label
Missing functionalityFeature
Broken behaviorBug
Better approach existsImprovement
Code quality issueTechnical Debt
Security concernSecurity
Slow/resource issuePerformance
Style/format issueConvention

Priority

Assess based on impact:

ImpactPriority
Data loss, security hole, production down1 (Urgent)
Incorrect data, broken feature2 (High)
Inconvenience, missing enhancement3 (Medium)
Minor polish, nice-to-have4 (Low)

Parsing Input

Direct Descriptions

Look for natural separators:

  • "also", "and also", "additionally"
  • Numbered lists: "1.", "2.", etc.
  • Bullet points: "-", "*"
  • Commas followed by action verbs
  • Complete sentences as separate items

Example:

code
"Add rate limiting, also handle upload errors, and fix the blurry barcode bug"

--> Three issues:

  1. Rate limiting missing on API routes
  2. Image upload error handling incomplete
  3. Barcode scanner fails on blurry images

Conversation References

When user says "from conversation" or similar:

  1. Review the conversation above
  2. Identify discussed problems, improvements, or bugs
  3. Extract actionable items

Investigation References

When user mentions investigation findings:

  1. Look for investigation output in conversation
  2. Extract issues, errors, or recommendations found
  3. Convert findings into actionable issues

Duplicate Detection

Before creating, check existing Backlog:

  1. Query mcp__linear__list_issues with team=Food Scanner, state=Backlog
  2. Compare proposed issues against existing titles/descriptions
  3. If similar issue exists:
    • Note as "Similar to FOO-XXX"
    • Ask user if they want to create anyway or skip

User Confirmation

Before creating issues, show the user what will be created:

code
I'll create the following Backlog issues:

1. **Rate limiting missing on API routes** (Security, High)
   No rate limiting on public API endpoints, vulnerable to abuse.
   Hint: Use Next.js middleware with upstash/ratelimit or similar

2. **Image upload error handling incomplete** (Bug, Medium)
   Upload failures show generic error, no retry or user guidance.
   Hint: Add specific error types in the upload handler

3. **Barcode scanner fails on blurry images** (Bug, High)
   Low-quality camera input causes scanner to return no results silently.
   Hint: Add image quality detection before scanning attempt

Similar existing issues found:
- FOO-12: "API security hardening" - might overlap with #1

Create these issues? (I'll skip duplicates unless you confirm)

Wait for user confirmation before proceeding.

Creating Issues

Use mcp__linear__create_issue for each confirmed issue:

code
team: "Food Scanner"
state: "Backlog"
title: "[Issue title]"
description: "**Problem:**\n[description]\n\n**Context:**\n[context]\n\n**Impact:**\n[impact]\n\n**Implementation Hints:**\n[hints]"
priority: [1|2|3|4]
labels: [Mapped label]

Writing Good Issues

DO:

  • Focus on the problem, not the solution
  • Include context about where/when the issue occurs
  • Explain impact to help prioritization
  • Add implementation hints for plan-backlog
  • Reference related files or code if known

DON'T:

  • Include step-by-step implementation
  • Write the solution in the description
  • Use vague language ("improve this", "fix the thing")
  • Create issues without clear problem statement

Good Example:

code
**Problem:**
API routes have no rate limiting, allowing unlimited requests from any client.

**Context:**
Affects all routes under app/api/. Public endpoints like /api/scan and /api/food are most vulnerable.

**Impact:**
Service can be overwhelmed by automated requests, causing downtime for all users.

**Implementation Hints:**
- Consider upstash/ratelimit or next-rate-limit
- See existing middleware pattern in middleware.ts
- Should return 429 with Retry-After header

Bad Example:

code
Add rate limiting. Use upstash ratelimit library. Create a middleware that checks IP address and limits to 100 requests per minute. Return 429 status code.

Error Handling

SituationAction
$ARGUMENTS emptyAsk user what to add
Can't parse itemsShow interpretation, ask for clarification
Linear unavailableStop, tell user to check Linear auth
All items are duplicatesReport existing issues, ask if user wants to create anyway
Conversation reference unclearList recent topics, ask which to add

Rules

  • Always confirm before creating - Show proposed issues first
  • Problem-focused - Describe what's wrong, not how to fix
  • Include hints - Help plan-backlog with implementation suggestions
  • Check duplicates - Avoid cluttering backlog
  • One problem per issue - Split combined issues

Termination

After creating issues, output:

code
Created X issues in Linear Backlog:

- FOO-123: [Title] (Label, Priority)
- FOO-124: [Title] (Label, Priority)
- FOO-125: [Title] (Label, Priority)

Skipped:
- [Description] - duplicate of FOO-12

Next steps:
- Review issues in Linear Backlog
- Use `plan-backlog` to create implementation plans
- Use `plan-backlog FOO-123` to plan a specific issue

Do not ask follow-up questions. Do not offer to plan or implement.