AgentSkillsCN

linear

采用线性问题管理机制,配合自动化工作流编排,轻松应对问题创建、状态流转,以及大型计划的自动拆分与分级子问题处理。当您需要创建问题、跟踪任务进展、处理 INT-XXX 问题,或管理线性工作流时,可调用此技能。

SKILL.md
--- frontmatter
name: linear
description: Linear issue management with automatic workflow orchestration. Handles issue creation, state transitions, and automatic splitting of large plans into tiered child issues. Use when creating issues, tracking tasks, working on INT-XXX issues, or managing Linear workflow.
argument-hint: '[INT-XXX | task description | sentry-url]'

Linear Issue Management

Manage Linear issues, branches, and PRs with enforced workflow and cross-linking.

Team: IntexuraOS — ALWAYS use this exact team name for all Linear API calls. Never guess.

Project Key: INT- (e.g., INT-123, INT-144). All issue references use generic LIN-XXX placeholders, but for this project always use INT-XXX.

Usage

code
/linear                           # NON-INTERACTIVE: Pick random Todo issue
/linear <task description>        # Create new issue
/linear INT-123                   # Work on existing issue
/linear <sentry-url>              # Create issue from Sentry error

Core Mandates

  1. Branch First: EVERY task MUST start with branch creation from origin/development. Task FAILS if work starts on development or main.
  2. Fail Fast: If Linear, GitHub CLI, or GCloud are unavailable, STOP immediately
  3. No Guessing: When issue type is ambiguous, ASK the user
  4. Cross-Linking: Every issue MUST link between systems (Linear <-> GitHub <-> Sentry)
  5. CI Gate: pnpm run ci:tracked MUST pass before PR creation — NON-NEGOTIABLE, no shortcuts
  6. State Management (MANDATORY): EVERY issue MUST transition through states: Backlog → In Progress (when starting) → In Review (when PR created). NEVER skip or delay state updates.
  7. One Issue at a Time: Complete verification, commit, and PR for EACH issue before starting the next
  8. Checkpoint Pattern: After completing an issue, STOP and wait for user instruction before proceeding
  9. Done Forbidden: Never move issues to Done — maximum agent-controlled state is QA
  10. 95% Coverage MINIMUM: All tests listed in issues MUST be implemented. Do NOT simplify work.

Invocation Detection

The skill automatically detects intent from input:

Input PatternTypeWorkflow
/linear (no args)Random Todorandom-todo.md
/linear <task description>Create Newcreate-issue.md
/linear INT-<number>Work Existingwork-existing.md
/linear https://sentry.io/...Sentry Integrationsentry-integration.md

Auto-Splitting Detection

For complex multi-step tasks, auto-splitting is triggered when:

  1. Issue description has numbered phases (Phase 1, Phase 2...)
  2. Issue description has >5 checkbox items
  3. Issue description >2000 characters with clear sections
  4. User explicitly says "split this into subtasks"

When detected, see: plan-splitting.md

Tool Verification (Fail Fast)

Before ANY operation, verify all required tools:

ToolVerification CommandPurpose
Linear MCPmcp__linear__list_teamsIssue management
GitHub CLIgh auth statusPR creation
GCloudService account verificationFirestore access

GCloud Verification

Service account key location: ~/personal/gcloud-claude-code-dev.json

  1. Check if credentials file exists
  2. If gcloud auth list shows no active account, activate service account
  3. Verify authentication

You are NEVER "unauthenticated" if the service account key file exists.

Failure Handling

If ANY required tool is unavailable, ABORT immediately:

code
ERROR: /linear cannot proceed - <tool-name> unavailable

Required for: <purpose>
Fix: <fix-command>

Aborting.

GitHub Integration (Critical)

For PRs to appear as attachments in Linear UI:

  1. Branch name MUST contain Linear issue ID - e.g., fix/INT-123
  2. PR title MUST contain Linear issue ID - e.g., [INT-123] Fix auth

When both conditions are met, GitHub integration automatically attaches PR to Linear issue.

References