linear-cli
Linear CLI (schpet/linear-cli)
Overview
Use this skill to help the user work through a local linear installation from inside NextClaw.
This skill is intentionally decoupled:
- The skill owns explanation, onboarding, readiness checks, workflow choice, and risk handling.
- The
linearCLI owns actual execution against Linear’s API and the user’s git or Jujutsu workspace.
From the user’s point of view, the experience should feel complete:
- install the CLI if needed,
- ensure authentication and project configuration,
- verify readiness with observable commands,
- then run the real task.
Do not pretend the environment is ready when it is not.
What This Skill Covers
- Issue workflows: list, view, start, create, update, delete, comments, PR helpers (when
ghis available as documented upstream). - Team, project, milestone, and document commands exposed by the installed CLI.
- Git branch–based “current issue” semantics and Jujutsu
Linear-issuetrailers when the user usesjj. - First-use setup: API key,
linear auth login, andlinear configin the target repository. - Readiness checks and bounded troubleshooting.
What This Skill Does Not Cover
- Inventing flags or subcommands that do not appear in
linear --helpor the installed CLI help for the relevant subcommand. - Claiming Linear workspace permissions or plan limits the user does not have.
- Silently bypassing missing authentication or broken configuration.
- Silently triggering destructive or write actions without explicit user confirmation.
- Treating third-party CLI behavior as native NextClaw behavior.
First-Use Workflow
When the user asks for a linear-powered task, follow this order.
1. Classify the task
Classify the task into one of these:
- read-only (view, list, print id/url/title),
- write (create/update/delete issues, start work, comments, milestones, documents),
- VCS-assisted (branch creation, issue binding).
If the task does not fit what the CLI supports, say so clearly.
2. Check whether the CLI exists
Run:
command -v linear
If missing, explain that the CLI must be installed locally first. Prefer one of these install paths and stay consistent with the user’s platform and package preferences:
- Homebrew:
brew install schpet/tap/linear(see upstream tap name in the repository). - npm (project or global): install
@schpet/linear-cliand invoke vianpx linear/pnpm exec linear/bunx linearas appropriate. - Deno: follow upstream
deno installinstructions from the README.
After installation, continue with readiness checks instead of jumping straight into the user task.
3. Confirm CLI version
Run:
linear --version
If this fails, treat the install as broken and fix that before API-backed tasks.
4. Authentication and configuration
The CLI needs a Linear API key and login state. The user creates a key under Linear account security settings (see upstream docs).
Guide the user through:
linear auth login
For repository-specific defaults (team, workspace slug, VCS mode), run from the target repo:
linear config
Configuration is resolved from ./linear.toml, ./.linear.toml, repo root, .config/linear.toml, and platform-appropriate user config paths as documented upstream. Environment variables override file values when both apply.
5. Readiness check
Prefer a lightweight read that hits the API after auth, for example:
linear team list
If this fails with authentication or permission errors, do not proceed to the user’s real task. Diagnose auth, workspace, or token scope first.
6. Respect “current issue” rules
The CLI derives the current issue from:
- git: issue id embedded in the branch name (for example
ENG-123-my-feature), - jj:
Linear-issuetrailer in commit metadata.
If the user expects “current issue” behavior but the branch or trailers do not match, explain the mismatch before running issue-scoped commands.
Safe Execution Rules
- Prefer read-only commands before write commands.
- For creates, updates, deletes, starts, comments, or other writes, ask for explicit confirmation first unless the user already gave a clear, scoped instruction for that write.
- Do not assume
ghor a Git host CLI is installed; if the user wantslinear issue pr, verifyghavailability or follow upstream behavior transparently. - If the user is in the wrong directory for
linear configor issue context, say so and ask to switch to the intended repository root.
Troubleshooting
linear not found
- Explain that the CLI is not installed or not on
PATH. - Guide installation using one of the supported methods, then re-check with
command -v linear.
Auth or API errors on read commands
- Confirm
linear auth logincompleted successfully. - Confirm API key is valid and not revoked.
- Confirm workspace and
team_id/ defaults match the user’s intent (linear configand env vars).
Wrong issue or empty “current issue”
- For git, verify the branch name contains the expected Linear issue id.
- For Jujutsu, verify
Linear-issuetrailers on the relevant commits. - Offer
linear issue view <id>when current-issue detection is unreliable.
Platform differences
- Treat path and config locations as different on Windows vs Unix; follow upstream config search order instead of assuming POSIX-only paths.
Success Criteria
The skill is working correctly when:
- the user understands that execution is performed by the local
linearCLI against Linear, - missing CLI, auth, or config is identified before task execution,
- a lightweight API read succeeds before heavier workflows when appropriate,
- write operations wait for explicit confirmation when required,
- and the real task runs only after the environment is truly ready.
More from peiiii/nextclaw
ui-ux-pro-max
Use when the user wants professional UI/UX design guidance, design-system generation, UX review, or stack-specific frontend guidance through a bundled local UI/UX Pro Max dataset and Python search runtime.
2impeccable
Use when the user wants distinctive, production-grade frontend design, anti-generic AI aesthetics, UX critique, technical UI audits, or final polish through bundled Impeccable references and an optional upstream detector CLI.
2lark-cli
Use when the user wants to operate Lark or Feishu via the local lark-cli (@larksuite/cli), including install, app credentials, OAuth, readiness checks, and safe read/write boundaries.
1opencli
Use when the user wants to use websites, browser login sessions, Electron apps, or external CLIs through a local OpenCLI setup, especially when setup guidance, readiness checks, and safe task execution are needed.
1find-skills
Use when the user wants to discover, evaluate, and install external agent skills from the open skills ecosystem, especially through the Vercel Skills CLI.
1superpowers
Use when the user wants a disciplined software development workflow with design-first planning, implementation plans, TDD, systematic debugging, code review, or verification-before-completion, adapted from obra/superpowers.
1