官方 description 未单独写出 Use when。按规范,代理会在用户任务与这段 description 的关键词匹配时激活本技能。
代理如何加载
按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Linear、Setup、Optional: default team key used when a command needs a team、Quick Commands、My stuff、Browse。 其中含规范建议的小节:分步指令。
Query and manage Linear issues, projects, and team workflows.
LinearSetupOptional: default team key used when a command needs a teamQuick CommandsMy stuffBrowseActionsOverviewCommon WorkflowsMorning StandupQuick Issue Creation (from chat)Triage Mode
---
name: linear
description: Query and manage Linear issues, projects, and team workflows.
homepage: https://linear.app
metadata: {"clawdis":{"emoji":"📊","requires":{"env":["LINEAR_API_KEY"]}}}
---
# Linear
Manage issues, check project status, and stay on top of your team's work.
## Setup
```bash
export LINEAR_API_KEY="your-api-key"
# Optional: default team key used when a command needs a team
export LINEAR_DEFAULT_TEAM="TEAM"
```
Discover team keys:
```bash
{baseDir}/scripts/linear.sh teams
```
If `LINEAR_DEFAULT_TEAM` is set, you can omit the team key in `team` and call:
```bash
{baseDir}/scripts/linear.sh create "Title" ["Description"]
```
## Quick Commands
```bash
# My stuff
{baseDir}/scripts/linear.sh my-issues # Your assigned issues
{baseDir}/scripts/linear.sh my-todos # Just your Todo items
{baseDir}/scripts/linear.sh urgent # Urgent/High priority across team
# Browse
{baseDir}/scripts/linear.sh teams # List available teams
{baseDir}/scripts/linear.sh team # All issues for a team
{baseDir}/scripts/linear.sh project # Issues in a project
{baseDir}/scripts/linear.sh issue # Get issue details
{baseDir}/scripts/linear.sh branch # Get branch name for GitHub
# Actions
{baseDir}/scripts/linear.sh create "Title" ["Description"]
{baseDir}/scripts/linear.sh comment "Comment text"
{baseDir}/scripts/linear.sh status
{baseDir}/scripts/linear.sh assign
{baseDir}/scripts/linear.sh priority
# Overview
{baseDir}/scripts/linear.sh standup # Daily standup summary
{baseDir}/scripts/linear.sh projects # All projects with progress
```
## Common Workflows
### Morning Standup
```bash
{baseDir}/scripts/linear.sh standup
```
Shows: your todos, blocked items across team, recently completed, what's in review.
### Quick Issue Creation (from chat)
```bash
{baseDir}/scripts/linear.sh create TEAM "Fix auth timeout bug" "Users getting logged out after 5 min"
```
### Triage Mode
```bash
{baseDir}/scripts/linear.sh urgent # See what needs attention
```
## Git Workflow (Linear ↔ GitHub Integration)
**Always use Linear-derived branch names** to enable automatic issue status tracking.
### Getting the Branch Name
```bash
{baseDir}/scripts/linear.sh branch TEAM-212
# Returns: dev/team-212-fix-auth-timeout-bug
```
### Creating a Worktree for an Issue
```bash
# 1. Get the branch name from Linear
BRANCH=$({baseDir}/scripts/linear.sh branch TEAM-212)
# 2. Pull fresh main first (main should ALWAYS match origin)
cd /path/to/repo
git checkout main && git pull origin main
# 3. Create worktree with that branch (branching from fresh origin/main)
git worktree add .worktrees/team-212 -b "$BRANCH" origin/main
cd .worktrees/team-212
# 4. Do your work, commit, push
git push -u origin "$BRANCH"
```
**⚠️ Never modify files on main.** All changes happen in worktrees only.
### Why This Matters
- Linear's GitHub integration tracks PRs by branch name pattern
- When you create a PR from a Linear branch, the issue **automatically moves to "In Review"**
- When the PR merges, the issue **automatically moves to "Done"**
- Manual branch names break this automation
- Keeping main clean = no accidental pushes, easy worktree cleanup
### Quick Reference
```bash
# Full workflow example
ISSUE="TEAM-212"
BRANCH=$({baseDir}/scripts/linear.sh branch $ISSUE)
# Always start from fresh main
cd ~/workspace/your-repo
git checkout main && git pull origin main
# Create worktree (inside .worktrees/)
git worktree add .worktrees/${ISSUE,,} -b "$BRANCH" origin/main
cd .worktrees/${ISSUE,,}
# ... make changes ...
git add -A && git commit -m "fix: implement $ISSUE"
git push -u origin "$BRANCH"
gh pr create --title "$ISSUE: