
Linear
Link PRs to Linear issues with Fixes keywords and human-readable completion comments when shipping fixes from Claude Code or similar agents.
Overview
Linear is an agent skill for the Build phase that connects GitHub pull requests to Linear issues via MCP retrieval, Fix keywords, and mandatory completion comments.
Install
npx skills add https://github.com/lobehub/lobe-chat --skill linearWhat is this skill?
- Retrieves issues via Linear MCP (`get_issue`) before implementation
- PR body uses `Fixes LOBE-xxx` (or project prefix) for auto-link and auto-close on merge
- Requires paired completion comment on the Linear issue for non-engineer watchers
- Extracts screenshot context from issues with `extract_images`
- Falls back clearly when Linear MCP tools are not installed
- Two required PR jobs: Fixes keyword in body plus human completion comment on the issue
- Workflow step 1: retrieve issue before starting implementation
Adoption & trust: 812 installs on skills.sh; 78.4k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You fixed a Linear ticket in a PR but stakeholders still see an empty issue with no summary and weak GitHub linkage.
Who is it for?
Small teams using Linear plus GitHub who want agent-driven PRs to satisfy both automation and human readers.
Skip if: Solo hackers on a plain markdown todo list with no Linear workspace or MCP server configured.
When should I use this skill?
User mentions LOBE-xxx or other Linear issue IDs, says linear / linear issue / link linear, or creates PRs that should reference and close Linear issues.
What do I get? / Deliverables
Each fix ships with a properly linked PR and a Linear comment that explains the change, so the issue can auto-close on merge with visible context.
- PR body containing Fix/Fixes ISSUE-ID linkage
- Linear issue completion comment with change summary
- Updated issue status when workflow calls for it
Recommended Skills
Journey fit
How it compares
Issue-tracker integration skill via MCP, not a replacement for code review or test workflows.
Common Questions / FAQ
Who is linear for?
Developers and indie teams on Linear who use AI agents to implement issues and open GitHub PRs with correct traceability.
When should I use linear?
Use it during Build when a task references LOBE-xxx (or your prefix), when opening a PR for a tracked issue, or when asked to update Linear status or comments after a fix.
Is linear safe to install?
Review the Security Audits panel on this Prism page; the skill expects MCP access to Linear and GitHub with credentials scoped to your workspace.
SKILL.md
READMESKILL.md - Linear
# Linear Issue Management Before using Linear workflows, search for `linear` MCP tools. If not found, treat as not installed. ## PR Creation with Linear Issues A PR that fixes a Linear issue has **two separate jobs to do**, and both matter: 1. **`Fixes LOBE-xxx` in the PR body** — Linear watches GitHub for these magic keywords and auto-links the PR and auto-closes the issue on merge. This is the machine-readable side. 2. **A completion comment on the Linear issue** — gives the reviewer/PM/teammate landing in Linear a human-readable summary of what changed and why, without forcing them to click through to GitHub and read a diff. If you only do step 1, Linear watchers (often non-engineers) hit the issue and see no context. So pair PR creation with the Linear comment as part of the same task — finish both before considering the work done. ## Workflow 1. **Retrieve issue details** before starting: `mcp__linear-server__get_issue` 2. **Read images** — issue descriptions often contain screenshots with critical context (mockups, error states, before/after). Use `mcp__linear-server__extract_images` so you actually see them; reading raw markdown alone misses what the reporter was looking at. 3. **Check for sub-issues**: `mcp__linear-server__list_issues` with `parentId` filter 4. **Mark as In Progress** at the moment you start planning or implementing — this signals to teammates the issue is owned, so they don't double-pick it up. 5. **Update issue status** when completing: `mcp__linear-server__update_issue` 6. **Add completion comment** (see [format below](#completion-comment-format)) ## Creating Issues When creating issues with `mcp__linear-server__create_issue`, add the `claude code` label. Reason: the label is how the team filters/audits AI-generated issues; without it those issues vanish into the general backlog and the team loses visibility into AI contribution patterns. ## Language Match the issue language to the conversation that produced it — if you're discussing in 中文,write the issue in 中文;if discussing in English, write it in English. Reason: the issue is a continuation of the conversation, and forcing a language switch creates translation friction for the collaborator who started the thread. Specifics: - 中文 conversation → 中文 body; technical terms (file paths, identifiers, library names, commands, error messages) stay in English. - English conversation → English body. - Code blocks, file paths, and quoted strings always stay in their original form regardless of surrounding language. - This applies equally to **updates** — when editing an existing issue (description **and titles**), preserve the language of the conversation that triggered the edit; don't switch the issue language mid-refactor. ## Creating Sub-issue Trees When breaking a parent issue into a tree of sub-issues (e.g., task decomposition for LOBE-xxx), follow these rules — they work around real limitations of the Linear MCP tools. ### 1. Prefix titles with an ordering index The Linear Sub-issues panel orders children by `sortOrder`, which **defaults to newest-first** (most recently created appears on top). Neither parallel nor serial creation produces the intended top-to-bottom reading order, and the MCP `save_issue` tool does **not expose a `sortOrder` parameter** — you can't set order at create time. Workaround: encode execution order in the title itself: ```plaintext [1] [db] add schema fields [2] [db] new table + repository [3] [service] business logic layer [4] [api] REST endpoints [4.1] [sdk] client SDK wrapper [4.1.1] [app] consumer integration [4.1.2]