skills/linear-cli/SKILL.md
Manage Linear issues from the command line using the linear cli. This skill allows automating linear management.
npx skillsauth add lilpacy/dotfiles linear-cliInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A CLI to manage Linear issues from the command line, with git and jj integration.
Generated from linear CLI v1.10.0
workspace = "lilpacys-workspace"
team_id = "LIL"
issue_sort = "priority"
linear issue list defaults to state=unstarted and assignee=self. When listing issues, always include all assignees and all states:
linear issue list -A --all-states --sort priority
When working on a Linear issue, move through states without skipping:
linear issue update <ID> -s "Todo"linear issue update <ID> -s "In Progress"linear issue update <ID> -s "In Review"linear issue update <ID> -s "Done"linear issue comment add <ID> -b "コメント本文"Do not move an issue directly to Done.
The linear command must be available on PATH. To check:
linear --version
If not installed, follow the instructions at:
https://github.com/schpet/linear-cli?tab=readme-ov-file#install
When working with issue descriptions or comment bodies that contain markdown, always prefer using file-based flags instead of passing content as command-line arguments:
--description-file for issue create and issue update commands--body-file for comment add and comment update commandsWhy use file-based flags:
\n sequences from appearing in markdownExample workflow:
# Write markdown to a temporary file
cat > /tmp/description.md <<'EOF'
## Summary
- First item
- Second item
## Details
This is a detailed description with proper formatting.
EOF
# Create issue using the file
linear issue create --title "My Issue" --description-file /tmp/description.md
# Or for comments
linear issue comment add ENG-123 --body-file /tmp/comment.md
Only use inline flags (--description, --body) for simple, single-line content.
When reading and updating issue descriptions that contain inline images or uploaded files, do not round-trip the output of plain linear issue view back into linear issue update.
linear issue view downloads uploads.linear.app assets to local temp files by default/tmp or /var/folders/... paths on the current machinelinear issue update --description-file, the issue description will contain broken local-file image linksSafe read paths for issue descriptions with images:
linear issue view ISSUE-ID --no-download when you want the rendered markdown with remote asset URLs preservedlinear api when you need the raw issue.description field exactly as storedSafe update workflow for image-containing descriptions:
# Read the raw description without rewriting upload URLs
linear issue view PM-122 --no-download
# Or fetch the raw description field exactly as stored
linear api --variable id=PM-122 <<'GRAPHQL'
query($id: String!) {
issue(id: $id) {
description
}
}
GRAPHQL
# Edit the markdown in a temp file, then write it back
linear issue update PM-122 --description-file /tmp/description.md
Recovery if an inline image was broken by a bad round-trip:
linear issue viewlinear issue attach ISSUE-ID /path/to/file.png--description-filelinear auth # Manage Linear authentication
linear issue # Manage Linear issues
linear team # Manage Linear teams
linear project # Manage Linear projects
linear project-update # Manage project status updates
linear milestone # Manage Linear project milestones
linear initiative # Manage Linear initiatives
linear initiative-update # Manage initiative status updates (timeline posts)
linear label # Manage Linear issue labels
linear document # Manage Linear documents
linear config # Interactively generate .linear.toml configuration
linear schema # Print the GraphQL schema to stdout
linear api # Make a raw GraphQL API request
For curated examples of organization features (initiatives, labels, projects, bulk operations), see organization-features.
To see available subcommands and flags, run --help on any command:
linear --help
linear issue --help
linear issue list --help
linear issue create --help
Each command has detailed help output describing all available flags and options.
Prefer the CLI for all supported operations. The api command should only be used as a fallback for queries not covered by the CLI.
Write the schema to a tempfile, then search it:
linear schema -o "${TMPDIR:-/tmp}/linear-schema.graphql"
grep -i "cycle" "${TMPDIR:-/tmp}/linear-schema.graphql"
grep -A 30 "^type Issue " "${TMPDIR:-/tmp}/linear-schema.graphql"
Important: GraphQL queries containing non-null type markers (e.g. String followed by an exclamation mark) must be passed via heredoc stdin to avoid escaping issues. Simple queries without those markers can be passed inline.
# Simple query (no type markers, so inline is fine)
linear api '{ viewer { id name email } }'
# Query with variables — use heredoc to avoid escaping issues
linear api --variable teamId=abc123 <<'GRAPHQL'
query($teamId: String!) { team(id: $teamId) { name } }
GRAPHQL
# Search issues by text
linear api --variable term=onboarding <<'GRAPHQL'
query($term: String!) { searchIssues(term: $term, first: 20) { nodes { identifier title state { name } } } }
GRAPHQL
# Numeric and boolean variables
linear api --variable first=5 <<'GRAPHQL'
query($first: Int!) { issues(first: $first) { nodes { title } } }
GRAPHQL
# Complex variables via JSON
linear api --variables-json '{"filter": {"state": {"name": {"eq": "In Progress"}}}}' <<'GRAPHQL'
query($filter: IssueFilter!) { issues(filter: $filter) { nodes { title } } }
GRAPHQL
# Pipe to jq for filtering
linear api '{ issues(first: 5) { nodes { identifier title } } }' | jq '.data.issues.nodes[].title'
For cases where you need full HTTP control, use linear auth token:
curl -s -X POST https://api.linear.app/graphql \
-H "Content-Type: application/json" \
-H "Authorization: $(linear auth token)" \
-d '{"query": "{ viewer { id } }"}'
development
Use when searching the web or reading online documentation. Prefer DuckDuckGo for search and read documents through npx curl.md instead of raw HTML.
testing
Use when writing or editing tests. Tests should be ordered by near-normal, normal, then abnormal cases where applicable, and test names must be Japanese behavior descriptions from a reviewer/user perspective.
development
GoF/オブジェクト指向デザインパターンを関数型プログラミング(pure functions, higher-order functions, ADT, composition, immutability, effect boundaries)でシンプルに整理・設計・リファクタリングする。Strategy/Factory/Adapter/ObserverなどGoF全23パターンのFP置き換え、適用判断、具体事例を提示する必要があるときに使う。
tools
Use when committing, pushing, or preparing PRs. Defines the user's commit workflow, message style discovery, review handoff, and branch/worktree push requirements.