schpet/linear-cli
Overview
This skill lets you manage Linear issues and related resources directly from the command line using the linear CLI. It automates common workflows like listing issues, starting work, creating PRs, adding comments, and running raw GraphQL queries so you can stay in your terminal. The skill is agent-friendly and integrates with git and jj workflows.
How this skill works
The skill issues linear CLI commands on your behalf, assuming the linear binary is on PATH and authenticated. It can call subcommands for issues, teams, projects, labels, documents, and the raw API, and it supports file-based inputs for multi-line markdown content. For advanced needs it can write and read temporary files, run GraphQL queries via the CLI's api command, and return structured results for automation.
When to use it
- Quickly list or filter issues without opening the web UI
- Create or update issues and comments from scripts or editor workflows
- Start workflows that create branch names and PRs tied to Linear issue IDs
- Run ad-hoc GraphQL queries against the Linear API when CLI options are insufficient
- Automate bulk operations across teams, projects, or milestones
Best practices
- Ensure the linear CLI is installed and linear --version works before using the skill
- Use --description-file and --body-file for multi-line markdown to avoid shell escaping issues
- Prefer the CLI subcommands over raw API queries; use api only for unsupported operations
- Write temporary files for complex input and remove them after use to avoid leaking draft text
- Run linear --help on a command to discover flags and options before automating it
Example use cases
- Create a new issue with a detailed markdown description stored in a temp file and return the issue ID
- List open issues for a team or project and pipe results into downstream tooling
- Add a comment to an issue using a prepared body file to preserve markdown formatting
- Run a GraphQL query via linear api to fetch custom fields or run a complex search not exposed by subcommands
- Generate a branch name and open a PR in one script by combining issue create/list output with git commands
FAQ
The linear CLI binary must be on PATH and you must be authenticated (use linear auth to configure).
How do I include multi-line markdown in issues or comments?
Write your markdown to a file and use --description-file or --body-file; this preserves formatting and avoids shell-escaping problems.