AgentSkillsCN

linear

运用结构化模板,高效创建并管理 Linear 问题。当用户输入 /linear 时,可使用此技能。

SKILL.md
--- frontmatter
name: linear
description: Create and manage Linear issues using structured templates. Use when user says /linear.
user-invocable: true
allowed-tools:
  - Read
  - Write
  - Grep
  - Glob
  - AskUserQuestion
  - mcp__linear-server__create_issue
  - mcp__linear-server__update_issue
  - mcp__linear-server__get_issue
  - mcp__linear-server__list_issues
  - mcp__linear-server__list_cycles
  - mcp__linear-server__list_teams
  - mcp__linear-server__list_projects
  - mcp__linear-server__list_issue_labels
  - mcp__linear-server__list_issue_statuses

Linear

Create and manage Linear issues using structured templates.

Overview

This skill handles Linear issue management:

  • Creates issues using configurable templates (default, bug, feature)
  • Converts plans/reports into properly formatted Linear issues
  • Supports template mapping to projects and topics
  • Supports creating issues in backlog or specific cycles

Modes

ModeTriggerPurpose
configure/linear configureInitial setup - discover workspace and configure templates
learn/linear learnUpdate cache with new workspace data
template/linear template <action>Manage issue templates
create/linearCreate a new issue (default)
update/linear update <id>Update an existing issue

Configure Mode

Run /linear configure during initial setup to discover and cache your Linear workspace metadata:

code
/linear configure

This caches:

  • Teams - IDs, names, keys
  • Users - IDs, names, emails (for assignments)
  • Projects - Per-team project list
  • Labels - Per-team label list with colors
  • Cycles - Cycle numbers and IDs (not "current"/"next" which are dynamic)
  • Templates - Issue templates (default, bug, feature) with sections
  • Template Mappings - Topic/project to template associations

During configuration, you'll be asked to:

  1. Approve or customize templates - Use defaults or modify sections
  2. Link templates to projects/topics - e.g., "bug" topic → Bug Report template

Cache is stored in .claude/linear-cache.yaml and used for faster lookups.

When to run:

  • First time using the skill (during framework setup)
  • After framework updates
  • When you want to change template configuration

Learn Mode

Run /linear learn to update the cache with new workspace data:

code
/linear learn

When to run:

  • After team structure changes (new labels, projects, users)
  • If you see "not found" errors during issue creation
  • When new cycles start
  • Periodically to keep cache fresh

What it does:

  1. Fetches current workspace data from Linear API
  2. Compares with existing cache
  3. Reports changes (new labels, projects, etc.)
  4. Updates .claude/linear-cache.yaml
  5. Preserves templates and mappings (not overwritten)

Template Mode

Manage issue templates with /linear template <action>:

ActionCommandDescription
list/linear template listShow all templates and mappings
add/linear template add <name>Create a new template
edit/linear template edit <name>Modify template sections
remove/linear template remove <name>Delete a template (except 'default')
map/linear template map <template> <target>Link template to project/topic
default/linear template default <name>Set the default template

Template Mapping Examples

bash
# Map bug template to 'bug' topic
/linear template map bug topic:bug

# Map technical template to 'Backend' project
/linear template map technical project:Backend

# Set 'feature' as default template
/linear template default feature

Configuration

Config Location

Config path depends on how the plugin was installed:

Plugin ScopeConfig FileGit
project.claude/skills/linear.yamlCommitted (shared)
local.claude/skills/linear.local.yamlIgnored (personal)
user.claude/skills/linear.local.yamlIgnored (personal)

Precedence when reading (first found wins):

  1. .claude/skills/linear.local.yaml
  2. .claude/skills/linear.yaml
  3. Skill defaults

Cache Location

The cache is always stored at .claude/linear-cache.yaml (per-project).

Optional Settings

VariableDescription
LINEAR_DEFAULT_TEAMDefault team name (optional)

If not configured, the skill will prompt you to select a team (or use cached teams from learn mode).

Issue Templates

The skill includes three default templates. Templates are selected automatically based on topic/project mappings, or can be specified explicitly.

Default Template (Standard Issue)

markdown
## Problem Statement
[What problem are we solving and why?]

## Proposed Solution
[High-level approach]

## Acceptance Criteria
[Given/When/Then specifications]

## Implementation Plan
[Specific steps to implement]

## Technical Notes
[Implementation details, gotchas]

Bug Report Template

Used automatically when topic is "bug" or label includes "Bug".

markdown
## Bug Description
[What is the bug?]

## Steps to Reproduce
[1. Do X, 2. Do Y, 3. See error]

## Expected Behavior
[What should happen?]

## Actual Behavior
[What actually happens?]

## Environment
[OS, browser, version, etc.]

Feature Request Template

Used automatically when topic is "feature" or label includes "Feature".

markdown
## Problem Statement
[What user problem does this solve?]

## Proposed Solution
[How should this work?]

## User Stories
[As a X, I want Y, so that Z]

## Acceptance Criteria
[Definition of done]

Template Selection Priority

  1. Explicit template - User specifies: use bug template
  2. Project mapping - Project linked to template in template_mappings.projects
  3. Topic mapping - Label/topic linked in template_mappings.topics
  4. Default - Falls back to configured default template

Content Extraction from Plans

When given a plan/analysis/report, extract content using these mappings:

Template SectionExtract From Document
titleDocument heading, Executive Summary first sentence
problem_statementExecutive Summary, Problem, Current Pattern sections
proposed_solutionProposed Solution, Approach, Strategy, Key Insight
acceptance_criteriaBenefits, Expected Outcomes - convert to Given/When/Then
implementation_planImplementation Steps - actionable steps
technical_notesRisks and Mitigations, Gotchas, Related Files

Empty sections: Omit entirely. Never use placeholder text.

Proposal Wizard

Before creating a ticket, show a proposal for discussion:

code
## Ticket Proposal

**Title:** [inferred title]
**Template:** [template name] (matched from [reason])

### Metadata
| Field | Value | Reasoning |
|-------|-------|-----------|
| Template | Bug Report | Matched from label 'Bug' |
| Labels | Bug | [reasoning] |
| Project | [project] | [reasoning] |
| Estimate | 2pt | [file count], [complexity] |
| Cycle | next | User specified |
| State | Todo | Auto (cycle specified) |

### Description Preview
[First lines of each section...]

---
**Ready to create?** Or adjust any options?
(You can also change the template with "use [template] template")

Wait for user approval before creating.

Metadata Inference

FieldInferenceHow
labelsAutoInfer from work type
projectAutoInfer from affected area
estimateAutoBased on effort calculation
priorityAskOnly infer if "critical"/"blocking" language
cycleUserUse what user says, default backlog
stateAutoTodo if cycle specified, else Backlog
assigneeAskAsk or leave unassigned

Estimate Guide

PointsTimeScope
1pt~4 hours1-3 files, simple, 1 iteration
2pt~1 workday1-5 files, moderate, 2 iterations
3pt~2 workdays5-10 files, some complexity
5pt~2-4 workdays10-20 files, significant refactoring
8pt~1 workweek20+ files, architectural, critical path

Quick Reference

Creates

  • Linear issues in configured team with proper template formatting

Required Fields (depends on template)

Default template:

  • title - Issue title
  • problem_statement - What problem are we solving?

Bug template:

  • title - Issue title
  • description - Bug description
  • steps_to_reproduce - Steps to reproduce
  • expected_behavior - What should happen
  • actual_behavior - What actually happens

Feature template:

  • title - Issue title
  • problem_statement - What user problem does this solve?
  • proposed_solution - How should this work?

Optional Metadata

FieldDescriptionExample
templateTemplate to use"default", "bug", "feature"
assigneeWho will work on it"me", "name"
labelsIssue labels["Bug", "Improvement"]
projectProject name"Project Name"
cycleSprint cycle"current", "next", 26
priority1=Urgent, 2=High, 3=Normal, 4=Low2
estimateStory points3

Optional Relationships

FieldDescriptionExample
parent_idCreate as sub-issue"XXX-123"
blocksIssues this blocks["XXX-456"]
blocked_byIssues blocking this["XXX-100"]
related_toRelated issues["XXX-310"]

Usage

  1. Request required information if not provided
  2. Format content using the template
  3. Show proposal wizard for user approval
  4. Create issue in Linear with appropriate metadata

Full Documentation

See skill.yaml for complete procedure, patterns, and template details.