Skip to content

Commit ac34dfe

Browse files
committed
feat: add Claude Code skills for linear-cli operations
Add structured skill files that Claude Code can load when performing Linear operations. Skills cover: issues, PRs, search, and uploads.
1 parent 117d072 commit ac34dfe

5 files changed

Lines changed: 242 additions & 2 deletions

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
name: linear-issues
3+
description: Manage Linear issues - list, create, update, start/stop work. Use when working with Linear issues, viewing tasks, creating bugs, or updating issue status.
4+
allowed-tools: Bash
5+
---
6+
7+
# Linear Issues
8+
9+
Manage Linear.app issues using the `linear-cli` command-line tool.
10+
11+
## List Issues
12+
13+
```bash
14+
# List all issues
15+
linear-cli i list
16+
17+
# Filter by team
18+
linear-cli i list -t Engineering
19+
20+
# Filter by status
21+
linear-cli i list -s "In Progress"
22+
23+
# Get JSON output (for parsing)
24+
linear-cli i list --output json
25+
```
26+
27+
## View Issue Details
28+
29+
```bash
30+
# View issue details
31+
linear-cli i get LIN-123
32+
33+
# Get as JSON
34+
linear-cli i get LIN-123 --output json
35+
```
36+
37+
## Create Issues
38+
39+
```bash
40+
# Create issue (priority: 1=urgent, 2=high, 3=medium, 4=low)
41+
linear-cli i create "Bug: Login fails" -t Engineering -p 2
42+
43+
# Create with status
44+
linear-cli i create "Feature request" -t ENG -s "Backlog"
45+
```
46+
47+
## Update Issues
48+
49+
```bash
50+
# Update status
51+
linear-cli i update LIN-123 -s Done
52+
53+
# Update priority
54+
linear-cli i update LIN-123 -p 1
55+
```
56+
57+
## Start/Stop Work
58+
59+
```bash
60+
# Start working (assigns to you, sets In Progress, creates git branch)
61+
linear-cli i start LIN-123 --checkout
62+
63+
# Stop working (unassigns, resets status)
64+
linear-cli i stop LIN-123
65+
```
66+
67+
## Comments
68+
69+
```bash
70+
# List comments
71+
linear-cli cm list LIN-123
72+
73+
# Get comments as JSON
74+
linear-cli cm list LIN-123 --output json
75+
76+
# Add comment
77+
linear-cli cm create LIN-123 -b "Fixed in latest commit"
78+
```
79+
80+
## Tips
81+
82+
- Use `--output json` for machine-readable output
83+
- Short alias: `i` for issues, `cm` for comments
84+
- Run `linear-cli i --help` for all options

‎.claude/skills/linear-pr/SKILL.md‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
name: linear-pr
3+
description: Create GitHub PRs linked to Linear issues. Use when creating pull requests, pushing code for review, or linking PRs to Linear issues.
4+
allowed-tools: Bash
5+
---
6+
7+
# Linear PR Creation
8+
9+
Create GitHub pull requests linked to Linear issues using `linear-cli`.
10+
11+
## Create PR for Issue
12+
13+
```bash
14+
# Create PR linked to Linear issue
15+
linear-cli g pr LIN-123
16+
17+
# Create draft PR
18+
linear-cli g pr LIN-123 --draft
19+
20+
# Specify base branch
21+
linear-cli g pr LIN-123 --base main
22+
23+
# Open in browser after creation
24+
linear-cli g pr LIN-123 --web
25+
```
26+
27+
## Git Branch Operations
28+
29+
```bash
30+
# Create and checkout branch for issue
31+
linear-cli g checkout LIN-123
32+
33+
# Use custom branch name
34+
linear-cli g checkout LIN-123 -b my-custom-branch
35+
36+
# Just show branch name (don't create)
37+
linear-cli g branch LIN-123
38+
39+
# Create branch without checkout
40+
linear-cli g create LIN-123
41+
```
42+
43+
## Full Workflow
44+
45+
```bash
46+
# 1. Start working on issue (assigns, sets In Progress, creates branch)
47+
linear-cli i start LIN-123 --checkout
48+
49+
# 2. Make your changes...
50+
# git add . && git commit -m "Fix the bug"
51+
52+
# 3. Create PR
53+
linear-cli g pr LIN-123
54+
```
55+
56+
## Tips
57+
58+
- PR title and description are auto-generated from issue
59+
- Use `--draft` for work-in-progress PRs
60+
- The branch name follows pattern: `username/lin-123-issue-title`
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: linear-search
3+
description: Search Linear issues and projects. Use when finding issues, looking up bugs, or searching the backlog.
4+
allowed-tools: Bash
5+
---
6+
7+
# Linear Search
8+
9+
Search Linear.app issues and projects using `linear-cli`.
10+
11+
## Search Issues
12+
13+
```bash
14+
# Search issues by text
15+
linear-cli s issues "authentication bug"
16+
17+
# Limit results
18+
linear-cli s issues "login" --limit 5
19+
20+
# Get JSON output
21+
linear-cli s issues "error" --output json
22+
```
23+
24+
## Search Projects
25+
26+
```bash
27+
# Search projects
28+
linear-cli s projects "backend"
29+
30+
# Limit results
31+
linear-cli s projects "api" --limit 10
32+
```
33+
34+
## Combine with Filters
35+
36+
After searching, you can get details on specific issues:
37+
38+
```bash
39+
# Get issue details
40+
linear-cli i get LIN-123
41+
42+
# Get as JSON for parsing
43+
linear-cli i get LIN-123 --output json
44+
45+
# List comments on issue
46+
linear-cli cm list LIN-123 --output json
47+
```
48+
49+
## Tips
50+
51+
- Search is case-insensitive
52+
- Searches issue titles and descriptions
53+
- Use `--output json` for programmatic access
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: linear-uploads
3+
description: Download attachments and images from Linear issues. Use when fetching screenshots, images, or file attachments from Linear comments or descriptions.
4+
allowed-tools: Bash
5+
---
6+
7+
# Linear Uploads
8+
9+
Download attachments and images from Linear issues using `linear-cli`.
10+
11+
## Download to File
12+
13+
```bash
14+
# Download image/attachment to file
15+
linear-cli up fetch "https://uploads.linear.app/..." -o image.png
16+
17+
# Download screenshot
18+
linear-cli up fetch "https://uploads.linear.app/abc/def/screenshot.png" -o /tmp/screenshot.png
19+
```
20+
21+
## Output to Stdout
22+
23+
```bash
24+
# Pipe to other tools
25+
linear-cli up fetch "https://uploads.linear.app/..." | base64
26+
27+
# Pipe to file
28+
linear-cli up fetch "https://uploads.linear.app/..." > file.png
29+
```
30+
31+
## Finding Upload URLs
32+
33+
Upload URLs are found in:
34+
- Issue descriptions
35+
- Comments (use `linear-cli cm list ISSUE_ID --output json`)
36+
37+
URLs follow pattern: `https://uploads.linear.app/{org}/{upload}/{filename}`
38+
39+
## Tips
40+
41+
- Requires valid Linear API key
42+
- Use `-o` to specify output filename
43+
- Without `-o`, outputs raw bytes to stdout

‎.gitignore‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/target
22

3-
# Claude Code config
4-
.claude/
3+
# Claude Code local settings (not skills)
4+
.claude/settings.local.json

0 commit comments

Comments
 (0)